← Simplify/It
You are here: Algebra
Evidence 0
Simplify It · Issue 03 · Mathematics × medicine

The patient you cannot see

A beginner's journey from one differential equation to the mathematics of hidden biological systems, uncertainty, and personalized medicine.

Inside the body · hidden
hidden biologythe modelmeasurementswhat you controluncertainty

I give you five numbers: a heart rate, a blood measurement, a biomarker concentration, an imaging reading, and the same blood measurement six hours later. Then I ask: what is happening inside this person's body?

You can't simply look inside and read off the number of diseased cells, the strength of an immune response, how much drug reached a tissue, or the hidden settings of a feedback loop. Medicine gives you a handful of measurements. The biology that produced them stays hidden. Mathematics asks: what hidden system could have produced these measurements?

The animation above is exactly that situation. Coral curves are a real simulated disease and immune response. You only get the white dots. Press Peek inside to cheat, once. For the rest of this issue, you won't get to.

You cannot measure everything.
00Gut check · no wrong answers✓ cleared

Before the math, your instinct

Lock in an answer for each. They come back at the end.

01Algebra · the black box✓ cleared

Start with something ridiculously simple

A sealed box takes an input and returns an output. You can't see inside. I tell you: input 1 gives output 2. You might guess . Congratulations, you've built a model.

But also passes through that point. So does every curve in the family on the left below. Add more observations and see what happens to the family.

Instrument 01 · The black boxHow many models fit your data?
Observations1
Models that fit them all∞
One observationSlide c. Every one of these curves passes through the data exactly.

More observations don't shrink the family to one. Any number of points leaves infinitely many curves through them. What collapses the family is an assumption, like "it's a straight line". Data plus assumptions make a model; data alone doesn't.

Data does not automatically determine reality.
02Differential equations · become the biologist✓ cleared

The body is not a calculator

Biology changes. Cells divide, molecules diffuse, hormones rise and fall, drugs enter the body and leave. So instead of , biologists write how things change:

The rate at which the system changes depends on its current state. is the state, is time, and are the parameters that make this system this system. That's a differential equation. Start with the smallest one there is: .

Instrument 02 · One-line biologyWhat does dx/dt = r·x do?
x after 5 time units7.39
Doubling time1.73

The faint arrows are the rule itself: at every height, the slope the curve must have there. The curve has no choice but to follow them.

GrowthCells dividing with nothing to stop them.

You just discovered exponential growth and decay. The solution is . Positive : an infection doubling. Negative : a drug being cleared from the blood, halving at a fixed rate.

Where does x₀e^{rt} come from?

Separate the variables: . Integrate both sides: . Exponentiate: . Doubling time is ; half-life is .

Assumptions hiding here: the rate is constant, nothing else interacts with x, and x is large enough to treat as continuous. Every one of these breaks somewhere in real biology.

03Dynamical systems · the phase portrait✓ cleared

The moment biology becomes interesting

Real biology rarely has one variable. Take two: a disease population and an immune population . The disease grows; the immune system kills it; the disease fights back:

The term means the two interact. The system is coupled: change one and you change the other. Now stop looking at curves over time. Put on one axis and on the other. Every point is a possible state of the patient, and the equations draw an arrow at each one: the direction the patient will move next. That's a phase portrait.

Instrument 03 · Phase portraitWhere does a patient starting here end up?

Click anywhere to start a patient there.

disease T(t)immune I(t)tipping boundary
Two fatesThe dashed line splits the map. Start patients on both sides.

The dots where nothing changes are equilibria. Two are stable, like valleys: the disease controlled (top left) or the disease escaped (bottom right). The third, in between, is a saddle: balanced like a marble on a ridge. The dashed line through it is the boundary between the two futures. Two patients can start a hair apart, on opposite sides of it, and end up in completely different places. You can understand every term locally and still be surprised by the whole system.

04Dynamical systems · the biological marble✓ cleared

Valleys, ridges and tipping points

Strip the idea to one dimension. A stable state is a valley: nudge the system and it rolls back. An unstable state is a hilltop. The shape of the landscape is set by the biology. Turn up the feedback strength and watch the landscape reshape itself. Then drag the marble.

Instrument 04 · The biological marbleWhat happens if the system is pushed far enough?
Stable states2
Marble is inState A
Two valleysDrag the marble over the ridge into the other valley.

That jump is the intuition behind a tipping point. Below a certain feedback strength there's one stable state; above it, two appear. Dynamical-systems theory calls that a bifurcation, and medicine is full of them: a fever that breaks, an infection that suddenly takes hold, a heart rhythm that flips.

05Inverse problems · guess the hidden system✓ cleared

Now make the problem unfair

So far we cheated. We knew the equations, the variables and the parameters. Real medicine gives you only the measurements , while the true state stays hidden:

The first equation is the hidden system. The second is what you actually see, plus noise . You know . You don't know , or all of . You have to reason backward. A forward problem goes model → predictions. An inverse problem goes observations → possible models. It's like hearing clink… clink… clink from inside a box and trying to work out the shape of the object.

Instrument 05 · Guess the hidden systemWhich model produced these measurements?
Fit error Σ(y − ŷ)²—
Models tried0 of 3
Five measurementsPick a model. It will be fitted to the white dots as well as it possibly can.
Wait — why can two models fit the same data?
Five points in a short window only pin down how the system behaves in that window. Any model flexible enough to bend through them fits. The models disagree about what happens after, which is exactly what you didn't measure. That's why "it fits" is the start of a scientific argument, not the end.

What does "fits as well as it possibly can" even mean? If the model predicts and you measured , add up the squared misses and find the parameters that make that total smallest:

That's optimization, and it turns fitting into geography: every parameter choice is a spot on a map, and the error is the height. Do it by hand first.

Instrument 05b · The error landscapeCan you find the bottom of the valley?
Your error E(θ)—
Best possible—
What is an inverse problem, really?

Beginner: you see the effect and try to infer the cause. Picture: observed data → hidden system. Math: , solve for and .

Deep dive: Hadamard called a problem well-posed if a solution exists, is unique, and depends continuously on the data. Inverse problems routinely fail all three. The toolkit for that: regularization (Level 11), Bayesian inverse problems and posterior distributions (Level 07), and the distinction between structural identifiability (could perfect data determine θ?) and practical identifiability (can your real, noisy, finite data?) (Level 06).

06Inverse problems · identifiability✓ cleared

Two explanations, one measurement

Suppose two processes both push the output up: . You measure and . Can you determine ? You only ever learn . and fit identically. A parameter is identifiable if your observations contain enough information to determine it, within the model's assumptions. Try.

Instrument 06 · The identifiability trapCan you determine a?
A valley, not a pitThe bottom of this landscape is a whole line. Auto-fit a few times and compare the answers.
You cannot recover information your measurements never contained.

This isn't a failure of optimization or of artificial intelligence. It's an information problem. The fix is a different measurement, one that sees on its own, not a cleverer algorithm.

Wait — why can't we just collect more data?
More of the same kind of measurement only pins down more precisely. The valley gets narrower but stays a line. You need data that depends on and differently. In medicine that might mean a second biomarker, a different time point, or a deliberate perturbation, like a test dose.
07Bayesian inference · watch Bayes learn✓ cleared

Bayes enters the hospital

Real measurements are noisy: . There's no exact curve, only evidence. So the question changes from "what is the answer?" to "which explanations are plausible, and how uncertain are we?" That's what Bayes' theorem is for:

Here's a real use. A patient got a drug. You want its elimination rate (how fast their body clears it), because that sets their dose. Concentration falls as , but each blood test is noisy. Start with a wide belief about , then draw blood.

Instrument 07 · Watch Bayes learnHow does belief sharpen with each blood test?
earlier beliefscurrent belief about ktrue k (hidden)
blood tests90% predicted range
StageBefore data
Best estimate of k—
90% credible interval—
Implied half-life—
Before dataThis wide curve is everything you believe before measuring: k could be almost anything between 0.05 and 1.2 per hour.

Each test narrows the belief. Turn the noise up and it narrows more slowly, and sometimes a noisy test even shifts it the wrong way for a while. The output isn't a single magic number; it's a distribution of possibilities, and the haze around the concentration curve is that uncertainty, carried forward into a prediction.

Mathematical medicine doesn't always eliminate uncertainty. Sometimes its job is to represent uncertainty honestly.
Wait — why do we need probability?
Because with noise, many values of k are consistent with what you saw, just not equally. A single "best fit" throws away how much the data actually constrain the answer. Probability keeps that information, and you need it to make a decision like a dose, where being wrong in one direction is worse than in the other.
08Measurement design · the perfect experiment✓ cleared

The geometry of measurement

Shine a light on a 3D object and you get a 2D shadow. The shadow contains information, but not everything, and different objects can cast the same shadow. Measurements work the same way: a full state is mapped to observations with . So a new question appears: which shadow should you look at?

Below is a hidden system: four compartments that exchange a substance along the lines, like four connected organs. You have three sensors. Each one records its compartment six times. Place them, then run the experiment and see how well you can reconstruct all four hidden starting values.

Instrument 08 · Design the measurementWhere should you measure?

Sensors left: 3. Click a compartment to add a sensor; you can stack more than one on the same spot.

Reconstruction · true vs estimate ± uncertainty
Total uncertainty
No experiment yetPlace three sensors and press Run.

Did you try opposite corners? It feels balanced, and it's a trap. The network is symmetric, so and affect both corners identically, and their difference casts no shadow at all. The math that measures this is called Fisher information; the field is optimal experimental design.

Sometimes the most powerful question isn't "what should we infer from the data?" It's "what data should we collect in the first place?"
How the reconstruction is computed

The compartments follow , so . A sensor on node at time reads row of dotted with , plus noise. Stack every reading into . With a Gaussian prior, the posterior covariance is . The bars show the square roots of its diagonal. Directions with are invisible: the data never touch them, and the uncertainty there stays at the prior.

09Nonlinearity · find the tipping point✓ cleared

Now introduce the monster: nonlinearity

In , growth looks exponential when is small and stalls as nears . One system, different regimes. That's nonlinearity, and it brings multiple equilibria, oscillations, tipping points, and hysteresis: memory.

Below, a system feels an outside stress . The lavender curve shows every equilibrium for every stress level: a bifurcation diagram. Drag the yellow line slowly from one side to the other and back. Watch the coral dot, the actual system.

Instrument 09 · Bifurcation diagramDoes the system come back the way it left?
Equilibria at this stress1
System state x—
Jumps seen0
Low branchSlide the stress up past the fold.

Up past the low branch simply ends, and the system has to leap to the high one. Coming back, it doesn't drop at the same place; it holds on until . Same stress, two possible states, and which one you're in depends on history. Removing the cause doesn't always undo the effect.

You aren't merely changing a number. You're changing the structure of the system's possible futures.
Wait — why can a tiny parameter change create a huge outcome?
At a fold, a stable state and an unstable one collide and annihilate (exactly here). Just before, the valley holding the system is shallow; just after, it doesn't exist. The change in is tiny; the change in the landscape is total.
10Control & personalization · two patients✓ cleared

One disease, two mathematical worlds

Until now mathematics watched. Control theory asks: what if we change the system? In , is now a dose we choose. Measure, estimate, intervene, measure again. Here are two patients with the same diagnosis and the same first scan: 40% tumor burden. Same equations:

Only their parameters differ: tumor growth rate and drug sensitivity . Choose a schedule. All three give the same total amount of drug.

Instrument 10 · Virtual patientsSame diagnosis. Same treatment?

Patient A

r = 0.08/day · k = 0.16/day

Patient B

r = 0.15/day · k = 0.24/day
tumor burden under treatmentuntreateddoses

That's the mathematical intuition behind personalized medicine: the equations may share a structure, but different parameters make different trajectories, and different best interventions. Estimate from one person's data and you have a patient-specific model: a hypothesis about how this person's system behaves.

A model is not a crystal ball

Here's Patient B's predicted burden at day 84 under each schedule. Clean bars invite you to say "the computer knows which treatment works". But we never know and exactly. Switch on the uncertainty.

Instrument 10b · Crystal ballHow sure is that ranking?
Point predictionsThree neat numbers. Now turn on the uncertainty in Patient B's parameters (growth ±15%, sensitivity ±25%).

The model depends on its assumptions, its equations, its parameters, the quality of its measurements, the variables it includes and the ones it ignores, and whether it still holds outside the conditions it was built in. A model is an instrument for reasoning, not reality itself.

11Ill-posed problems · regularization✓ cleared

Mathematics refusing to overreact

Try to estimate 50 parameters for one person from 10 measurements and you've made a monster: more unknowns than information. That's an ill-posed inverse problem. A solution may not exist, may not be unique, or may swing wildly when the data change slightly. More mathematical sophistication doesn't automatically create more information. One defense:

The first term says fit the data. The second says don't choose ridiculous solutions. sets the balance. Below, ten noisy measurements from one patient. Give the model more freedom and see whether it gets better at predicting new patients.

Instrument 11 · OverfittingDoes hugging every point make better predictions?
Error on these measurements—
Error on new measurements—
Simple modelCrank the flexibility to the maximum.

The best model isn't the one that hugs every data point. It balances evidence against complexity: Occam's razor, written as math. And a model can be wrong in two different ways. Wrong parameters: better data fixes it. Wrong structure: the equations themselves are wrong, and no amount of fitting can save it. You can have a tiny fitting error and still a biologically misleading model. That's why validation matters.

Wait — why doesn't a perfect fit mean a correct model?
With ten parameters and ten points, a polynomial can pass through every point exactly, including through the noise. The training error hits zero precisely because the model memorized the measurement errors. On a new patient, those memorized errors are wrong, and the predictions swing wildly between the points.
12Mechanism vs. machine learning✓ cleared

Black box vs. glass box

A machine-learning model learns measurements → prediction from huge datasets. A mechanistic model encodes biological mechanism → dynamics → observations. They answer different questions, and modern computational medicine increasingly uses them together.

Instrument 12 · Which would you trust?Same patient, two kinds of model.

Black box

Trained on 10,000 patients and millions of measurements.
83%
chance this patient responds to Drug X

Glass box

parameter: drug sensitivity k = 0.24/day↓mechanism: kill ∝ D/(D+0.6)↓dynamical state: burden rises 40% → 45% on the standard schedule↓predicted outcome: poor response; try denser dosing

Which would you trust more?

Wait — why can't AI simply learn everything?
A learned model is only as good as the situations in its training data. Change the drug, the population, or the hospital's measuring equipment, and it can fail silently, still printing a confident number. A mechanistic model can reason about new situations, but only if its mechanism is right. Neither escapes the need to check predictions against reality.
13Multiscale · the impossible diagram✓ cleared

Descend through a human being

A body can be modeled at many scales: molecules, cells, tissues, organs, physiology, the whole patient. The scales talk to each other in both directions. That's a multiscale system, and connecting models across its levels, with honest uncertainty at each one, is one of the frontiers of systems biology. Zoom down through the levels and open any node.

Instrument 13 · The impossible diagramWhat's measurable, and what's hidden, at each scale?

This is where the buzzword arrives: a digital twin, a computational model linked to one real person and updated as new data come in. Patient-specific 3D anatomy models already help surgeons plan operations; research is exploring "virtual patients" for testing treatment strategies. But a digital twin is not a perfect copy of a human. It's a model, and models have boundaries. The real question is how much useful information about one person can be encoded in a model, and how reliably that model can support a decision.

A probability is not meaningful in isolation.

If the model says , that's not an 82% chance reality behaves exactly as predicted. It's a probability according to this model, given this evidence, under these assumptions. Time to see that for yourself.

14Boss level · you are the mathematician✓ cleared

You are the mathematician

A fictional patient has a growing tumor. Treatment starts on day 30. You have 5 measurements, a choice of 3 models, 2 drugs, and one question at the end: how confident are you? There's no single score. You get a dashboard.

Instrument 14 · Patient #1Days 0–30 untreated · predict day 90
1 · Which days do you scan?Budget: 5 scans left
2 · Which model?Each is fitted to your scans.
3 · Which drug?Simulated from day 30 to 90 with your model
4 · How confident are you that your drug is the better one?60%

The final paradox

Can mathematics tell us what's happening inside a patient? Sometimes. But the more interesting discovery: mathematics doesn't make the invisible visible by magic. It gives you a structured way of reasoning about it. You observe, model, infer, simulate, test, collect better data, revise, and repeat.

Differential equations describe change. Dynamical systems describe behavior. Optimization estimates parameters. Probability describes uncertainty. Bayesian inference updates beliefs. Identifiability says what the data can actually reveal. Control theory asks how interventions alter trajectories. Multiscale modeling connects levels of biology. Machine learning finds patterns. Mechanistic modeling encodes hypotheses about causes. Personalized modeling asks whether all of it can be brought together for one person.

That direction is easy. The reverse is the whole field:

A hundred years from now a doctor might ask a patient's model "what happens if we perturb this system?" and watch thousands of simulated futures. The fundamental question will remain: how do we know the model is describing the person, rather than our assumptions about the person? That's a medical question, a mathematical one, a philosophical one, and finally a question about the limits of knowledge.

?
You measured the patient. You built the equations.
You estimated the parameters. You simulated the future.
What, exactly, have you learned?
∞Debrief

How did your gut do?

Medicine is fundamentally an inference problem: the variables we care about are often hidden, the measurements we get are incomplete, and mathematics is the machinery we use to reason backward from observable consequences to invisible mechanisms.

Further reading: Kirk, Thorne & Stumpf, "Model selection in systems and synthetic biology", Curr. Opin. Biotechnol. (2013); Raue et al., "Structural and practical identifiability analysis", Bioinformatics (2009); Stuart, "Inverse problems: a Bayesian perspective", Acta Numerica (2010); Laubenbacher et al., "Building digital twins of the human immune system", npj Digital Medicine (2022). All models on this page are illustrative teaching models, not clinical tools.