Skip to content
Tutorials Center
My learning

Topics

Lesson 2 of 46 ยท Getting Started

What Is a Mathematical Model?

Learn what a mathematical model is, why every model leaves things out, and build your first one: a leaking tank that predicts when it empties.

A road map is not the road. It leaves out trees, potholes and the color of the houses, and that is exactly why it is useful: you can read the whole city in a glance. A mathematical model is a map made of mathematics. It keeps the few features of a situation that matter for your question and drops the rest, so that you can calculate, predict and compare instead of guessing.

In this lesson you will see what a model is made of, why leaving things out is a feature rather than a flaw, and how a real example works from start to finish: a tank with a leak.

What you will learn

  • What a mathematical model is, and what it is not
  • The parts of a model: variables, parameters, assumptions and predictions
  • Why useful models are always simplified
  • How to build and test a first model in Python

Key terms

Model: a simplified description of a real situation that you can calculate with.

Variable: a quantity that changes, such as the water height h(t).

Parameter: a number that stays fixed during one run but can differ between runs, such as the size of a hole.

Assumption: a deliberate simplification, such as "water flows without friction".

Prediction: a number or curve the model produces that you can compare with reality.

Models are everywhere

A weather forecast, a bridge design, a loan calculator and the "estimated arrival time" on a phone are all models. So is a school timetable, if you think about it: it is a simplified description of who needs to be where. What they share is a pattern:

  1. Start with a situation and a question.
  2. Decide which features matter and write assumptions down.
  3. Express the relationships between those features in mathematics.
  4. Compute, and read the result back as an answer.
A leaking tank is simplified into an equation, which gives a prediction curve for the water height
From the real tank, to the equation dh/dt = -k times the square root of h, to a prediction of when it empties.

The statistician George Box put the central truth of the craft in a famous line: "All models are wrong, but some are useful." Wrong here means simplified. The question is never "is the model perfect?" but "is it good enough for the question I am asking?"

A worked example: the leaking tank

A cylindrical tank of cross-section area A is filled with water to height hโ‚€. A small hole of area a at the bottom lets water out. Question: how long until the tank is empty?

Step 1: the physics we borrow

In 1643 Evangelista Torricelli noticed that water leaves a hole at roughly the speed an object would reach after falling from the water surface to the hole:

v = โˆš(2 g h)

where g = 9.81 m/sยฒ is gravitational acceleration and h is the height of the surface above the hole. This is our key assumption: no friction, no swirling, a small hole compared with the tank.

Step 2: a balance law

The volume of water is V = A h. Water leaves at rate (hole area) ร— (speed), so

A ยท dh/dt = โˆ’ a โˆš(2 g h)

The minus sign says the height decreases. Divide by A and collect the constants into one number:

dh/dt = โˆ’ k โˆšh, where k = (a / A) โˆš(2 g)

That single line is the model. Its one parameter is k, which bundles the geometry and gravity.

Step 3: solve

Because d(โˆšh)/dt = (1/(2โˆšh)) ยท dh/dt = โˆ’k/2, the square root of the height falls at a constant rate:

โˆšh(t) = โˆšhโ‚€ โˆ’ (k/2) t, so h(t) = (โˆšhโ‚€ โˆ’ k t / 2)ยฒ

The tank is empty when โˆšh = 0, which happens at

t_empty = 2 โˆšhโ‚€ / k

Step 4: put in numbers

Take A = 0.5 mยฒ, a = 0.0005 mยฒ (a hole about 2.5 cm across) and hโ‚€ = 1 m. Then k = (0.0005 / 0.5) ร— โˆš(2 ร— 9.81) โ‰ˆ 0.00443 m^0.5/s, and t_empty โ‰ˆ 2 ร— 1 / 0.00443 โ‰ˆ 452 s, about 7.5 minutes.

Python Leaking tank: formula versus simulation

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Two independent routes (algebra and a simulation) give nearly the same answer. When different methods agree, that raises your trust in the mathematics. It says nothing yet about whether the model matches a real tank. That check comes in Chapter 8.

Common misconceptions

"A model must copy reality as closely as possible." No. A model that includes everything is as hard to understand as the real thing. Include what the question needs and no more.

"If the equations are right, the model is right." The algebra can be perfect while the assumptions are bad. Here, a rough hole edge or a very wide hole breaks the "no friction, small hole" assumption, so the prediction is a little too optimistic.

"A model is just a formula." A model also includes the question, the assumptions and the way you will check it.

Try it

Experiment with the hole size. Predict first: if you double the hole area, does the emptying time halve? Then run the plot to find out.

Python Hole size and emptying time

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

And here is a small interactive version. Move the slider to resize the hole and watch the tank.

Interactive tank

(The animation runs about 25 times faster than real time.)

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. Why does a useful model leave things out?

    A model is a purposeful simplification. Anything that does not matter for the question is dropped on purpose.
  2. 2. In the tank model dh/dt = -k sqrt(h), which of these is a parameter?

    k stays fixed during one run. The height h and time t are the changing quantities.
  3. 3. Torricelli's result says water leaves the hole at speed v = sqrt(2 g h). If the water is four times deeper, the speed is:

    Speed is proportional to the square root of the depth, and the square root of 4 is 2.
  4. 4. Your algebra and your simulation agree on the emptying time. What does that prove?

    Agreement between two ways of solving checks the maths. Testing the model against real measurements is a separate step.
  5. 5. Which statement about assumptions is best?

    Written assumptions let you and others judge where the model can be trusted.

Summary

  • A model is a purposeful simplification of reality that you can compute with.
  • It has variables, parameters, assumptions and predictions.
  • The leaking tank model dh/dt = โˆ’kโˆšh gives h(t) = (โˆšhโ‚€ โˆ’ kt/2)ยฒ and an emptying time 2โˆšhโ‚€/k.
  • Agreement between two solution methods checks the mathematics, not the assumptions.
  • "Wrong but useful" is the standard to aim for.

Next: Types of Models