M
Math Coach Amy
Amy Ferguson Moncure

Calculus BC ยท Unit 7

Separation of Variables

Separate the variables, integrate, and use the initial condition to choose the constant and the sign.

Jump to section:

\(\dfrac{1}{h(y)}\,dy = g(x)\,dx\)

What to Remember

Separate, then integrate both sides

Write \(\dfrac{dy}{dx}=g(x)h(y)\) as

\(\dfrac{1}{h(y)}\,dy=g(x)\,dx\)

when \(h(y)\neq 0\).

The constant can sit on either side

After integrating, solve for \(y\) if the problem asks for \(y\). Keep an implicit answer when solving for \(y\) is messier and the problem allows it.

Check a constant solution before you divide

If \(h(y)=0\) at \(y=a\), then \(y=a\) may be a solution that division would hide.

Use the initial condition after the general solution

Substitute the point into the general solution. If a square root appears, choose the sign that matches the initial \(y\).

Level 1

Easy

The equation is already a derivative in x, or it is proportional to y.

Example
Solve \(dy/dx=3y\) with \(y(0)=2\).

\(\dfrac{1}{y}\,dy=3\,dx\)

\(\ln|y|=3x+C\)

\(y=Ae^{3x}\)

\(y(0)=A=2\)

\(y=2e^{3x}\)

Answer: \(y=2e^{3x}\)

1
Solve \(dy/dx=4x^3\) with \(y(0)=1\).
Show Answer

\(y=x^4+C\)

\(1=C\)

\(y=x^4+1\)

Answer: \(y=x^4+1\)

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

\(y=Ae^{2x}\)

\(A=5\)

\(y=5e^{2x}\)

Answer: \(y=5e^{2x}\)

3
Find the general solution of \(dy/dx=\cos x\).
Show Answer

\(y=\sin x+C\)

Answer: \(y=\sin x+C\)

4
Solve \(dy/dx=1/x\) for \(x>0\) with \(y(1)=4\).
Show Answer

\(y=\ln x+C\)

\(4=0+C\)

\(y=\ln x+4\)

Answer: \(y=\ln x+4\)

5
Separate \(dy/dx=x/y\). Do not solve for \(y\) yet.
Show Answer

\(y\,dy=x\,dx\)

Answer: \(y\,dy=x\,dx\)

Level 2

Medium

A product of a function of x and a function of y, plus the initial sign.

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

\(\dfrac{1}{y}\,dy=2x\,dx\)

\(\ln|y|=x^2+C\)

\(y=Ae^{x^2}\)

\(A=3\)

\(y=3e^{x^2}\)

Answer: \(y=3e^{x^2}\)

1
Solve \(dy/dx=x/y\) with \(y(0)=4\).
Show Answer

\(y\,dy=x\,dx\)

\(\dfrac{y^2}{2}=\dfrac{x^2}{2}+C\)

At \((0,4)\): \(8=C\).

\(y^2=x^2+16\)

The initial value is positive, so \(y=\sqrt{x^2+16}\).

Answer: \(y=\sqrt{x^2+16}\)

2
Solve \(dy/dx=y(x+1)\) with \(y(0)=2\).
Show Answer

\(\dfrac{1}{y}\,dy=(x+1)\,dx\)

\(\ln|y|=x+\dfrac{x^2}{2}+C\)

\(y=Ae^{x+x^2/2}\)

\(A=2\)

\(y=2e^{x+x^2/2}\)

Answer: \(y=2e^{x+x^2/2}\)

3
Solve \(dy/dx=y-3\) with \(y(0)=5\).
Show Answer

\(\dfrac{1}{y-3}\,dy=dx\)

\(\ln|y-3|=x+C\)

\(y=3+Ae^{x}\)

\(5=3+A\)

\(A=2\)

\(y=3+2e^{x}\)

Answer: \(y=3+2e^{x}\)

4
Solve \(\dfrac{dy}{dx}=\dfrac{1}{2y}\) with \(y(1)=2\).
Show Answer

\(2y\,dy=dx\)

\(y^2=x+C\)

\(4=1+C\)

\(C=3\)

\(y=\sqrt{x+3}\)

Answer: \(y=\sqrt{x+3}\)

5
Find the constant solution of \(dy/dx=y-3\), and confirm it satisfies the equation.
Show Answer

A constant has derivative 0, so \(y-3=0\).

\(y=3\)

Then \(dy/dx=0\) and \(y-3=0\).

Answer: \(y=3\)

Level 3

Hard

Keep the sign of the root, and do not lose a constant solution.

Example
Solve \(dy/dx=e^{x-y}\) with \(y(0)=0\).

\(e^{y}\,dy=e^{x}\,dx\)

\(e^{y}=e^{x}+C\)

At \((0,0)\): \(1=1+C\), so \(C=0\).

\(e^{y}=e^{x}\)

\(y=x\)

Answer: \(y=x\)

1
Solve \(\dfrac{dy}{dx}=\dfrac{3x^2}{2y}\) with \(y(0)=-1\).
Show Answer

\(2y\,dy=3x^2\,dx\)

\(y^2=x^3+C\)

\(1=C\)

The initial value is negative.

\(y=-\sqrt{x^3+1}\)

Answer: \(y=-\sqrt{x^3+1}\)

2
Solve \(dy/dx=y^2\) with \(y(0)=1\).
Show Answer

\(y^{-2}\,dy=dx\)

\(-\dfrac{1}{y}=x+C\)

At \((0,1)\): \(-1=C\).

\(-\dfrac{1}{y}=x-1\)

\(y=\dfrac{1}{1-x}\)

Answer: \(y=\dfrac{1}{1-x}\)

3
Solve \(\dfrac{dy}{dx}=\dfrac{x+1}{y}\) with \(y(0)=3\).
Show Answer

\(y\,dy=(x+1)\,dx\)

\(\dfrac{y^2}{2}=\dfrac{x^2}{2}+x+C\)

At \((0,3)\): \(\dfrac{9}{2}=C\).

\(y^2=x^2+2x+9\)

\(y=\sqrt{x^2+2x+9}\)

Answer: \(y=\sqrt{x^2+2x+9}\)

4
Show that \(y=0\) is a solution of \(dy/dx=2\sqrt{y}\) for \(y\ge 0\), and explain why it is not equal to \((x+K)^2\) for a single constant \(K\).
Show Answer

If \(y=0\), both \(dy/dx\) and \(2\sqrt{y}\) are 0.

Separation also produces \(y=(x+K)^2\).

A single parabola \((x+K)^2\) is zero at only one x-value.

The zero function is an extra solution.

Answer: \(y=0\) is an extra solution

5
Solve \(dy/dx=x(y-1)\) with \(y(0)=1\).
Show Answer

Check the constant \(y=1\) before dividing.

Its derivative is 0, and \(x(1-1)=0\).

The initial condition is already on that solution.

\(y=1\)

The family \(y=1+Ae^{x^2/2}\) includes this solution when \(A=0\).

Answer: \(y=1\)

Need help separating variables?

Book a Session with Amy