C. Content · Calculus 12: Functions, Limits, Derivatives, Integrals and Their ApplicationsDifferential Equations, Initial Value Problems and Slope Fields
BC CALC 12: slope fields BC CALC 12: integrationAbout 75 minutes
Learning goals- I can check whether a function solves a differential equation.
- I can solve initial value problems, including motion problems, by integrating.
- I can solve simple separable differential equations, including exponential growth and decay.
- I can sketch and read a slope field.
Words to know
differential equation
An equation that involves a derivative, such as dy/dx = 3x^2 or dP/dt = 0.03P.
general solution
The family of all solutions, written with a constant C.
initial value problem (IVP)
A differential equation together with a starting value, such as y(0) = 4, that picks out one particular solution.
separable equation
A differential equation that can be written as dy/dx = g(x)h(y), so the x's and y's can be separated.
slope field
A grid of short line segments whose slopes are given by the differential equation at each point.
What is a differential equation?
A differential equation links a function to its derivatives. Many laws of nature are written this way, because it is often easier to describe how something changes than to describe the thing itself.
A solution is a function that makes the equation true. To check, substitute it in. For example, y = e^(3x) solves dy/dx = 3y, since dy/dx = 3e^(3x) = 3y.
Initial value problems
The simplest kind is dy/dx = f(x). Integrate to get the general solution y = F(x) + C, a family of curves. An initial condition like y(1) = 5 picks out one curve: substitute and solve for C.
Worked exampleExample 1: An IVP
Solve dy/dx = 6x^2 - 2 with y(1) = 5.
- Integrate: y = 2x^3 - 2x + C.
- Use y(1) = 5: 2 - 2 + C = 5, so C = 5.
- Check: y' = 6x^2 - 2 ✓ and y(1) = 5 ✓
Worked exampleExample 2: A ball thrown upward
A ball is thrown straight up at 15 m/s from 2 m above the ground. Gravity gives a(t) = -9.8 m/s^2 (ignore air resistance). Find v(t) and s(t), and the greatest height.
- v(t) = ∫ -9.8 dt = -9.8t + C1. v(0) = 15, so v(t) = -9.8t + 15.
- s(t) = ∫ (-9.8t + 15) dt = -4.9t^2 + 15t + C2. s(0) = 2, so s(t) = -4.9t^2 + 15t + 2.
- Highest point when v = 0: t = 15/9.8 ≈ 1.53 s.
- s(15/9.8) = 2 + 15^2/(2 · 9.8) ≈ 2 + 11.48 = 13.48 m.
v(t) = -9.8t + 15, s(t) = -4.9t^2 + 15t + 2, greatest height about 13.5 m
Separable equations and exponential models
If dy/dx = g(x)h(y), move all the y's to one side and all the x's to the other, then integrate both sides:
∫ (1/h(y)) dy = ∫ g(x) dx.
The most important case is dy/dt = ky: the rate of change is proportional to the amount. Separating gives ln|y| = kt + C, so y = y0 e^(kt), where y0 = y(0). If k > 0 it is exponential growth; if k < 0, decay.
Worked exampleExample 3: Separating variables
Solve dy/dx = xy with y(0) = 3.
- Separate: (1/y) dy = x dx.
- Integrate: ln|y| = x^2/2 + C, so y = Ae^(x^2/2) for a constant A.
- y(0) = 3 gives A = 3.
- Check: y' = 3e^(x^2/2) · x = xy ✓
Worked exampleExample 4: Growth in a lab
A model for a bacteria culture says dP/dt = 0.03P, with P(0) = 1200 cells and t in hours. Find P(10).
- This is dP/dt = kP with k = 0.03, so P(t) = 1200e^(0.03t).
- P(10) = 1200e^(0.3) ≈ 1200(1.34986).
Slope fields
For dy/dx = f(x, y), we can see solutions without solving. At each point of a grid, draw a short segment with slope f(x, y). A solution curve must follow the segments, like a leaf floating on a stream. Pick a starting point (the initial condition) and trace.
| Point (x, y) | (0, 0) | (1, 0) | (0, 1) | (1, 1) | (2, 1) | (-1, 1) |
|---|
| slope x - y | 0 | 1 | -1 | 0 | 1 | -2 |
Some slopes for dy/dx = x - y. Along the line y = x every slope is 0. The slope field for dy/dx = x - y, with the solution curve through (0, 1). That curve is y = x - 1 + 2e^(-x); it bends toward the line y = x - 1, which is itself a solution.Worked exampleExample 5: Reading a slope field
For dy/dx = x - y: (a) where are the segments horizontal? (b) Show y = x - 1 is a solution. (c) Check that y = x - 1 + 2e^(-x) passes through (0, 1) and solves the equation.
- (a) Slope 0 where x - y = 0: along the line y = x.
- (b) y = x - 1 gives y' = 1, and x - y = x - (x - 1) = 1 ✓
- (c) At x = 0: 0 - 1 + 2 = 1 ✓. y' = 1 - 2e^(-x), and x - y = x - x + 1 - 2e^(-x) = 1 - 2e^(-x) ✓
Horizontal along y = x; both functions are solutions.
Check both parts
Always check a solution by substituting it back into the differential equation and the initial condition. If either fails, find the error before going on.
Hands-on activityDraw your own slope field
On grid paper, draw axes from -3 to 3. For dy/dx = -x/y, compute the slope at each grid point with y ≠ 0 and draw a short segment there. (For example, at (1, 1) the slope is -1 and at (2, 1) it is -2.) What shapes do the solution curves make? Now solve the equation by separating variables (you should get x^2 + y^2 = C) and compare.
Just for funNewton called derivatives fluxions (flowing quantities) and stated his second law of motion in words. Written as F = m · dv/dt, it is one of the most famous differential equations ever. Weather forecasts are made by computers solving huge systems of differential equations.
Your turn
1Show that y = e^(3x) solves y' = 3y.
2Solve dy/dx = cos x with y(0) = 2.
y = sin x + C, and 0 + C = 2: y = sin x + 2.
3Solve dy/dx = 1/x (x > 0) with y(1) = 4.
y = ln x + C, and ln 1 = 0: y = ln x + 4.
4Solve dy/dx = 2y with y(0) = 5.
5For dy/dx = x - y, find the slope at (2, -1).
6A particle has a(t) = 6t, v(0) = -3 and s(0) = 1. Find s(t).
v = 3t^2 - 3, so s(t) = t^3 - 3t + 1.
More practice
1Solve dy/dx = x/y with y(0) = 2 (y > 0).
y dy = x dx gives y^2/2 = x^2/2 + C. y(0) = 2 gives y^2 = x^2 + 4, so y = sqrt(x^2 + 4).
2A model for a cooling drink: dT/dt = -0.1(T - 20), T(0) = 90 °C. The solution is T = 20 + 70e^(-0.1t). Check it, then find T(10).
T' = -7e^(-0.1t) and -0.1(T - 20) = -0.1(70e^(-0.1t)) = -7e^(-0.1t) ✓. T(10) = 20 + 70/e ≈ 45.8 °C.
3A substance decays by dA/dt = kA and half of it is gone after 5 days. Find k, and what fraction is left after 15 days.
e^(5k) = 1/2, so k = -ln 2/5 ≈ -0.139 per day. 15 days is 3 half-lives: 1/8 is left.
4In a slope field, the slopes are the same all along every vertical line. Which form must the equation have?
dy/dx = f(x) (the slope depends only on x).
5Is y = x^2 a solution of x(dy/dx) = 2y?
y' = 2x, so x(2x) = 2x^2 = 2y ✓. Yes.
Check your understandingQuiz
1. Which function solves dy/dx = 4y?
2. Solve dy/dx = 2x with y(0) = 3.
3. For dy/dx = x + y, what is the slope at (1, 2)?
4. A ball has a(t) = -9.8 and v(0) = 19.6 m/s. When is v = 0?
5. dP/dt = 0.05P with P(0) = 500. What is P(t)?
For parents and teachersHow to help: Ask your teen to check every solution by substituting it back in. For slope fields, a few points done carefully by hand are better than many done quickly.
Common mistakes:
- Forgetting + C, or finding C before integrating everything.
- In separable equations, forgetting that ln|y| = ... means y = Ae^(...).
- Drawing a solution curve that cuts across the slope segments.
- Mixing up velocity and position initial conditions.