Differential EquationsSolving First-Order Equations4 of 7
Solving First-Order Equations · 4

Separable Equations

We want to find a function y\ys{y} whose derivative depends on both xx and y\ys{y}, starting with:

dydx\displaystyle \frac{\ys{dy}}{dx} =2x⋅y2\displaystyle = 2x \cdot \ys{y^2}

When the right side only depends on xx, we can integrate with respect to xx right away, but having y2\stuck{y^2} mixed in on the right stops us from integrating directly.

Why You Can't Just Integrate Both Sides
y\displaystyle \ys{y} =∫2x⋅y2 dx\displaystyle = \oper{\int} 2x \cdot \ys{y^2}\,dx =  ?\displaystyle = \;?

Trying to integrate ∫2x⋅y2 dx\oper{\int} 2x \cdot \stuck{y^2}\,dx right away doesn't work because y\ys{y} changes as xx changes, and we don't know what formula y\ys{y} has yet.

1

Separating variables into tiny steps

To fix that, we treat dydx\frac{\ys{dy}}{dx} as a fraction of two tiny steps, dy\ys{dy} and dxdx, and use algebra to group all the y\ys{y}'s with dy\ys{dy} and all the xx's with dxdx before we integrate.

−0.5\htmlClass{lc-mute}{-0.5}
0.5\htmlClass{lc-mute}{0.5}
2\htmlClass{lc-mute}{2}
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
y(x)\htmlClass{lc-blue}{y}(x)
dxdx
dy\htmlClass{lc-blue}{dy}
Separating Variables as Tiny Steps
0.5\htmlClass{lc-mute}{0.5}
1\htmlClass{lc-mute}{1}
2\htmlClass{lc-mute}{2}
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
dydx=2x⋅y2\displaystyle \frac{\htmlClass{lc-blue}{dy}}{dx} = 2x \cdot \htmlClass{lc-blue}{y^2}

Dividing both sides by y2\ys{y^2} and multiplying by dxdx puts each variable with its own step, turning both sides into ordinary integrals:

∫1y2 dy\displaystyle \oper{\int} \ys{\frac{1}{y^2}\,dy} =∫2x dx\displaystyle = \oper{\int} 2x\,dx

Along a solution curve, the steps dy\ys{dy} and dxdx have different sizes that change from point to point, but 1y2 dy\scaled{\frac{1}{y^2}\,dy} and 2x dx\scaled{2x\,dx} stay equal everywhere.

Along a solution curve, the raw x and y steps change size at different rates, but scaling each one makes every tiny step match and keeps their running totals equal the whole way.
2

Integrating both sides and handling +C+C

Now that the left side only has y\ys{y} and the right side only has xx, we can integrate each side on its own and solve for y\ys{y}.

Integrating Both Sides and Handling +C
∫1y2 dy=∫2x dxy=  ?\displaystyle \begin{aligned}\oper{\int} \ys{\frac{1}{y^2}\,dy} &= \oper{\int} 2x\,dx\\[6pt]\ys{y} &= \;?\end{aligned}
Text solution
Divide by y2\ys{y^2} and multiply by dxdxMoving y2\ys{y^2} to the left and dxdx to the right gives a standard power-rule integral on each side.
1y2 dy=2x dx∫y−2 dy=∫2x dx\displaystyle \begin{aligned} \ys{\frac{1}{y^2}\,dy} &= 2x\,dx \\ \oper{\int} \ys{y^{-2}\,dy} &= \oper{\int} 2x\,dx \end{aligned}
Integrate both sides with a single +C+C on the xx-sideBoth integrals produce an unknown constant, but moving the constant from the left over to the right just combines them into one unknown constant, so we write a single +C+C on the right as soon as we integrate.
−1y\displaystyle \ys{-\frac{1}{y}} =x2+C\displaystyle = x^2 + C
Multiply by −1-1 and flip the entire right side togetherSince +C+C is already part of the equation, multiplying by −1-1 gives −C-C, a new constant that we still call CC, and taking the reciprocal flips the entire right side C−x2C - x^2 into one denominator rather than flipping x2x^2 alone.
1y=−x2−C1y=C−x2y=1C−x2\displaystyle \begin{aligned} \ys{\frac{1}{y}} &= -x^2 - C \\ \ys{\frac{1}{y}} &= C - x^2 \\ \ys{y} &= \frac{1}{C - x^2} \end{aligned}
3

Particular solutions and the interval of validity

To find the one curve in the family y=1C−x2\ys{y} = \frac{1}{C - x^2} that passes through a given starting point, we use an initial condition:

dydx\displaystyle \frac{\ys{dy}}{dx} =2x⋅y2,y(0)=1\displaystyle = 2x \cdot \ys{y^2}, \quad {\ys{y}(0) = 1}

Once we find the formula for that curve, we also have to check how far it can go to the left and right of x=0x = 0 before hitting a break.

Particular Solutions and the Interval of Validity
y=1C−x2y(0)=1y=  ?x∈  ?\displaystyle \begin{aligned}\ys{y} &= \frac{1}{C - x^2}\\[6pt]\ys{y}(0) &= 1\\[6pt]\ys{y} &= \;? \qquad x \in \;?\end{aligned}
Text solution
Plug in x=0x = 0 and y=1\ys{y} = 1 to find CCPlugging the starting point (0,1)(0, 1) into our family of solutions gives C=1C = 1.
1=1C−02C=1y=11−x2\displaystyle \begin{aligned} 1 &= \frac{1}{C - 0^2} \\ C &= 1 \\ \ys{y} &= \frac{1}{1 - x^2} \end{aligned}
Keep the single unbroken branch containing x=0x = 0The denominator 1−x21 - x^2 becomes zero at x=−1x = -1 and x=1x = 1, creating two vertical asymptotes that split the graph into three separate pieces, and our starting point x=0x = 0 sits on the middle piece between them.
Interval of validity: (−1,1)\displaystyle \text{Interval of validity: } \valid{(-1, 1)}

For y=1C−x2\ys{y} = \frac{1}{C - x^2} with CC positive, the vertical asymptotes at x=−Cx = -\sqrt{C} and x=Cx = \sqrt{C} split the graph into three branches, and the starting point (x0,y0)(x_0, y_0) picks which branch is our solution.

Vertical asymptotes split this curve into three separate branches, and only the single unbroken branch through your starting point is a valid solution.
4

Recognizing when an equation is separable

Before trying to separate every differential equation, compare what happens when xx and y\ys{y} are added together, like in dydx=x+y\frac{\ys{dy}}{dx} = x + \ys{y}, versus when they are multiplied together.

When an Equation Is Separable
dydx=x+ydydx=xy+3x\displaystyle \begin{aligned}\frac{\ys{dy}}{dx} &= x + \ys{y}\\[6pt]\frac{\ys{dy}}{dx} &= x\ys{y} + 3x\end{aligned}
separable?\displaystyle \text{separable?}

Division only separates the variables when the right side is an xx-part times or divided by a y\ys{y}-part. When you see addition or subtraction, check if you can factor the right side into a product first:

dydx=xy+3x=x⏟stuff with x⋅(y+3)⏟stuff with y\displaystyle \begin{aligned}\frac{\ys{dy}}{dx} &= x\ys{y} + 3x\\ &= \underbrace{x}_{\text{stuff with } x} \cdot \ys{\underbrace{(y + 3)}_{\text{stuff with } y}}\end{aligned}

Once factored, dividing both sides by y+3\ys{y + 3} and multiplying by dxdx separates the equation cleanly into 1y+3 dy=x dx\ys{\frac{1}{y + 3}\,dy} = x\,dx.

5

Natural logs and the constant multiplier AA

Now let's solve that factored equation with an initial condition:

dydx\displaystyle \frac{\ys{dy}}{dx} =x(y+3),y(0)=1\displaystyle = x\ys{(y + 3)}, \quad {\ys{y}(0) = 1}

Here, integrating 1y+3 dy\ys{\frac{1}{y + 3}\,dy} gives a natural log, which puts +C+C up in the exponent when we take e\oper{e} to the power of both sides. To bring +C+C down out of the exponent, we use the exponent rule in reverse:

ea+b\displaystyle \oper{e}^{a + b} =ea⋅eb\displaystyle = \oper{e}^a \cdot \oper{e}^b
Natural Logs and the Constant Multiplier A
∫1y+3 dy=∫x dxy(0)=1y=  ?\displaystyle \begin{aligned}\oper{\int} \ys{\frac{1}{y + 3}\,dy} &= \oper{\int} x\,dx\\[6pt]\ys{y}(0) &= 1\\[6pt]\ys{y} &= \;?\end{aligned}
Text solution
Integrate both sides to get a natural logIntegrating 1y+3\ys{\frac{1}{y + 3}} with respect to y\ys{y} gives ln⁡∣y+3∣\oper{\ln}\ys{|y + 3|} on the left side.
∫1y+3 dy=∫x dxln⁡∣y+3∣=12x2+C\displaystyle \begin{aligned} \oper{\int} \ys{\frac{1}{y + 3}\,dy} &= \oper{\int} x\,dx \\ \oper{\ln}\ys{|y + 3|} &= \frac{1}{2}x^2 + C \end{aligned}
Take e\oper{e} to the power of both sides and split the exponentTaking e\oper{e} to the power of both sides cancels the natural log, and splitting e12x2+C\oper{e}^{\frac{1}{2}x^2 + C} turns the added +C+C in the exponent into a multiplied constant eC\oper{e}^C.
∣y+3∣=e12x2+C∣y+3∣=e12x2⋅eC\displaystyle \begin{aligned} \ys{|y + 3|} &= \oper{e}^{\frac{1}{2}x^2 + C} \\ \ys{|y + 3|} &= \oper{e}^{\frac{1}{2}x^2} \cdot \oper{e}^C \end{aligned}
Drop the absolute value bars and rename ±eC\pm \oper{e}^C as AARemoving the absolute value bars puts a ±\pm sign in front, and replacing the entire constant ±eC\pm \oper{e}^C with a single letter AA gives the family of solutions solved for y\ys{y}.
y+3=±eC⏟A⋅e12x2y+3=Ae12x2y=Ae12x2−3\displaystyle \begin{aligned} \ys{y + 3} &= \underbrace{\pm \oper{e}^C}_{A} \cdot \oper{e}^{\frac{1}{2}x^2} \\ \ys{y + 3} &= A \oper{e}^{\frac{1}{2}x^2} \\ \ys{y} &= A \oper{e}^{\frac{1}{2}x^2} - 3 \end{aligned}
6

Constant solutions lost when dividing by zero

Before we plug in y(0)=1\ys{y}(0) = 1, look back at the first algebra step where we divided by y+3\ys{y + 3}: dividing assumes y+3≠0\ys{y + 3} \neq 0, which can leave out a flat horizontal line that solves the equation.

Constant Solutions Lost When Dividing by Zero
dydx=x(y+3)y=Ae12x2−3\displaystyle \begin{aligned}\frac{\ys{dy}}{dx} &= x\ys{(y + 3)}\\[6pt]\ys{y} &= A \oper{e}^{\frac{1}{2}x^2} - 3\end{aligned}
y=−3    ?\displaystyle \flatline{y = -3}\;\;?
Text solution
Check the flat line where the term you divided by is zeroSetting y+3=0\ys{y + 3} = 0 gives the horizontal line y=−3\flatline{y = -3}, which satisfies dydx=x(y+3)\frac{\ys{dy}}{dx} = x\ys{(y + 3)} with 0=00 = 0 and is included in y=Ae12x2−3\ys{y} = A \oper{e}^{\frac{1}{2}x^2} - 3 when we allow A=0A = 0. (By contrast, in dydx=2x⋅y2\frac{\ys{dy}}{dx} = 2x \cdot \ys{y^2}, dividing by y2\ys{y^2} loses the flat line y=0\flatline{y = 0}, which must be listed separately because 1C−x2\frac{1}{C - x^2} can never equal 00.)
A\displaystyle A =0  ⟹  y\displaystyle = 0 \implies \ys{y} =0⋅e12x2−3\displaystyle = 0 \cdot \oper{e}^{\frac{1}{2}x^2} - 3 =−3\displaystyle = -3
Plug in x=0x = 0 and y=1\ys{y} = 1 to find AAPlugging in the starting point (0,1)(0, 1) gives A=4A = 4, and because e12x2\oper{e}^{\frac{1}{2}x^2} is defined for all xx, the solution is valid on the entire real line.
1=Ae12⋅02−31=A−3A=4y=4e12x2−3on (−∞,∞)\displaystyle \begin{aligned} 1 &= A \oper{e}^{\frac{1}{2}\cdot 0^2} - 3 \\ 1 &= A - 3 \\ A &= 4 \\ \ys{y} &= 4\oper{e}^{\frac{1}{2}x^2} - 3 \quad \text{on } \valid{(-\infty, \infty)} \end{aligned}

In y=Ae12x2−3\ys{y} = A \oper{e}^{\frac{1}{2}x^2} - 3, setting A=0A = 0 gives the flat line y=−3\flatline{y = -3} right back, whereas in y=1C−x2\ys{y} = \frac{1}{C - x^2}, CC grows toward infinity as the curve approaches y=0\flatline{y = 0} without the formula ever reaching y=0\flatline{y = 0}.

As a curve flattens onto the equilibrium line, one general solution catches it with a zero constant while the other misses it completely.
7

Choosing a square-root branch and open endpoints

Now consider an initial value problem where y\ys{y} starts in the denominator on the right:

dydx\displaystyle \frac{\ys{dy}}{dx} =−xy,y(0)=−3\displaystyle = -\frac{x}{\ys{y}}, \quad {\ys{y}(0) = -3}

Multiplying by y\ys{y} gives an integral that produces y2\ys{y^2}, so solving for y\ys{y} requires taking a square root and picking between the positive and negative branches.

Choosing a Square-Root Branch and Open Endpoints
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
(0,−3)(0, -3)
Text solution
Multiply by y\ys{y} and dxdx and integrate both sidesIntegrating both sides gives 12y2\ys{\frac{1}{2}y^2} on the left, and multiplying both sides by 22 gives 2C2C, a new constant that we still call CC.
∫y dy=∫−x dx12y2=−12x2+Cy2=−x2+2Cy2=C−x2\displaystyle \begin{aligned} \oper{\int} \ys{y\,dy} &= \oper{\int} -x\,dx \\ \ys{\frac{1}{2}y^2} &= -\frac{1}{2}x^2 + C \\ \ys{y^2} &= -x^2 + 2C \\ \ys{y^2} &= C - x^2 \end{aligned}
Use the negative initial value y(0)=−3\ys{y}(0) = -3 to choose the minus branchTaking the square root gives y=±C−x2\ys{y} = \pm\sqrt{C - x^2}, and since y(0)=−3\ys{y}(0) = -3 is negative while x\sqrt{\phantom{x}} is never negative, our curve must be the negative branch.
y=−C−x2−3=−C−023=C  ⟹  C=9y=−9−x2\displaystyle \begin{aligned} \ys{y} &= -\sqrt{C - x^2} \\ -3 &= -\sqrt{C - 0^2} \\ 3 &= \sqrt{C} \implies C = 9 \\ \ys{y} &= -\sqrt{9 - x^2} \end{aligned}
Leave the endpoints open where dydx=−xy\frac{\ys{dy}}{dx} = -\frac{x}{\ys{y}} divides by zeroThe square root 9−x2\sqrt{9 - x^2} is defined on [−3,3][-3, 3], but at the endpoints x=−3x = -3 and x=3x = 3 we get y=0\ys{y} = 0, which makes the original derivative dydx=−xy\frac{\ys{dy}}{dx} = -\frac{x}{\ys{y}} divide by zero.
Interval of validity: (−3,3)\displaystyle \text{Interval of validity: } \valid{(-3, 3)}

Geometrically, the circle x2+y2=Cx^2 + \ys{y^2} = C splits into the top semicircle when y0>0y_0 > 0 and the bottom semicircle when y0<0y_0 < 0, stopping short of the xx-axis points (−C,0)(-\sqrt{C}, 0) and (C,0)(\sqrt{C}, 0) where the tangent line goes vertical.

Every starting point picks only one half of its circle, above or below the x-axis, and stops at the open endpoints where the slope is vertical.
8

Implicit solutions when you can't solve for y\ys{y}

Finally, we want to solve an initial value problem where integrating the y\ys{y}-side produces two different kinds of y\ys{y} terms:

dydx\displaystyle \frac{\ys{dy}}{dx} =3x22y+cos⁡(y),y(2)=0\displaystyle = \frac{3x^2}{\ys{2y + \cos(y)}}, \quad {\ys{y}(2) = 0}
Implicit Solutions When You Can't Isolate y
dydx=3x22y+cos⁡(y)y(2)=0y=  ?\displaystyle \begin{aligned}\frac{\ys{dy}}{dx} &= \frac{3x^2}{\ys{2y + \cos(y)}}\\[6pt]\ys{y}(2) &= 0\\[6pt]\ys{y} &= \;?\end{aligned}
Text solution
Multiply by 2y+cos⁡(y)\ys{2y + \cos(y)} and dxdx and integrateMoving the entire denominator 2y+cos⁡(y)\ys{2y + \cos(y)} to the left side with dy\ys{dy} gives a straightforward integral on each side.
∫(2y+cos⁡y) dy=∫3x2 dxy2+sin⁡(y)=x3+C\displaystyle \begin{aligned} \oper{\int} \ys{(2y + \cos y)\,dy} &= \oper{\int} 3x^2\,dx \\ \ys{y^2 + \sin(y)} &= x^3 + C \end{aligned}
Plug (2,0)(2, 0) straight into the implicit equationBecause no algebra can get y\ys{y} by itself from y2+sin⁡(y)\ys{y^2 + \sin(y)}, we plug x=2x = 2 and y=0\ys{y} = 0 directly into the equation to find CC and leave the equation in that form.
02+sin⁡(0)=23+C0=8+C  ⟹  C=−8y2+sin⁡(y)=x3−8⏟implicit solution\displaystyle \begin{gathered} \begin{aligned} 0^2 + \sin(0) &= 2^3 + C \\ 0 &= 8 + C \implies C = -8 \end{aligned} \\ \underbrace{\ys{y^2 + \sin(y)} = x^3 - 8}_{\text{implicit solution}} \end{gathered}

Even on problems where you can solve for y\ys{y}, plugging your initial point (x0,y0)(x_0, y_0) in right after integrating is often the fastest way to find CC before doing the rest of the algebra.

9

Putting the whole method together

Every separable equation follows the same steps from separating the tiny steps dy\ys{dy} and dxdx to checking where the solution curve is valid.

The Complete Flow for Separable Equations
dydx=2x⋅y2\displaystyle \frac{\htmlClass{lc-blue}{dy}}{dx} = 2x \cdot \htmlClass{lc-blue}{y^2}
y(0)=1\htmlClass{lc-blue}{y}(0) = 1
dydx=xy+3x\displaystyle \frac{\htmlClass{lc-blue}{dy}}{dx} = x\htmlClass{lc-blue}{y} + 3x
y(0)=1\htmlClass{lc-blue}{y}(0) = 1
dydx=−xy\displaystyle \frac{\htmlClass{lc-blue}{dy}}{dx} = -\frac{x}{\htmlClass{lc-blue}{y}}
y(0)=−3\htmlClass{lc-blue}{y}(0) = -3
dydx=3x22y+cos⁡(y)\displaystyle \frac{\htmlClass{lc-blue}{dy}}{dx} = \frac{3x^2}{\htmlClass{lc-blue}{2y + \cos(y)}}
y(2)=0\htmlClass{lc-blue}{y}(2) = 0

Key concepts

Check if the right side factors into a product before separating

You can only separate variables when dydx=(stuff with x)⋅(stuff with y)\frac{\ys{dy}}{dx} = (\text{stuff with } x)\cdot\ys{(\text{stuff with } y)}. An equation like dydx=xy+3x\frac{\ys{dy}}{dx} = x\ys{y} + 3x factors into x(y+3)x\ys{(y + 3)} and separates to 1y+3 dy=x dx\ys{\frac{1}{y + 3}\,dy} = x\,dx, whereas dydx=x+y\frac{\ys{dy}}{dx} = x + \ys{y} cannot be factored into a product, so separation of variables won't work on sums that don't factor.

Keep +C+C inside the algebra from the moment you integrate, and check what you divided by

Write a single +C+C on the xx-side as soon as you integrate, and check whether setting the y\ys{y}-term you divided by equal to zero gives a flat-line solution:

  • Reciprocal of y\ys{y}: −1y=x2+C\ys{-\frac{1}{y}} = x^2 + C flips the whole right side together to give y=1C−x2\ys{y} = \frac{1}{C - x^2}, and because 1C−x2\frac{1}{C - x^2} can never equal 00, the flat line y=0\flatline{y = 0} lost when dividing by y2\ys{y^2} must be listed separately.
  • Natural log of y\ys{y}: ln⁡∣y+3∣=12x2+C\oper{\ln}\ys{|y + 3|} = \frac{1}{2}x^2 + C turns into y=Ae12x2−3\ys{y} = A \oper{e}^{\frac{1}{2}x^2} - 3 with A=±eCA = \pm \oper{e}^C, and allowing A=0A = 0 includes the flat line y=−3\flatline{y = -3}.
  • Square of y\ys{y}: y2=C−x2\ys{y^2} = C - x^2 splits into y=±C−x2\ys{y} = \pm\sqrt{C - x^2}, where the sign of y(x0)\ys{y}(x_0) picks the branch.
  • Different y\ys{y} terms: When you cannot solve for y\ys{y}, as in y2+sin⁡(y)=x3+C\ys{y^2 + \sin(y)} = x^3 + C, plug in (x0,y0)(x_0, y_0) right away and leave the implicit equation.
Cut the interval of validity at asymptotes and vertical tangents

Keep only the single open interval containing x0x_0 where both the formula for y\ys{y} and the original derivative dydx\frac{\ys{dy}}{dx} are defined, stopping at vertical asymptotes like x=±1x = \pm 1 in y=11−x2\ys{y} = \frac{1}{1 - x^2} and leaving out endpoints like x=±3x = \pm 3 in y=−9−x2\ys{y} = -\sqrt{9 - x^2} where y=0\ys{y} = 0 makes dydx=−xy\frac{\ys{dy}}{dx} = -\frac{x}{\ys{y}} divide by zero.

10

Practice

1

Determine which of the following differential equations are separable, and rewrite each separable equation with all yy terms with dydy and all xx terms with dxdx: (a) dydx=x−3y\frac{dy}{dx} = x - 3y, (b) dydx=xy−3x\frac{dy}{dx} = xy - 3x.

Check whether the two terms on the right share a common factor that turns the subtraction into a part with xx times a part with yy.

In (a), dydx=x−3y\frac{\ys{dy}}{dx} = x - \ys{3y} has no common factor to pull out.
Watch out: A common mistake is dividing by y\ys{y} to write 1y dy=(xy−3)dx\ys{\frac{1}{y}\,dy} = \left(\stuck{\frac{x}{y}} - 3\right)dx or moving 3y dx\stuck{3y\,dx} to the left as dy+3y dx=x dx\ys{dy} + \stuck{3y\,dx} = x\,dx, neither of which separates the variables because xx and y\ys{y} are still mixed together on one side.
In (b), both terms on the right share a factor of xx:
dydx=x(y−3)1y−3 dy=x dx\displaystyle \begin{aligned} \frac{\ys{dy}}{dx} &= x\ys{(y - 3)} \\ \ys{\frac{1}{y - 3}\,dy} &= x\,dx \end{aligned}
Watch out: Don't divide only the first term by y\ys{y} to get 1y dy=(x−3x) dx\frac{1}{y}\,dy = (x - 3x)\,dx; you have to factor x(y−3)x\ys{(y - 3)} first and divide the entire right side by y−3\ys{y - 3}.
Answer: (a) Not separable, because x−3yx - \ys{3y} cannot be factored into a product of an xx-part and a y\ys{y}-part. (b) Separable: factoring gives dydx=x(y−3)\frac{\ys{dy}}{dx} = x\ys{(y - 3)}, which separates to 1y−3 dy=x dx\ys{\frac{1}{y - 3}\,dy} = x\,dx (for y≠3\ys{y} \neq 3).
2

Solve the initial value problem dydx=2x(y+2)\frac{dy}{dx} = 2x(y + 2), y(0)=1y(0) = 1, and state the interval of validity.

Divide by y+2y + 2 to get a natural log on the left, then rewrite ex2+Ce^{x^2 + C} using a constant multiplier AA in front of ex2e^{x^2}.

Separate the variables and integrate both sides:
∫1y+2 dy=∫2x dxln⁡∣y+2∣=x2+Cy+2=Aex2y=Aex2−2\displaystyle \begin{aligned} \oper{\int} \ys{\frac{1}{y + 2}\,dy} &= \oper{\int} 2x\,dx \\ \oper{\ln}\ys{|y + 2|} &= x^2 + C \\ \ys{y + 2} &= A \oper{e}^{x^2} \\ \ys{y} &= A \oper{e}^{x^2} - 2 \end{aligned}
Watch out: A common mistake is adding +C+C onto the end after taking e\oper{e} to the power of both sides to write y+2=ex2+Cy + 2 = e^{x^2} + C, which gives C=2C = 2 and the wrong answer y=ex2y = e^{x^2}. Because +C+C starts inside the exponent ex2+C\oper{e}^{x^2 + C}, it becomes a front multiplier AA.
Now plug in x=0x = 0 and y=1\ys{y} = 1:
1=Ae02−2A=3\displaystyle \begin{aligned} 1 &= A \oper{e}^{0^2} - 2 \\ A &= 3 \end{aligned}
Since ex2\oper{e}^{x^2} is defined for all xx, the solution is defined everywhere.
Answer: y=3ex2−2\ys{y} = 3\oper{e}^{x^2} - 2 on (−∞,∞)\valid{(-\infty, \infty)}.
3

Solve the initial value problem dydx=2x3y2+cos⁡(y)\frac{dy}{dx} = \frac{2x}{3y^2 + \cos(y)}, y(1)=0y(1) = 0.

Multiply both sides by 3y2+cos⁡(y)3y^2 + \cos(y) and integrate; check whether you can get yy by itself before trying to solve for it.

Separate the variables and integrate each side:
∫(3y2+cos⁡(y)) dy=∫2x dxy3+sin⁡(y)=x2+C\displaystyle \begin{aligned} \oper{\int} \ys{(3y^2 + \cos(y))\,dy} &= \oper{\int} 2x\,dx \\ \ys{y^3 + \sin(y)} &= x^2 + C \end{aligned}
Because y\ys{y} is in both y3\ys{y^3} and sin⁡(y)\ys{\sin(y)}, we cannot solve for y\ys{y}, so we plug x=1x = 1 and y=0\ys{y} = 0 straight into the implicit equation:
03+sin⁡(0)=12+C0=1+CC=−1\displaystyle \begin{aligned} 0^3 + \sin(0) &= 1^2 + C \\ 0 &= 1 + C \\ C &= -1 \end{aligned}
Watch out: Don't see y(1)=0\ys{y}(1) = 0 and automatically assume C=0C = 0 (which gives the wrong answer y3+sin⁡(y)=x2y^3 + \sin(y) = x^2); the right side is plugged in at x=1x = 1, not x=0x = 0.
Answer: y3+sin⁡(y)=x2−1\ys{y^3 + \sin(y)} = x^2 - 1.
4

Solve the initial value problem dydx=2x⋅y2\frac{dy}{dx} = 2x \cdot y^2, y(0)=14y(0) = \frac{1}{4}, and state the interval of validity.

Integrate y−2 dy=2x dxy^{-2}\,dy = 2x\,dx, flip the entire right side together with +C+C, and find where the denominator equals zero around x=0x = 0.

Separate variables and integrate:
∫y−2 dy=∫2x dx−1y=x2+C1y=C−x2y=1C−x2\displaystyle \begin{aligned} \oper{\int} \ys{y^{-2}\,dy} &= \oper{\int} 2x\,dx \\ \ys{-\frac{1}{y}} &= x^2 + C \\ \ys{\frac{1}{y}} &= C - x^2 \\ \ys{y} &= \frac{1}{C - x^2} \end{aligned}
Watch out: Flipping x2x^2 by itself and leaving +C+C outside gives the wrong formula y=−1x2+Cy = -\frac{1}{x^2} + C. The entire right side C−x2C - x^2 flips together into the denominator.
Plug in x=0x = 0 and y=14\ys{y} = \frac{1}{4}:
14=1C−02  ⟹  C=4y=14−x2\displaystyle \begin{aligned} \frac{1}{4} &= \frac{1}{C - 0^2} \implies C = 4 \\ \ys{y} &= \frac{1}{4 - x^2} \end{aligned}
The denominator 4−x24 - x^2 is zero at x=−2x = -2 and x=2x = 2, so the single branch containing x=0x = 0 runs between −2-2 and 22.
Answer: y=14−x2\ys{y} = \frac{1}{4 - x^2} on (−2,2)\valid{(-2, 2)}.
5

Solve the initial value problem dydx=−xy\frac{dy}{dx} = -\frac{x}{y}, y(0)=−4y(0) = -4, and state the interval of validity.

After integrating to y2=C−x2y^2 = C - x^2, use the sign of y(0)=−4y(0) = -4 to pick the square-root branch, and check the original derivative dydx=−xy\frac{dy}{dx} = -\frac{x}{y} at the endpoints where y=0y = 0.

Separate variables and integrate:
∫y dy=∫−x dx12y2=−12x2+Cy2=C−x2y=±C−x2\displaystyle \begin{aligned} \oper{\int} \ys{y\,dy} &= \oper{\int} -x\,dx \\ \ys{\frac{1}{2}y^2} &= -\frac{1}{2}x^2 + C \\ \ys{y^2} &= C - x^2 \\ \ys{y} &= \pm\sqrt{C - x^2} \end{aligned}
Since y(0)=−4\ys{y}(0) = -4 is negative, we choose the negative branch and plug in (0,−4)(0, -4):
−4=−C−02  ⟹  C=16y=−16−x2\displaystyle \begin{aligned} -4 &= -\sqrt{C - 0^2} \implies C = 16 \\ \ys{y} &= -\sqrt{16 - x^2} \end{aligned}
Watch out: Two common mistakes here are keeping the positive root y=16−x2\stuck{y = \sqrt{16 - x^2}} (which gives y(0)=4y(0) = 4 instead of −4-4) or writing the closed interval [−4,4][-4, 4] because 16−x2\sqrt{16 - x^2} is defined at x=±4x = \pm 4. At x=±4x = \pm 4, y=0\ys{y} = 0, which makes dydx=−xy\frac{\ys{dy}}{dx} = -\frac{x}{\ys{y}} divide by zero, so the endpoints must be left open.
Answer: y=−16−x2\ys{y} = -\sqrt{16 - x^2} on (−4,4)\valid{(-4, 4)}.
6

Find all solutions to the differential equation dydx=3x2⋅y2\frac{dy}{dx} = 3x^2 \cdot y^2, including any constant solutions lost when separating variables.

After dividing by y2y^2 and integrating to find the family of curves, check what happens in the original equation when the term you divided by, y2y^2, equals zero.

Assuming y≠0\ys{y} \neq 0, divide by y2\ys{y^2} and integrate:
∫y−2 dy=∫3x2 dx−1y=x3+Cy=1C−x3\displaystyle \begin{aligned} \oper{\int} \ys{y^{-2}\,dy} &= \oper{\int} 3x^2\,dx \\ \ys{-\frac{1}{y}} &= x^3 + C \\ \ys{y} &= \frac{1}{C - x^3} \end{aligned}
Now check the value left out when we divided by y2\ys{y^2}: setting y2=0\ys{y^2} = 0 gives the flat line y=0\flatline{y = 0}, which satisfies dydx=3x2⋅y2\frac{\ys{dy}}{dx} = 3x^2 \cdot \ys{y^2} with 0=00 = 0.
Watch out: Stopping at y=1C−x3\ys{y} = \frac{1}{C - x^3} misses y=0\flatline{y = 0} completely, because no number plugged in for CC can ever make 1C−x3\frac{1}{C - x^3} equal zero.
Answer: y=1C−x3\ys{y} = \frac{1}{C - x^3} and y=0\flatline{y = 0}.