Separation of variables and initial conditions

Lessons and exercises follow the school system and stay in its language.Les leçons et les exercices suivent le système scolaire et restent dans sa langue.Lektionen und Übungen folgen dem Schulsystem und bleiben in seiner Sprache.

About this lesson

Calculus AB (AP-aligned) › Differential equations

To save a PDF, choose “Save as PDF” in the print dialog.

Sources and credits

Written with this source as a starting point:

sedifier rewrote the text and added its own examples and exercises.

Written with AI assistance; every answer is checked by our math engine. Not yet reviewed by a teacher.

This lesson: CC BY-SA 4.0, © sedifier · All credits

Separation of variables and initial conditions

Differential equations.

Warm-up

Three quick questions from earlier lessons.

  1. Find FF with F′(x)=2xcos⁡(x2)+3F'(x) = 2x\cos(x^2) + 3 and F(0)=0F(0) = 0.
  2. Find FF with F′(x)=x ex2F'(x) = x\,e^{x^2} and F(0)=3F(0) = 3.
  3. Find FF with F′(x)=(5x+2)2F'(x) = (5x + 2)^{ 2 } and F(0)=0F(0) = 0.

Discover

To solve dydx=2xy\dfrac{dy}{dx} = 2xy, Ana integrates both sides with respect to xx and writes y=x2y+Cy = x^2 y + C. Why is that not a solution method?

  1. yy is not a constant: the variables must be separated first
  2. It is fine, it just needs a value for CC

Key idea

Gather each variable with its own differential.

Separable equation dydx=g(x)h(y)\dfrac{dy}{dx} = g(x)h(y): write dyh(y)=g(x) dx\dfrac{dy}{h(y)} = g(x)\,dx, integrate both sides (one constant CC), solve for yy, then use the initial condition to find CC.

Worked example

Solve dydx=2xy\dfrac{dy}{dx} = 2xy with y(0)=3y(0) = 3.

dyy=2x dx\dfrac{dy}{y} = 2x\,dx
Separate.
ln⁡∣y∣=x2+C\ln|y| = x^2 + C
Integrate.
y=3ex2y = 3e^{x^2}
Exponentiate: y = Ae^{x²}; y(0) = 3 gives A = 3.

Your turn, guided

Your turn: dydx=3y\dfrac{dy}{dx} = 3y, y(0)=2y(0) = 2.

y=2e3xy = 2e^{3x}
ln|y| = 3x + C, so y = Ae^{3x}.

Practice ★

  1. Solve dydx=4xy\dfrac{dy}{dx} = 4xy with y(0)=5y(0) = 5.
  2. Solve dydx=4xy\dfrac{dy}{dx} = 4xy with y(0)=9y(0) = 9.
  3. Solve dydx=4xy\dfrac{dy}{dx} = 4xy with y(0)=2y(0) = 2.

Watch out!

Practice ★★

  1. Solve dydx=xy\dfrac{dy}{dx} = \dfrac{x}{y} with y(0)=8y(0) = 8 (so y>0y > 0). Give yy in terms of xx.
  2. Solve dydx=xy\dfrac{dy}{dx} = \dfrac{x}{y} with y(0)=6y(0) = 6 (so y>0y > 0). Give yy in terms of xx.
  1. Solve dydx=y2\dfrac{dy}{dx} = y^2 with y(0)=13y(0) = \dfrac{1}{ 3 }.

Exit ticket

Three questions to check you have got it.

  1. Solve dydx=4xy\dfrac{dy}{dx} = 4xy with y(0)=5y(0) = 5.
  2. Solve dydx=4xy\dfrac{dy}{dx} = 4xy with y(0)=9y(0) = 9.
  3. Solve dydx=4xy\dfrac{dy}{dx} = 4xy with y(0)=2y(0) = 2.

Summary card

Separation of variables

  1. dyh(y)=g(x) dx\dfrac{dy}{h(y)} = g(x)\,dx.
  2. Integrate both sides, one +C+C.
  3. Solve for yy; use the initial value.

Watch out: ex+C=Aexe^{x + C} = Ae^x, not ex+Ce^x + C.

One more step is optional: a challenge. Try it, or finish the lesson now.

Challenge ★★★

  1. Solve dydx=−xy\dfrac{dy}{dx} = -\dfrac{x}{y} with y(0)=3y(0) = 3 (so y>0y > 0). Give yy in terms of xx.
Sources and credits

Written with this source as a starting point:

sedifier rewrote the text and added its own examples and exercises.

Written with AI assistance; every answer is checked by our math engine. Not yet reviewed by a teacher.

This lesson: CC BY-SA 4.0, © sedifier · All credits