Differential EquationsSolving First-Order Equations5 of 7
Solving First-Order Equations · 5

Linear Equations and the Integrating Factor

We want to solve differential equations where y′\rate{y'} and y\unk{y} are added together, like

y′+2y\displaystyle \rate{y'} + 2\unk{y} =ex\displaystyle = e^x

For this equation, we can't integrate both sides directly, because we don't know what y\unk{y} is, and we can't separate the variables, because moving 2y2\unk{y} across gives y′=ex−2y\rate{y'} = e^x - 2\unk{y}, which isn't a function of xx times a function of y\unk{y}.

Why Separation Fails on y′ + 2y = eˣ
y′+2y=exy=  ?\displaystyle \begin{aligned}\rate{y'} + 2\unk{y} &= e^x\\[6pt]\unk{y} &= \;?\end{aligned}

An equation where y′\rate{y'} and y\unk{y} appear to the first power on the left and xx-only terms sit on the right is written in standard form as

y′+P(x)y=Q(x)⏟first-order linear differential equation\displaystyle \underbrace{\rate{y'} + \coef{P(x)}\unk{y} = Q(x)}_{\text{first-order linear differential equation}}
1

Turning the Left Side into a Product Rule

To solve

y′+2y\displaystyle \rate{y'} + \coef{2}\unk{y} =ex\displaystyle = e^x

we multiply the whole equation by a function M(x)\mult{M(x)} chosen so the left side becomes a single product rule derivative:

M⋅y′+2M⋅y=M⋅ex\mult{M}\cdot\rate{y'}+\coef{2}\mult{M}\cdot\unk{y}=\mult{M}\cdot e^x
M⋅y′+2MM′⋅y=ddx(M⋅y)\mult{M}\cdot\rate{y'}+\phantom{2M}\mathllap{\mult{M'}\kern{0.08em}}\cdot\unk{y}=\rate{\dfrac{d}{dx}}(\mult{M}\cdot\unk{y})
derivative\rate{\text{derivative}}
Fixing the Broken Product Rule
1⋅y′+2M′⋅y=exM⋅y′+M′⋅y=(M⋅y)′\displaystyle \begin{aligned}1\cdot\rate{y'} + \mathrlap{\kern{0.36em}\coef{2}}\hphantom{\mult{M'}}\cdot\unk{y} &= e^x\\[6pt]\mult{M}\cdot\rate{y'} + \mult{M'}\cdot\unk{y} &= (\mult{M}\cdot\unk{y})\rate{'}\end{aligned}
M\displaystyle \mult{M} =  ?\displaystyle = \;?
Text solution
Find a multiplier M\mult{M} whose derivative is 2M\coef{2}\mult{M}For M⋅y′+2M⋅y\mult{M} \cdot \rate{y'} + \coef{2}\mult{M} \cdot \unk{y} to match the product rule M⋅y′+M′⋅y\mult{M} \cdot \rate{y'} + \mult{M'} \cdot \unk{y}, we need M′=2M\mult{M'} = \coef{2}\mult{M}, which holds when M\mult{M} is e2x\mult{e^{2x}}.
M=e2xM′=2e2x\displaystyle \begin{aligned} \mult{M} &= \mult{e^{2x}} \\ \mult{M'} &= \coef{2}\mult{e^{2x}} \end{aligned}
Multiply every term by e2x\mult{e^{2x}} and collapse the left sideMultiplying the whole equation by e2x\mult{e^{2x}} makes the left side an exact product rule expansion, so it collapses into the single derivative of e2x⋅y\mult{e^{2x}} \cdot \unk{y}.
e2x⋅y′+2e2x⋅y=e2x⋅exddx(e2x⋅y)=e3x\displaystyle \begin{aligned} \mult{e^{2x}} \cdot \rate{y'} + \coef{2}\mult{e^{2x}} \cdot \unk{y} &= \mult{e^{2x}} \cdot e^x \\ \rate{\frac{d}{dx}}\left(\mult{e^{2x}} \cdot \unk{y}\right) &= e^{3x} \end{aligned}
Integrate both sides with respect to xxIntegrating undoes the derivative on the left side and integrates e3xe^{3x} on the right.
∫ddx(e2x⋅y)dx=∫e3x dxe2x⋅y=13e3x+C\displaystyle \begin{aligned} \mult{\int} \rate{\frac{d}{dx}}\left(\mult{e^{2x}} \cdot \unk{y}\right) \mult{dx} &= \mult{\int} e^{3x}\,\mult{dx} \\ \mult{e^{2x}} \cdot \unk{y} &= \frac{1}{3}e^{3x} + C \end{aligned}
Divide every term by e2x\mult{e^{2x}}Dividing both sides by the multiplier e2x\mult{e^{2x}} isolates y\unk{y}.
y\displaystyle \unk{y} =13ex+Ce−2x\displaystyle = \frac{1}{3}e^x + C\mult{e^{-2x}}

So y=13ex+Ce−2x\unk{y} = \frac{1}{3}e^x + C\mult{e^{-2x}} is the general solution to y′+2y=ex\rate{y'} + \coef{2}\unk{y} = e^x.

In the (x,y)(x, y) plane, the slope y′\rate{y'} in y′+2y=ex\rate{y'} + \coef{2}\unk{y} = e^x depends on both xx and y\unk{y}, while the derivative of the product e2xy\mult{e^{2x}}\unk{y} depends only on xx. That means changing CC simply shifts the curve e2xy=13e3x+C\mult{e^{2x}}\unk{y} = \frac{1}{3}e^{3x} + C up or down, while dividing back by e2x\mult{e^{2x}} pulls all the solution curves y=13ex+Ce−2x\unk{y} = \frac{1}{3}e^x + C\mult{e^{-2x}} toward 13ex\frac{1}{3}e^x as xx grows.

Multiplying by the integrating factor turns these solutions into simple vertical shifts of one curve, and dividing back shrinks those gaps as you move right so every curve pinches toward the same path.
2

The Integrating Factor Formula

Now consider an equation with a function of xx in front of y\unk{y} instead of a constant:

y′+3x2y\displaystyle \rate{y'} + \coef{3x^2}\unk{y} =6x2\displaystyle = 6x^2

Here we need a multiplier M\mult{M} whose derivative brings down 3x2\coef{3x^2} in front of M\mult{M}: M′=3x2⋅M\mult{M'} = \coef{3x^2} \cdot \mult{M}.

The Integrating Factor Formula
y′+3x2y=6x2M=  ?\displaystyle \begin{aligned}\rate{y'} + \coef{3x^2}\unk{y} &= 6x^2\\[6pt]\mult{M} &= \;?\end{aligned}

For any equation in the standard form y′+P(x)y=Q(x)\rate{y'} + \coef{P(x)}\unk{y} = Q(x), this multiplier is called the integrating factor:

μ(x)=e∫P(x) dx⏟integrating factor M(x)\displaystyle \underbrace{\mult{\mu(x)} = \mult{e^{\int \coef{P(x)}\,dx}}}_{\text{integrating factor } \mult{M(x)}}

The Greek letter μ\mult{\mu} (pronounced "mu") is the standard symbol for the multiplier M(x)\mult{M(x)}. We leave off +C+C when integrating ∫P(x) dx\mult{\int} \coef{P(x)}\,\mult{dx} in the exponent because we only need one multiplier that fixes the product rule, not every possible one.

Text solution
Integrate the coefficient of y\unk{y} in the exponent of eeWith P(x)=3x2\coef{P(x) = 3x^2} sitting in front of y\unk{y}, integrating 3x2\coef{3x^2} in the exponent of ee gives the multiplier.
M=e∫3x2 dxM=ex3\displaystyle \begin{aligned} \mult{M} &= \mult{e^{\int \coef{3x^2}\,dx}} \\ \mult{M} &= \mult{e^{x^3}} \end{aligned}
Multiply by ex3\mult{e^{x^3}} and collapse the left sideMultiplying every term by ex3\mult{e^{x^3}} turns the left side into the derivative of the product ex3⋅y\mult{e^{x^3}} \cdot \unk{y}.
ex3y′+3x2ex3y=6x2ex3ddx(ex3⋅y)=6x2ex3\displaystyle \begin{aligned} \mult{e^{x^3}}\rate{y'} + \coef{3x^2}\mult{e^{x^3}}\unk{y} &= 6x^2\mult{e^{x^3}} \\ \rate{\frac{d}{dx}}\left(\mult{e^{x^3}} \cdot \unk{y}\right) &= 6x^2\mult{e^{x^3}} \end{aligned}
Integrate both sides with respect to xxOn the right side, 6x26x^2 is 22 times the derivative of the exponent x3x^3, so integrating gives 2ex3+C2e^{x^3} + C.
ex3⋅y=∫6x2ex3 dxex3⋅y=2ex3+C\displaystyle \begin{aligned} \mult{e^{x^3}} \cdot \unk{y} &= \mult{\int} 6x^2\mult{e^{x^3}}\,\mult{dx} \\ \mult{e^{x^3}} \cdot \unk{y} &= 2e^{x^3} + C \end{aligned}
Divide every term by ex3\mult{e^{x^3}}Dividing both sides by ex3\mult{e^{x^3}} gets y\unk{y} alone.
y\displaystyle \unk{y} =2+Ce−x3\displaystyle = 2 + C\mult{e^{-x^3}}

So y=2+Ce−x3\unk{y} = 2 + C\mult{e^{-x^3}} solves the equation. Whenever you collapse the left side into ddx(M⋅y)\rate{\frac{d}{dx}}(\mult{M} \cdot \unk{y}), take two seconds to expand the product rule in your head: checking that the derivative of ex3\mult{e^{x^3}} really is 3x2ex3\coef{3x^2}\mult{e^{x^3}} catches any slip in your multiplier before you integrate.

Because the area ∫P(x) dx\mult{\int} \coef{P(x)}\,\mult{dx} sits in the exponent of μ(x)=e∫P(x) dx\mult{\mu(x)} = \mult{e^{\int \coef{P(x)}\,dx}}, the slope μ′(x)\mult{\mu'(x)} at every xx is P(x)μ(x)\coef{P(x)}\mult{\mu(x)}, which makes μ(x)y′+P(x)μ(x)y\mult{\mu(x)}\rate{y'} + \coef{P(x)}\mult{\mu(x)}\unk{y} match ddx(μ(x)y)\rate{\frac{d}{dx}}(\mult{\mu(x)}\unk{y}).

For any curve you draw, putting its shaded area in the exponent makes the multiplier's slope match the coefficient in front of y everywhere, so the left side always folds into one derivative.
3

Clearing the Front of y′\rate{y'} and Simplifying Logs

Next, take an equation that starts with an xx in front of y′\rate{y'}:

xy′+2y\displaystyle x\rate{y'} + 2\unk{y} =4x2\displaystyle = 4x^2

Our product rule match only works when y′\rate{y'} is by itself, so we first divide the whole equation by xx, and then simplify the logarithm that shows up in the multiplier.

Clearing the Front of y′ and Simplifying Logs
xy′+2y=4x2y=  ?\displaystyle \begin{aligned}x\rate{y'} + 2\unk{y} &= 4x^2\\[6pt]\unk{y} &= \;?\end{aligned}
Text solution
Divide every term by xx to clear the front of y′\rate{y'}Dividing the entire equation by xx puts y′\rate{y'} by itself and shows that the coefficient in front of y\unk{y} is 2x\coef{\frac{2}{x}}.
y′+2xy\displaystyle \rate{y'} + \coef{\frac{2}{x}}\unk{y} =4x\displaystyle = 4x
Integrate 2x\coef{\frac{2}{x}} in the exponent and simplify the logarithmMoving the factor of 22 inside the natural log as an exponent lets ee and ln⁡\ln cancel completely.
M=e∫2x dxM=e2ln⁡xM=eln⁡(x2)M=x2\displaystyle \begin{aligned} \mult{M} &= \mult{e^{\int \coef{\frac{2}{x}}\,dx}} \\ \mult{M} &= \mult{e^{2\ln x}} \\ \mult{M} &= \mult{e^{\ln(x^2)}} \\ \mult{M} &= \mult{x^2} \end{aligned}
Multiply the cleared equation by x2\mult{x^2} and collapse the left sideMultiplying y′+2xy=4x\rate{y'} + \coef{\frac{2}{x}}\unk{y} = 4x by x2\mult{x^2} makes the coefficient of y\unk{y} equal to 2x\mult{2x}, the derivative of x2\mult{x^2}.
x2y′+2xy=4x3ddx(x2⋅y)=4x3\displaystyle \begin{aligned} \mult{x^2}\rate{y'} + \mult{2x}\unk{y} &= 4x^3 \\ \rate{\frac{d}{dx}}\left(\mult{x^2} \cdot \unk{y}\right) &= 4x^3 \end{aligned}
Integrate both sides and divide every term by x2\mult{x^2}Integrating gives x4+Cx^4 + C on the right, and dividing the entire equation by x2\mult{x^2} divides CC by x2\mult{x^2} as well.
x2⋅y=x4+Cy=x2+Cx2\displaystyle \begin{aligned} \mult{x^2} \cdot \unk{y} &= x^4 + C \\ \unk{y} &= x^2 + \frac{C}{\mult{x^2}} \end{aligned}

So the solution is y=x2+Cx2\unk{y} = x^2 + \frac{C}{\mult{x^2}}. Notice that we don't need absolute value bars from ∫1x dx=ln⁡∣x∣\int \frac{1}{x}\,dx = \ln|x| because squaring gives x2x^2 whether xx is positive or negative, and even with odd powers a ±\pm sign on the multiplier divides out of both sides of the equation.

At any chosen point (x0,y0)(x_0, y_0) in the slope field of xy′+2y=4x2x\rate{y'} + 2\unk{y} = 4x^2, the curve y=x2+Cx2\unk{y} = x^2 + \frac{C}{\mult{x^2}} follows the slope arrows everywhere. Adding +C+C at the end without dividing it by x2\mult{x^2} gives y=x2+C\unk{y} = x^2 + C, which cuts across the slope field whenever C≠0C \neq 0 because the Cx2\frac{C}{\mult{x^2}} term is needed for the derivatives to balance.

Dividing the constant by the integrating factor bends the curve to follow the slope field, while just adding the constant at the end shifts the curve without changing its slopes.
4

Lining Up Terms and Negative Signs

Now look at an equation where y′\rate{y'} and y\unk{y} start on opposite sides of the equals sign:

y′\displaystyle \rate{y'} =2y+e2x\displaystyle = 2\unk{y} + e^{2x}

To pack y′\rate{y'} and y\unk{y} into a product rule, both terms have to sit on the left side, and subtracting 2y2\unk{y} attaches a minus sign to the coefficient of y\unk{y}.

Lining Up Terms and Negative Signs
y′=2y+e2xy=  ?\displaystyle \begin{aligned}\rate{y'} &= 2\unk{y} + e^{2x}\\[6pt]\unk{y} &= \;?\end{aligned}
Text solution
Subtract 2y2\unk{y} to bring y′\rate{y'} and y\unk{y} to the left sideMoving 2y2\unk{y} to the left puts the equation in standard form with −2\coef{-2} in front of y\unk{y}.
y′−2y\displaystyle \rate{y'} \coef{{}- 2}\unk{y} =e2x\displaystyle = e^{2x}
Integrate −2\coef{-2} in the exponent to find the multiplierKeeping the negative sign attached to 2\coef{2} inside the integral gives a negative exponent on ee.
M=e∫−2 dxM=e−2x\displaystyle \begin{aligned} \mult{M} &= \mult{e^{\int \coef{-2}\,dx}} \\ \mult{M} &= \mult{e^{-2x}} \end{aligned}
Multiply by e−2x\mult{e^{-2x}} and collapse the left sideBecause the derivative of e−2x\mult{e^{-2x}} is −2e−2x\coef{-2}\mult{e^{-2x}}, the left side packs into ddx(e−2x⋅y)\rate{\frac{d}{dx}}\left(\mult{e^{-2x}} \cdot \unk{y}\right), while on the right side e−2x⋅e2x\mult{e^{-2x}} \cdot e^{2x} adds exponents to become e0=1e^0 = 1.
e−2xy′−2e−2xy=e−2x⋅e2xddx(e−2x⋅y)=1\displaystyle \begin{aligned} \mult{e^{-2x}}\rate{y'} \coef{{}- 2}\mult{e^{-2x}}\unk{y} &= \mult{e^{-2x}} \cdot e^{2x} \\ \rate{\frac{d}{dx}}\left(\mult{e^{-2x}} \cdot \unk{y}\right) &= 1 \end{aligned}
Integrate both sides and divide by e−2x\mult{e^{-2x}}Integrating 11 gives x+Cx + C, and dividing by e−2x\mult{e^{-2x}} multiplies each term on the right by e2x\mult{e^{2x}}.
e−2x⋅y=x+Cy=xe2x+Ce2x\displaystyle \begin{aligned} \mult{e^{-2x}} \cdot \unk{y} &= x + C \\ \unk{y} &= xe^{2x} + C\mult{e^{2x}} \end{aligned}

So y=xe2x+Ce2x\unk{y} = xe^{2x} + C\mult{e^{2x}} is the solution.

5

Putting the Whole Method Together

Every first-order linear differential equation follows the same four steps from initial setup to final division.

The Four-Step Story
y′+P(x)y=Q(x)y=  ?\displaystyle \begin{aligned}\rate{y'} + \coef{P(x)}\unk{y} &= Q(x)\\[6pt]\unk{y} &= \;?\end{aligned}

Key concepts

Before reaching for an integrating factor, check whether a simpler method already works: if the equation only has xx's on the right, like y′=2x\rate{y'} = 2x, integrate directly to get y=x2+C\unk{y} = x^2 + C; if the right side is a function of xx times a function of y\unk{y}, like y′=2y\rate{y'} = 2\unk{y}, divide by y\unk{y} and separate variables. Use the integrating factor when y′\rate{y'} and y\unk{y} are added or subtracted and the variables won't separate, like y′+2y=ex\rate{y'} + \coef{2}\unk{y} = e^x, where y′=ex−2y\rate{y'} = e^x - 2\unk{y} is a difference of an xx term and a y\unk{y} term rather than a product.

To solve any first-order linear equation, follow the four moves that build and undo the product rule:

Line up and clear the front of y′\rate{y'}

into the standard form y′+P(x)y=Q(x)\rate{y'} + \coef{P(x)}\unk{y} = Q(x). Move the y\unk{y} term to the left and divide every term by whatever sits in front of y′\rate{y'} (so xy′=2y+x3x\rate{y'} = 2\unk{y} + x^3 becomes y′−2xy=x2\rate{y'} \coef{{}- \frac{2}{x}}\unk{y} = x^2).

Find the multiplier

by integrating the entire coefficient P(x)\coef{P(x)}, including its plus or minus sign, in the exponent of ee:

M(x)\displaystyle \mult{M(x)} =e∫P(x) dx\displaystyle = \mult{e^{\int \coef{P(x)}\,dx}}
If a logarithm appears in the exponent, move the number in front (sign included) inside the log as an exponent so ee and ln⁡\ln cancel directly (e−2ln⁡x=eln⁡(x−2)=x−2\mult{e^{-2\ln x}} = \mult{e^{\ln(x^{-2})}} = \mult{x^{-2}}).

Multiply and collapse

the left side into a single product derivative:

ddx(M⋅y)\displaystyle \rate{\frac{d}{dx}}\left(\mult{M} \cdot \unk{y}\right) =M⋅Q(x)\displaystyle = \mult{M} \cdot Q(x)
Quickly differentiate M⋅y\mult{M} \cdot \unk{y} in your head to verify that M′\mult{M'} matches the term in front of y\unk{y}.

Integrate and divide

both sides, including +C+C, by the multiplier M\mult{M} to isolate y\unk{y}:

y\displaystyle \unk{y} =∫M⋅Q(x) dx+CM\displaystyle = \frac{\mult{\int} \mult{M} \cdot Q(x)\,\mult{dx} + C}{\mult{M}}

6

Practice

1

Solve y′+3y=e2x\rate{y'} + 3\unk{y} = e^{2x}.

The equation is already in y′+P(x)y=Q(x)\rate{y'} + \coef{P(x)}\unk{y} = Q(x) form. What number sits in front of y\unk{y}, and what multiplier M\mult{M} has a derivative equal to 3M3\mult{M}?

With P(x)=3\coef{P(x) = 3}, integrate 3\coef{3} in the exponent of ee to find the multiplier:
M=e∫3 dxM=e3x\displaystyle \begin{aligned} \mult{M} &= \mult{e^{\int \coef{3}\,dx}} \\ \mult{M} &= \mult{e^{3x}} \end{aligned}
Multiply every term by e3x\mult{e^{3x}} and collapse the left side into a single derivative:
e3xy′+3e3xy=e3x⋅e2xddx(e3x⋅y)=e5x\displaystyle \begin{aligned} \mult{e^{3x}}\rate{y'} + \coef{3}\mult{e^{3x}}\unk{y} &= \mult{e^{3x}} \cdot e^{2x} \\ \rate{\frac{d}{dx}}\left(\mult{e^{3x}} \cdot \unk{y}\right) &= e^{5x} \end{aligned}
(Watch out: remember to multiply the right side e2xe^{2x} by e3x\mult{e^{3x}} as well, adding the exponents to get e5xe^{5x}; leaving the right side as e2xe^{2x} leads to the wrong answer y=12e−x+Ce−3xy = \frac{1}{2}e^{-x} + Ce^{-3x}.)
Integrate both sides with respect to xx and divide every term, including CC, by e3x\mult{e^{3x}}:
e3x⋅y=15e5x+Cy=15e2x+Ce−3x\displaystyle \begin{aligned} \mult{e^{3x}} \cdot \unk{y} &= \frac{1}{5}e^{5x} + C \\ \unk{y} &= \frac{1}{5}e^{2x} + C\mult{e^{-3x}} \end{aligned}
2

Solve y′+2xy=4x\rate{y'} + 2x\unk{y} = 4x.

A function of xx sits in front of y\unk{y}. Integrate P(x)=2x\coef{P(x) = 2x} in the exponent of ee to get the multiplier, then notice how the derivative of your new exponent, times 2, sits right out in front on the right side.

Integrate P(x)=2x\coef{P(x) = 2x} in the exponent of ee:
M=e∫2x dxM=ex2\displaystyle \begin{aligned} \mult{M} &= \mult{e^{\int \coef{2x}\,dx}} \\ \mult{M} &= \mult{e^{x^2}} \end{aligned}
Multiply every term by ex2\mult{e^{x^2}} and collapse the left side:
ex2y′+2xex2y=4xex2ddx(ex2⋅y)=4xex2\displaystyle \begin{aligned} \mult{e^{x^2}}\rate{y'} + \coef{2x}\mult{e^{x^2}}\unk{y} &= 4x\mult{e^{x^2}} \\ \rate{\frac{d}{dx}}\left(\mult{e^{x^2}} \cdot \unk{y}\right) &= 4x\mult{e^{x^2}} \end{aligned}
Integrate both sides (using u=x2u = x^2, where du=2x dxdu = 2x\,dx is half of 4x dx4x\,dx) and divide by ex2\mult{e^{x^2}}:
ex2⋅y=∫4xex2 dxex2⋅y=2ex2+Cy=2+Ce−x2\displaystyle \begin{aligned} \mult{e^{x^2}} \cdot \unk{y} &= \mult{\int} 4x\mult{e^{x^2}}\,\mult{dx} \\ \mult{e^{x^2}} \cdot \unk{y} &= 2e^{x^2} + C \\ \unk{y} &= 2 + C\mult{e^{-x^2}} \end{aligned}
(Watch out: when integrating 4xex24x\mult{e^{x^2}}, the factor 2x2x gets absorbed as the derivative of the exponent x2x^2; integrating 4x4x to 2x22x^2 as if ex2\mult{e^{x^2}} were a constant gives the wrong answer y=2x2+Ce−x2y = 2x^2 + Ce^{-x^2}.)
3

Solve xy′+3y=5x2x\rate{y'} + 3\unk{y} = 5x^2.

Is y′\rate{y'} by itself yet? Clear the front of y′\rate{y'} before reading off P(x)\coef{P(x)}, and simplify the logarithm in the multiplier before multiplying.

Divide every term by xx so y′\rate{y'} stands alone:
y′+3xy\displaystyle \rate{y'} + \coef{\frac{3}{x}}\unk{y} =5x\displaystyle = 5x
(Watch out: reading P(x)=3\coef{P(x)} = 3 before dividing by xx gives the wrong multiplier e3xe^{3x}, and forgetting to divide the right side 5x25x^2 by xx leaves 5x25x^2 and leads to the wrong answer y=56x3+Cx3y = \frac{5}{6}x^3 + \frac{C}{x^3}.)
Find the multiplier and move the 33 inside the log so ee and ln⁡\ln cancel:
M=e∫3x dxM=e3ln⁡xM=eln⁡(x3)M=x3\displaystyle \begin{aligned} \mult{M} &= \mult{e^{\int \coef{\frac{3}{x}}\,dx}} \\ \mult{M} &= \mult{e^{3\ln x}} \\ \mult{M} &= \mult{e^{\ln(x^3)}} \\ \mult{M} &= \mult{x^3} \end{aligned}
Multiply the cleared equation by x3\mult{x^3}, collapse the left side, integrate, and divide every term by x3\mult{x^3}:
x3y′+3x2y=5x4ddx(x3⋅y)=5x4x3⋅y=x5+Cy=x2+Cx3\displaystyle \begin{aligned} \mult{x^3}\rate{y'} + \mult{3x^2}\unk{y} &= 5x^4 \\ \rate{\frac{d}{dx}}\left(\mult{x^3} \cdot \unk{y}\right) &= 5x^4 \\ \mult{x^3} \cdot \unk{y} &= x^5 + C \\ \unk{y} &= x^2 + \frac{C}{\mult{x^3}} \end{aligned}
4

Solve y′=4y+e4x\rate{y'} = 4\unk{y} + e^{4x}.

Bring the y\unk{y} term to the left side first. What sign stays attached to the coefficient of y\unk{y} when you set up the integral for the multiplier?

Subtract 4y4\unk{y} from both sides to line up y′\rate{y'} and y\unk{y} on the left:
y′−4y\displaystyle \rate{y'} \coef{{}- 4}\unk{y} =e4x\displaystyle = e^{4x}
Integrate P(x)=−4\coef{P(x) = -4} in the exponent of ee:
M=e∫−4 dxM=e−4x\displaystyle \begin{aligned} \mult{M} &= \mult{e^{\int \coef{-4}\,dx}} \\ \mult{M} &= \mult{e^{-4x}} \end{aligned}
(Watch out: dropping the minus sign and using M=e4x\mult{M} = e^{4x} fails to fix the product rule on the left, and if you keep going anyway, it turns the right side into e8xe^{8x} and gives the wrong answer y=18e4x+Ce−4xy = \frac{1}{8}e^{4x} + Ce^{-4x}.)
Multiply by e−4x\mult{e^{-4x}}, collapse the left side, integrate 11, and divide by e−4x\mult{e^{-4x}}:
e−4xy′−4e−4xy=e−4x⋅e4xddx(e−4x⋅y)=1e−4x⋅y=x+Cy=xe4x+Ce4x\displaystyle \begin{aligned} \mult{e^{-4x}}\rate{y'} \coef{{}- 4}\mult{e^{-4x}}\unk{y} &= \mult{e^{-4x}} \cdot e^{4x} \\ \rate{\frac{d}{dx}}\left(\mult{e^{-4x}} \cdot \unk{y}\right) &= 1 \\ \mult{e^{-4x}} \cdot \unk{y} &= x + C \\ \unk{y} &= xe^{4x} + C\mult{e^{4x}} \end{aligned}
5

Solve xy′=2y+x3x\rate{y'} = 2\unk{y} + x^3.

Line up the y\unk{y} term on the left and clear the front of y′\rate{y'} before integrating for the multiplier. When simplifying e−2ln⁡x\mult{e^{-2\ln x}}, does the minus sign move inside the log along with the 22?

Subtract 2y2\unk{y} to bring it to the left side, then divide every term by xx to clear the front of y′\rate{y'}:
xy′−2y=x3y′−2xy=x2\displaystyle \begin{aligned} x\rate{y'} - 2\unk{y} &= x^3 \\ \rate{y'} \coef{{}- \frac{2}{x}}\unk{y} &= x^2 \end{aligned}
Integrate −2x\coef{-\frac{2}{x}} in the exponent of ee and move the entire −2-2 inside the logarithm as an exponent:
M=e∫−2x dxM=e−2ln⁡xM=eln⁡(x−2)M=x−2\displaystyle \begin{aligned} \mult{M} &= \mult{e^{\int \coef{-\frac{2}{x}}\,dx}} \\ \mult{M} &= \mult{e^{-2\ln x}} \\ \mult{M} &= \mult{e^{\ln(x^{-2})}} \\ \mult{M} &= \mult{x^{-2}} \end{aligned}
(Watch out: dropping the minus sign to get M=x2\mult{M} = x^2 instead of x−2\mult{x^{-2}} turns the right side into x4x^4 and leads to the wrong answer y=15x3+Cx−2y = \frac{1}{5}x^3 + Cx^{-2}.)
Multiply the cleared equation by x−2\mult{x^{-2}}, collapse the left side, integrate 11, and divide by x−2\mult{x^{-2}}:
x−2y′−2x−3y=x−2⋅x2ddx(x−2⋅y)=1x−2⋅y=x+Cy=x3+Cx2\displaystyle \begin{aligned} \mult{x^{-2}}\rate{y'} \mult{{}- 2x^{-3}}\unk{y} &= \mult{x^{-2}} \cdot x^2 \\ \rate{\frac{d}{dx}}\left(\mult{x^{-2}} \cdot \unk{y}\right) &= 1 \\ \mult{x^{-2}} \cdot \unk{y} &= x + C \\ \unk{y} &= x^3 + C\mult{x^2} \end{aligned}