Differential equations and numerical solutions
Introduced| English | Meaning |
|---|---|
| differential equation/ˌdɪfəˈrenʃl ɪˈkweɪʒn/ | An equation involving a function and one or more of its derivatives. |
| initial condition/ɪˈnɪʃl kənˈdɪʃn/ | A specified starting value used to determine a particular solution of an equation or model. |
| Euler's method/ˈɔɪləz ˈmeθəd/ | A step-by-step numerical method for a differential equation that moves along the gradient for a small step h at a time. |
Newton's law of cooling, 1701
- In 1701 Isaac Newton published, anonymously, a rule for how hot iron cools: the rate of cooling is proportional to the difference between its temperature and the surroundings. Forensic scientists still use the same model to estimate time of death from body temperature.
- A rule about a rate is a differential equation 微分方程. Solving it with an initial condition 初始条件 gives the function; when no formula is possible, Euler's method 欧拉法 builds an approximate solution step by step.
In Newton's law of cooling, the cooling rate is proportional to
Difficulty 1/5 · 100 coins + a small bonus on first completion today
dT/dt = −k(T − Tₛ).
Setting up a model
- "Rate proportional to amount": $\dfrac{dy}{dt} = ky$. Cooling: $\dfrac{dT}{dt} = -k(T - T_s)$.
- Read every word of the context: what is the variable, what is the rate, what is the sign?
"A population grows at a rate proportional to its size" gives
Difficulty 1/5 · 100 coins + a small bonus on first completion today
Rate proportional to amount.
Separating variables
- Write $\dfrac{dy}{dx} = f(x)g(y)$ as $\displaystyle\int \frac{dy}{g(y)} = \int f(x)\,dx$, then use the initial condition to find $C$.
Differential equations and numerical solutions
For dy/dx=ky, separate variables: dy/y=k dx, giving y=Ae^(kx)
Compare the model with the worked case and explain one change.
Solve dy/dx = 2xy with y(0) = 3.
Difficulty 1/5 · 100 coins + a small bonus on first completion today
ln y = x² + C.
Euler's method
- $y_{n+1} = y_n + h\,f(x_n, y_n)$, $x_{n+1} = x_n + h$. Smaller steps give better accuracy.
- For a curve that bends upward, Euler underestimates.
dy/dx = x + y, y(0) = 1, h = 0.1. Find y₁.
Difficulty 2/5 · 140 coins + a small bonus on first completion today
1 + 0.1 × 1.
Worked example: cooling coffee
Coffee at $90°$C in a $20°$C room: $\dfrac{dT}{dt} = -k(T - 20)$, and after 10 minutes it is $60°$C.
- Separate: $\int \dfrac{dT}{T - 20} = \int -k\,dt \Rightarrow \ln(T - 20) = -kt + C$, so $T = 20 + 70e^{-kt}$ using $T(0) = 90$.
- Find $k$: $60 = 20 + 70e^{-10k} \Rightarrow e^{-10k} = \tfrac47$, $k = \tfrac{1}{10}\ln\tfrac74 \approx 0.0560$.
- When is it $40°$C? $e^{-kt} = \tfrac27 \Rightarrow t = \dfrac{\ln 3.5}{0.0560} \approx 22.4$ minutes.
In the coffee example, find k to 4 d.p.
Difficulty 2/5 · 140 coins + a small bonus on first completion today
ln(7/4)/10 ≈ 0.05596.
An Euler step
- For $\dfrac{dy}{dx} = x + y$, $y(0) = 1$, $h = 0.1$: $y_1 = 1 + 0.1(0 + 1) = 1.1$; $y_2 = 1.1 + 0.1(0.1 + 1.1) = 1.22$. The exact value $y(0.2) = 2e^{0.2} - 1.2 \approx 1.2428$ is higher.
For a solution curve that bends upward, Euler's method underestimates.
Difficulty 1/5 · 100 coins + a small bonus on first completion today
Each tangent step falls below the curve.
A general solution is not the answer. $T = 20 + Ae^{-kt}$ describes every cooling cup. Use the initial condition and the second data point to fix the constants.
T = 20 + Ae^(−kt) is a complete answer without finding A and k.
Difficulty 1/5 · 100 coins + a small bonus on first completion today
Use the conditions.
Translate rate statements into differential equations. Separate variables, integrate, and use initial conditions to find constants. When no formula exists, use Euler's method $y_{n+1} = y_n + hf(x_n, y_n)$, knowing that smaller steps improve accuracy.
A bacteria culture doubles every 3 hours. Write and solve a differential equation for N(t) with N(0) = 500, and find N after 10 hours.
Model, solve, predict.