Module 40 of 47Lesson 1 of 9 · HL · Differential equations 1 · What a differential equation is, and how to build one
1
Differential equations · Essential understanding 1

What a differential equation is, and how to build one

IB AI AHL 5.14with Prof. Kitso
💻 Using the TI-Nspire CX Student Software on a laptop
  • The screens in these notes are drawn exactly as the Student Software shows them. The keypad on the left of the software works like the handheld — click its keys with the mouse.
  • menu: click menu on the on-screen keypad (or Documents Toolbox ▸ 🔧). The menu numbers and letters are the same as in these notes.
  • enter = Enter  ·  tab = Tab (next box)  ·  esc = Esc  ·  del = Backspace.
  • Powers: type ^ (Shift+6), the power, then press → to come back down before typing more. x² = ^2 then →.
  • Fraction: type /  ·  √: type sqrt(  ·  π: type pi  ·  eˣ: type exp(  ·  store: type :=. For EE (×10ⁿ) and i, click them on the keypad.
  • New page: Ctrl+I (or the Insert menu)  ·  change page: Ctrl+← / Ctrl+→  ·  graph entry line: Ctrl+G  ·  var: Ctrl+L.
  • Radian / Degree: click Settings in the status bar at the bottom of the window. The mode (RAD or DEG) shows in the top bar.
  • IB exam mode (Press-to-Test): everything in these notes works on the non-CAS TI-Nspire with the IB exam settings. In exam mode there are no dot-product, cross-product, unit-vector or eigenvalue keys and no Diff Eq graphs — the notes show the allowed way (type the components, use polyRoots on the characteristic equation, do Euler steps on a Calculator page).
  • If you type nDeriv(, the software shows it as centralDiff( — it is the same command.
The big idea: A differential equation is an equation that contains a rate of change such as . It describes how something changes. Solving it means finding the function that changes in that way.
By the end of this lesson you can:
  • turn a sentence about a rate of change into a differential equation
  • check that a given function is a solution by substituting it in
  • find a general solution (with a constant) and a particular solution (using a boundary condition)
  • solve by integrating directly
🧑🏾 Imagine this…
A tank at a lodge in Maun is leaking. You do not know a formula for the water in the tank, but you do know a rule: “the more water in the tank, the faster it leaks”. A rule about how fast something changes is exactly what a differential equation is. If is the volume in litres and is time in minutes, the rule can be written . The minus sign says the volume is going down.
Differential equation (DE)
an equation involving a derivative, such as or .
First order
the highest derivative is the first derivative, . (Lesson 8 meets second order.)
Solution
a function that makes the equation true for every value of the variable.
General solution
the solution with an unknown constant such as . It is a whole family of curves.
Boundary (initial) condition
a known point such as when . It fixes the constant and gives one curve, the particular solution.
★ Setting up a model
  • “Rate of change of ” means . “Proportional to” means “equals a constant times”.
  • “Proportional to ”: . Growth has , decay has (or write with ).
  • “Proportional to the difference between and the surroundings ”: .
  • Rate in minus rate out: .
  • Always check units and signs. Something that is falling needs a negative rate.
★ Checking and finding solutions
  • To check a solution: differentiate it, then substitute and into the DE. Both sides must match.
  • To solve : integrate both sides, .
  • Use the boundary condition after integrating, to find .
⚠️ Mistakes that lose marks
  • Do not forget the + c. Without it you have only one curve, not the general solution.
  • “Increases at a rate proportional to ” is , not . The rate is the derivative.
  • When checking a solution, substitute into both sides. Show the left side, show the right side, then say they are equal.
Prof. Kitso says
Do not be scared of the name. “Differential equation” just means “a rule for how fast something changes”. Every question in this unit has the same two steps: write the rule, then find the function that obeys it. Marks are given for both.
🧪 Try it yourselfTry it: coffee cooling in a room
The coffee follows in a room at 20 °C, and its solution is . Drag (how much hotter than the room it starts) and . Use the tangent slider: the gradient shown always equals . Try , from Example 1.5.

Worked examples

Example 1.1Write the differential equation
Write a differential equation for each situation. Define every letter you use.
(a) The number of crocodiles in a river grows at a rate proportional to the number present.
(b) A cup of tea in Kasane at temperature cools at a rate proportional to the difference between and the room temperature of 22 °C.
(c) A savings account with pula in it earns interest at 5% per year and P2400 is withdrawn each year.
🧠 Think it through
  1. Name the variable that changes and the variable it changes with (usually time ).
  2. Write for “rate of change of”, then build the right side from the words.
  3. Decide the sign: is the quantity going up or down?
✍️ By hand
(a) , where is a constant and is time in years.
(b) The tea is hotter than the room, so it is falling: , where and is in minutes.
(c) Interest adds per year and withdrawals take away 2400: , with in years.
✅ Answer (a) . (b) . (c) .
In (b), if you wrote with the tea would heat up forever. Check the sign by asking: should the rate be positive or negative at the start?
Example 1.2Check a given solution
Show that is a solution of the differential equation .
🧠 Think it through
  1. Differentiate to get .
  2. Work out the left side using both.
  3. Simplify and compare with the right side.
✍️ By hand
LHS RHS ✓
✅ Answer LHS , which equals the RHS, so is a solution.
The command term “show that” needs every line of working. Notice the terms cancel exactly; if yours do not, look for a slip.
Example 1.3Solve by direct integration with a boundary condition
A curve has gradient and passes through the point .
  1. (a) Find the general solution.
  2. (b) Find the particular solution.
  3. (c) Find when .
🧠 Think it through
  1. The right side has no in it, so just integrate with respect to .
  2. Add . Then put , into the result to find .
✍️ By hand
(a)
(b) , so and
(c)
🔢 On your TI-Nspire CX II
  1. Check (c) on a Calculator page: type 2*2^3-2*2^2+5 enter ↵💻 Enter.
    1.1*DocRAD2·23−2·22+513
✅ Answer (a) . (b) . (c) .
General solution = a family of curves. The point picks out exactly one of them.
Example 1.4A growth model with a limit
The height cm of a young tree in the Okavango grows at the rate , where is the time in years since it was planted. When the height is 40 cm.
  1. (a) Find an expression for in terms of .
  2. (b) Find the height after 4 years.
  3. (c) What happens to the height in the long run?
🧠 Think it through
  1. Integrate : the integral of is .
  2. Use at to find .
  3. For the long run, let get very large: .
✍️ By hand
(a)
, : , so and
(b) cm
(c) As , , so cm.
🔢 On your TI-Nspire CX II
  1. For (b) type 64-24*e^(-2) enter ↵💻 Enter.
    1.1*DocRAD64−24·e-260.752
✅ Answer (a) . (b) 60.8 cm. (c) The height approaches 64 cm.
A limit like 64 cm is called a horizontal asymptote. Say what it means in context: the tree never grows taller than about 64 cm in this model.
Example 1.5Newton's law of cooling (exam style)
A hot drink at temperature in a room at 20 °C cools according to , where is in minutes and . At the drink is at 80 °C, and after 5 minutes it is at 50 °C.
  1. (a) Show that is a solution of the differential equation.
  2. (b) Find and the exact value of .
  3. (c) Find the temperature after 10 minutes.
  4. (d) Find how long it takes to cool to 25 °C.
🧠 Think it through
  1. (a) Differentiate , then show it equals .
  2. (b) Use for , then to get an equation for . Take of both sides.
  3. (c), (d) Substitute your . Keep the exact value in your calculator memory.
✍️ By hand
(a) . Also , so . The two sides are equal ✓
(b) , so . Then , so and , giving
(c) °C
(d) , so and minutes
🔢 On your TI-Nspire CX II
  1. Type ln(2)/5 enter ↵💻 Enter and store it with ctrl💻 Ctrl var💻 Ctrl+L ▸ k. Then type 20+60*e^(-10*k) and ln(12)/k.
    📍 Where to find it on the TI-Nspire
    ⌨️ ln: ctrl then eˣ on the keypad, or type ln(
    1.1*DocRADln(2)5→k0.13862920+60·e-10·k35.ln(12)k17.9248
✅ Answer (b) , . (c) 35 °C. (d) 17.9 minutes.
Half of the 60 °C excess disappears every 5 minutes: 60 → 30 → 15. That is why 35 °C appears after 10 minutes. Spotting a pattern like this is a great check.

Challenge questions

⭐ Challenge 1.6Decay of a samplePaper 1 style
The mass grams of a radioactive sample decreases at a rate proportional to .
  1. (a) Write down a differential equation for in terms of time (in days), using .
  2. (b) Show that is a solution.
  3. (c) Initially and after 3 days . Find and the half-life of the sample.
✏️ Try it on paper and on your calculator first. Then check.
Show the full solution
🧠 Think it through
  1. “Decreases” means a minus sign.
  2. Differentiate and compare with .
  3. Half-life: the time for to fall to half. Solve .
✍️ By hand
(a)
(b) ✓
(c) . Then , so and . Half-life days.
🔢 On your TI-Nspire CX II
  1. Type ln(8/5)/3 enter ↵💻 Enter for , then ln(2)/ans for the half-life.
    📍 Where to find it on the TI-Nspire
    ⌨️ ln: ctrl then eˣ on the keypad, or type ln(
1.1*DocRADln8530.156668ln(2)ans4.42431
✅ Answer (a) . (b) shown. (c) per day, half-life 4.42 days.
⭐ Challenge 1.7A cyclist on a training ridePaper 2 style
Kagiso is riding along a straight road near Francistown. Her speed m s−1 at time seconds satisfies , for . When , and she is at the start line (distance ). Distance satisfies .
  1. (a) Find an expression for in terms of .
  2. (b) Find her speed after 5 seconds.
  3. (c) Find when her speed is greatest, and that greatest speed.
  4. (d) Find an expression for , and her distance from the start line when her speed is greatest.
✏️ Try it on paper and on your calculator first. Then check.
Show the full solution
🧠 Think it through
  1. Integrate once for , using .
  2. Greatest speed: acceleration .
  3. Integrate to get , using .
✍️ By hand
(a) . With : , so .
(b) m s−1.
(c) when , so s. Then m s−1.
(d) , and gives . So m.
🔢 On your TI-Nspire CX II
  1. Check (d) by typing 2*15+3*15^2-15^3/15 enter ↵💻 Enter.
1.1*DocRAD2·15+3·152−15315480
✅ Answer (a) . (b) 27 m s−1. (c) s, m s−1. (d) ; 480 m.
Next: Lesson 2 · Separation of variables