Steply

Solve y'' - 5y' + 6y = 12, y(0) = 3, y'(0) = 5

Step by step, with the reason for every step · Undetermined coefficients · Differential Equations

Step by step

The question

Question: solve y″ − 5y′ + 6y = 12, with y(0) = 3 and y′(0) = 5.

y″ − 5y′ + 6y = 12
y(0) = 3, y′(0) = 5

The answer has two parts: the plain part, which solves the equation with 0 on the right, plus one extra solution that makes 12.

y = yc + yp: the plain part + one extra solution

1 Solve with 0 on the right

Try y = e^(rx): the characteristic equation is r² − 5r + 6 = 0.

r2 − 5r + 6 = 0
y″ → r², y′ → r, y → 1

Two numbers that multiply to 6 and add to −5: −2 and −3.

−2 × (−3) = 6, −2 + (−3) = −5

So it factors: (r − 2)(r − 3) = 0.

(r − 2)(r − 3) = 0

Each bracket can be 0: r = 2 or r = 3.

r = 2 or r = 3

Each root gives a solution e^(rx).

Any mix of the two works, so we add them with two numbers, C₁ and C₂.

two roots r₁, r₂: C₁e^(r₁x) + C₂e^(r₂x)

So the plain part is C₁e^(2x) + C₂e^(3x).

yc = C1e^(2x) + C2e^(3x)

2 Guess the extra part

The extra part has the same shape as the right side: just a number.

a number → A

So we guess A for the extra part.

A is the numbers we must find.

yp = A

3 Put the guess in

Its derivative.

y′p = 0

And once more.

y″p = 0

Put them into the left side.

0 − 5(0) + 6 × A = 12

Multiply out and put like parts together.

6A = 12

4 Match the parts

The two sides must match, part by part: the same amount of each shape.

number parts: 6A = 12
same shape → same number

So A = 2.

A = 2

So the extra part is 2.

yp = 2

5 Add the parts

Add the parts first.

The starting values are for the whole y.

y = C1e^(2x) + C2e^(3x) + 2

6 Use the starting values

We need y′ too: the derivative of our y.

y′ = 2C1e^(2x) + 3C2e^(3x)
at x = 0: e^(0) = 1,

Put x = 0 into y: C₁ + C₂ + 2 = 3.

① C1 + C2 + 2 = 3

Move the 2 over.

① C1 + C2 = 1

Put x = 0 into y′: 2C₁ + 3C₂ = 5.

② 2C1 + 3C2 = 5

From ①: C₁ = 1 − C₂.

C1 = 1 − C2

Put it into ②.

2(1 − C2) + 3C2 = 5

Open the bracket and collect: 2 × 1 moves over.

C2 = 3

So C₂ = 3, and C₁ = −2.

C2 = 3

Put them in: y = −2e^(2x) + 3e^(3x) + 2.

y = −2e^(2x) + 3e^(3x) + 2

7 Check

Let's check the extra part: put 2 into the left side.

put in yp: 0 − 5(0) + 6 × 2

It gives 12: the right side.

Right!

= 12

And the starting values: 3 and 5.

Right!

y(0) = 3, y′(0) = 5

Let's look back.

First: solve with 0 on the right.

Then: guess the extra part.

Then: put the guess in.

Then: match the parts.

Then: add the parts.

Then: use the starting values.

Last: check.

Answer
y = −2e^(2x) + 3e^(3x) + 2

Your turn

Try this one yourself, then check:

Solve y″ − 5y′ + 6y = 12
Show the answer
y = −3e^(2x) + 2e^(3x) + 2

More from Undetermined coefficients

The whole lesson: Undetermined coefficients →