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 (a separation-of-variables question appears on the AP free-response section most years), and it is the standard method in IB HL too.
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. Some questions (including on the AP exam) 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 (and in most marking schemes), 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 a test, 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 ✓.
Try these independently after the practice questions. Show your setup and explain your reasoning. Use exact answers where possible, and check that your answers fit the question. Homework solutions are not provided on the published site.
H1. (Foundations) Decide which equations are separable and show a separation where possible: y′=e2x−y, y′=(x+1)(y−2), y′=x+y2, and y′=x/y. State any excluded y-values in your separation.
H2. (Foundations) Find the general solution of y′=4xy, including the equilibrium solution.
H3. (Core) Solve y′=3x2/y2 with y(1)=−2. Give the largest open interval containing 1 where the original equation is defined.
H4. (Core) Solve y′=−2y with y(1)=−3. Show how the initial value at a nonzero input determines the constant.
H5. (Core) Solve y′=(x+1)/y with y(0)=−2. Choose the correct square-root branch and justify its domain.
H6. (Core) Solve y′=2x/(1+y2) with y(0)=1 implicitly. Explain why the implicit relation determines exactly one real y for each real x.
H7. (Challenge) Solve y′=2xy2 with y(0)=1/2. Find its largest open domain through zero and explain why the formula’s other branches are not part of this initial value solution.
H8. (Challenge) Solve y′=y/x with y(−2)=3. State the domain through the initial point, and check the signs in the logarithmic integration on negative x.
H9. (Challenge) Solve y′=(y−3)cosx with y(0)=1, using radians. Explain why this solution never reaches 3, and identify the equilibrium lost if you divide by y−3.
H10. (Challenge) For y′=y with y(0)=0, verify both y=0 everywhere and the function that is zero for x≤0 and x2/4 for x>0. Check differentiability at zero. Explain why division by y would miss information, and why this initial condition does not select a unique solution.