Steply

Solve xy' + 2y = 5x^2

Step by step, with the reason for every step · The integrating factor · Differential Equations

Step by step

The question

Question: solve xy′ + 2y = 5x².

xy′ + 2y = 5x2

1 Standard form

Linear means this form: y′ + P y = Q.

P and Q have only x.

linear: y′ + P(x) y = Q(x)

Divide everything by x, so y′ is alone at the front.

y′ + 2xy = 5x
÷ x

Here P = 2/x and Q = 5x.

P = 2x, Q = 5x

2 The integrating factor

The integrating factor is e to the integral of P.

Multiplying by it makes the left side one derivative.

integrating factor: μ = e^(∫P dx)

First the integral of P: the integral of 2/x is 2 ln x.

Take x > 0.

∫ 2x dx = 2 ln x

So the integrating factor is e to that power.

μ = e^(2 ln x)

A number in front of ln goes up as a power: 2 ln x = ln x².

μ = e^(ln x²)

And e to the ln of something is just that something.

So the integrating factor is x².

μ = x2
e^(ln a) = a

3 Multiply both sides

Multiply both sides by x².

Every term, on both sides.

x2y′ + 2xy = 5x3

Careful!

The right side is multiplied by x² too.

Both sides, always.

Careful: not (x2y)′ = 5x ✗

4 One derivative on the left

By the product rule, the derivative of x² × y is exactly our left side.

(μy)′ = μy′ + μ′y
μ′ = 2x

So the left side is just (x²y)′: one derivative.

(x2y)′ = 5x3

5 Integrate both sides

Integrate both sides.

The integral of a derivative is the function itself.

x2y = ∫ (5x3) dx

On the right: 5/4 × x⁴, and + C.

x2y = 54x4 + C

6 Solve for y

Divide both sides by x².

y = 54x2 + Cx2

Divide each term.

x to a power over x²: take away the powers.

y = 54x2 + Cx2

7 Check

Let's check: put y back in.

First y′ is 5/2 × x − 2C/x³.

y′ = 52x − 2Cx3

Then y′ + (2/x) × y.

y′ + 2xy = 52x − 2Cx3 + 2x(54x2 + Cx2)

The C parts cancel, and we get 5x: Q again.

Right!

= 5x

Let's look back.

First: standard form.

Then: the integrating factor.

Then: multiply both sides.

Then: one derivative on the left.

Then: integrate both sides.

Then: solve for y.

Last: check.

Answer
y = 54x2 + Cx2

Your turn

Try this one yourself, then check:

Solve xy′ + 2y = 8x5
Show the answer
y = 87x5 + Cx2

More from The integrating factor

The whole lesson: The integrating factor →