Grade by GradeEssential student suppliesSign in
C. Content · Calculus 12: Functions, Limits, Derivatives, Integrals and Their Applications

Differential 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 example

Example 1: An IVP

Solve dy/dx = 6x^2 - 2 with y(1) = 5.

  1. Integrate: y = 2x^3 - 2x + C.
  2. Use y(1) = 5: 2 - 2 + C = 5, so C = 5.
  3. Check: y' = 6x^2 - 2 ✓ and y(1) = 5 ✓

y = 2x^3 - 2x + 5

Worked example

Example 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.

  1. v(t) = ∫ -9.8 dt = -9.8t + C1. v(0) = 15, so v(t) = -9.8t + 15.
  2. s(t) = ∫ (-9.8t + 15) dt = -4.9t^2 + 15t + C2. s(0) = 2, so s(t) = -4.9t^2 + 15t + 2.
  3. Highest point when v = 0: t = 15/9.8 ≈ 1.53 s.
  4. 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 example

Example 3: Separating variables

Solve dy/dx = xy with y(0) = 3.

  1. Separate: (1/y) dy = x dx.
  2. Integrate: ln|y| = x^2/2 + C, so y = Ae^(x^2/2) for a constant A.
  3. y(0) = 3 gives A = 3.
  4. Check: y' = 3e^(x^2/2) · x = xy ✓

y = 3e^(x^2/2)

Worked example

Example 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).

  1. This is dP/dt = kP with k = 0.03, so P(t) = 1200e^(0.03t).
  2. P(10) = 1200e^(0.3) ≈ 1200(1.34986).

About 1620 cells

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 - y01-101-2
Some slopes for dy/dx = x - y. Along the line y = x every slope is 0.
xy-2-1123-2-1123(0, 1)
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 example

Example 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.

  1. (a) Slope 0 where x - y = 0: along the line y = x.
  2. (b) y = x - 1 gives y' = 1, and x - y = x - (x - 1) = 1 ✓
  3. (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 activity

Draw 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 fun

Newton 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

1

Show that y = e^(3x) solves y' = 3y.

2

Solve dy/dx = cos x with y(0) = 2.

3

Solve dy/dx = 1/x (x > 0) with y(1) = 4.

4

Solve dy/dx = 2y with y(0) = 5.

5

For dy/dx = x - y, find the slope at (2, -1).

6

A particle has a(t) = 6t, v(0) = -3 and s(0) = 1. Find s(t).

More practice

1

Solve dy/dx = x/y with y(0) = 2 (y > 0).

2

A 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).

3

A 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.

4

In a slope field, the slopes are the same all along every vertical line. Which form must the equation have?

5

Is y = x^2 a solution of x(dy/dx) = 2y?

Check your understanding

Quiz

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 teachers

How 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.