So far you have checked solutions that someone handed you. Now you will find them yourself. Separation of variables solves a big family of differential equations by moving everything with y to one side, everything with x to the other, and integrating. It is the main solving method in AP Calculus AB, and a separation-of-variables question appears on the free-response section most years.
When you get ln∣y∣=(something)+C, exponentiate both sides:
∣y∣=e(something)+C=eC⋅e(something)
Since eC is just a positive constant, and the absolute value allows either sign, you can write y=Ae(something) for a constant A. Then use the initial condition to find A.
A particular solution must be differentiable on an open interval that contains the initial x-value. If your formula has a vertical asymptote, a square root of a negative number, or a ln of a non-positive number somewhere, the solution only lives on the piece that contains the starting point. AP questions sometimes ask for this domain.
Forgetting +C, or adding it at the end. The constant must appear as soon as you integrate. Writing ln∣y∣=x2 and then y=ex2+C gives the wrong family. On AP free-response questions, a missing constant of integration usually costs the remaining points for that part, so build the habit now.
Separating a sum.dxdy=x+y can’t be split into dy terms and dx terms by multiplying or dividing. Only products and quotients separate. On the AP exam, an incorrect separation usually means no credit for the rest of the problem.
Exponentiating term by term. From ln∣y∣=x2+C, the next step is ∣y∣=ex2+C=eCex2, not y=ex2+eC.
Picking the wrong square root. When you solve y2=…, use the initial condition to choose the sign. If y(0)=−3, the solution is the negative square root.
Ignoring the domain. A particular solution can’t jump across an asymptote or a gap. State the interval that contains the initial x-value.
Not checking. Differentiating your answer and substituting it back takes a minute and catches most algebra slips.
1. (Warm-up) Which of these differential equations are separable?
(a) dxdy=xy2
(b) dxdy=x+y
(c) dxdy=ex+y
(d) dxdy=x2y+1
Solution
(a) Separable: y21dy=xdx.
(b) Not separable: a sum of x and y doesn’t factor into a function of x times a function of y.
(c) Separable: ex+y=exey, so e−ydy=exdx.
(d) Separable: y+11dy=x21dx.
2. (Warm-up) Find the general solution of dxdy=yx.
Solutionydy=xdx⇒2y2=2x2+C⇒y2=x2+C
(The constant 2C was renamed C.)
3. (Core) Solve dxdy=3y with y(0)=4.
Solutiony1dy=3dx⇒ln∣y∣=3x+C
At (0,4): ln4=C. So ∣y∣=e3x+ln4=4e3x, and since y(0)>0,
y=4e3x
Check: dxdy=12e3x=3(4e3x)=3y ✓.
4. (Core) Solve dxdy=2y2x+1 with y(0)=−3.
Solution2ydy=(2x+1)dx⇒y2=x2+x+C
At (0,−3): 9=0+0+C, so C=9 and y2=x2+x+9.
Since y(0)=−3 is negative, take the negative root:
y=−x2+x+9
The quadratic x2+x+9 has discriminant 1−36<0, so it is always positive and the solution is defined for all real x.
5. (Core) Solve dxdy=xy2 with y(0)=1, and state the domain of the solution.
Solutiony−2dy=xdx⇒−y1=2x2+C
At (0,1): −1=C. So
−y1=2x2−1=2x2−2⇒y=2−x22
The formula is undefined at x=±2. The interval containing x=0 is
−2<x<2
6. (Core) Solve dxdy=ycosx with y(0)=2 (radians). Then find y(2π), exactly and to 3 decimal places.
Solutiony1dy=cosxdx⇒ln∣y∣=sinx+C
At (0,2): ln2=0+C. So ∣y∣=esinx+ln2=2esinx, and since y(0)>0,
y=2esinx
Then y(2π)=2e1=2e≈5.437.
7. (Core) A student solves dxdy=2xy with y(0)=5 like this:
ln∣y∣=x2⇒y=ex2+C⇒5=1+C⇒y=ex2+4
Explain the error and find the correct solution.
Solution
The constant of integration has to appear when you integrate, not after solving for y. The correct line is ln∣y∣=x2+C. (Check the student’s answer: y=ex2+4 gives dxdy=2xex2, but 2xy=2xex2+8x. They don’t match.)
Correct work: at (0,5), ln5=0+C, so ∣y∣=ex2+ln5=5ex2, and
y=5ex2
8. (Challenge) Solve dxdy=xy2 with y(1)=−1, and state the domain of the solution.
Solutiony−2dy=x1dx⇒−y1=ln∣x∣+C
At (1,−1): 1=ln1+C=C. So
−y1=ln∣x∣+1⇒y=−1+ln∣x∣1
The starting value x=1 is positive, and the equation is undefined at x=0, so we need x>0 (and ∣x∣=x). We also need 1+lnx=0, that is, x=e−1. The interval containing x=1 is
x>e1
so the solution is y=−1+lnx1 for x>e1.
Check: dxdy=(1+lnx)21/x=x1⋅y2 ✓.
9. (Challenge) Solve dxdy=1+x21+y2 with y(0)=1. Write y as a rational function of x, and state its domain. (Hint: use tan(A+B)=1−tanAtanBtanA+tanB.)
Solution1+y21dy=1+x21dx⇒arctany=arctanx+C
At (0,1): arctan1=arctan0+C, so C=4π. Take the tangent of both sides:
y=tan(arctanx+4π)=1−x⋅1x+1=1−x1+x
The formula is undefined at x=1, and the interval containing x=0 is x<1.
Check: by the quotient rule, dxdy=(1−x)2(1−x)+(1+x)=(1−x)22. Also 1+y2=(1−x)2(1−x)2+(1+x)2=(1−x)22(1+x2), so 1+x21+y2=(1−x)22 ✓.