# Solve the Differential Equation y'' - 4 y' + 4y = 2 e^(2x)?

Mar 17, 2017

${y}_{g} = {e}^{2 x} \left({x}^{2} + 2 x + 1\right)$

#### Explanation:

Method of Undetermined Coefficients

$y ' ' - 4 y ' + 4 y = 0$

This has characteristic equation:

${\lambda}^{2} - 4 \lambda + 4 = 0 \implies {\left(\lambda - 2\right)}^{2} = 0$

Repeated roots mean that, in lieu of the usual solution ${y}_{c} = \alpha {e}^{{\lambda}_{1} x} + \beta {e}^{{\lambda}_{2} x}$, we look here for a solution in the form:

${y}_{c} = {e}^{2 x} \left(\alpha x + \beta\right)$

And because the non-homogeneous equation already has a ${e}^{2 x}$ term, we must look at a particular solution in the form:

${y}_{p} = \gamma {x}^{2} {e}^{2 x}$
$\implies y ' = 2 \gamma x {e}^{2 x} + 2 \gamma {x}^{2} {e}^{2 x}$
$\implies y ' ' = 2 \gamma {e}^{2 x} + 8 \gamma x {e}^{2 x} + 4 \gamma {x}^{2} {e}^{2 x}$

Putting these into the equation:

$2 \gamma {e}^{2 x} + 8 \gamma x {e}^{2 x} + 4 \gamma {x}^{2} {e}^{2 x} - 4 \left(2 \gamma x {e}^{2 x} + 2 \gamma {x}^{2} {e}^{2 x}\right) + 4 \gamma {x}^{2} {e}^{2 x} = 2 {e}^{2 x}$

$\implies \gamma = 1$ and ${y}_{p} = {x}^{2} {e}^{2 x}$

The general solution is: ${y}_{g} = {y}_{c} + {y}_{p}$

${y}_{g} = {e}^{2 x} \left(\alpha x + \beta\right) + {x}^{2} {e}^{2 x}$

$= {e}^{2 x} \left({x}^{2} + \alpha x + \beta\right)$

Now applying the IV's:

$y \left(0\right) = 1 \implies \beta = 1 \implies {y}_{g} = {e}^{2 x} \left({x}^{2} + \alpha x + 1\right)$

$y ' = 2 {e}^{2 x} \left({x}^{2} + \alpha x + 1\right) + {e}^{2 x} \left(2 x + \alpha\right)$

$= {e}^{2 x} \left(2 {x}^{2} + \left(2 \alpha + 2\right) x + \left(2 + \alpha\right)\right)$

And from the second IV, $y ' \left(0\right) = 4 \implies \alpha = 2$

${y}_{g} = {e}^{2 x} \left({x}^{2} + 2 x + 1\right)$

Mar 17, 2017

The solution is $y \left(x\right) = {\left(x + 1\right)}^{2} {e}^{2 x}$

#### Explanation:

$y ' ' - 4 y ' + 4 y = 2 {e}^{2 x}$

This is a second order linear, non-homogeneous differential equation.

The general solution can be written as

$y = {y}_{p} + {y}_{h}$

${y}_{h}$ is the solution to $y ' ' - 4 y ' + 4 y = 0$

${y}_{p}$ is the particular solution

The caracteristic equation is

${r}^{2} - 4 r + 4 = 0$

${\left(r - 2\right)}^{2} = 0$

We have a double root

The solution without the LHS is

${y}_{h} = \left(A x + B\right) {e}^{2 x}$

For the particular solution, we try

${y}_{p} = C {x}^{2} {e}^{2 x}$

$y ' = C \left(2 x {e}^{2 x} + 2 {x}^{2} {e}^{2 x}\right)$

$y ' = 2 C {e}^{2 x} \left(x + {x}^{2}\right)$

$y ' ' = 2 C \left(2 {e}^{2 x} \left(x + {x}^{2}\right) + {e}^{2 x} \left(1 + 2 x\right)\right)$

Putting these in the equation

$2 C \left(2 {e}^{2 x} \left(x + {x}^{2}\right) + {e}^{2 x} \left(1 + 2 x\right)\right) - 4 \cdot 2 C {e}^{2 x} \left(x + {x}^{2}\right) + 4 \cdot C {x}^{2} {e}^{2 x} = 2 {e}^{2 x}$

$4 C x + 4 c {x}^{2} + 2 C + 4 C x - 8 C x - 8 C {x}^{2} + 4 c {x}^{2} = 2$

$C = 1$

So, the particular solution is

${y}_{p} = {x}^{2} {e}^{2 x}$

The general solution is

$y = \left(A x + B\right) {e}^{2 x} + {x}^{2} {e}^{2 x}$

$y \left(0\right) = B = 1$

$y ' = A {e}^{2 x} + 2 \left(A x + B\right) {e}^{2 x} + 2 x {e}^{2 x} + 2 {x}^{2} {e}^{2 x}$

$y ' \left(0\right) = A + 2 B = 4$

$A = 4 - 2 = 2$

Finally, we have

$y \left(x\right) = \left(2 x + 1\right) {e}^{2 x} + {x}^{2} {e}^{2 x}$

$= {e}^{2 x} \left({x}^{2} + 2 x + 1\right)$

$= {\left(x + 1\right)}^{2} {e}^{2 x}$

Mar 17, 2017

The two other solutions quite clearly demonstrate how to solve the complementary solution of the homogeneous equation.

$y ' ' - 4 y ' + 4 y = 0$

As this is fairly standard text book stuff which solves the Auxiliary equation to form a guaranteed solution based of the roots of the equation

The interesting part is find the solution of the particular function, and where did the magic "lets try" $y = C {x}^{2} {e}^{2 x}$ come from?

Basically it is down to practice & experience but there is a solid method to find the particular solution using the Wronskian. It does, however, involve a lot more work:

Having established that the solution of the homogeneous equation is (see other answers):

${y}_{c} = \left(A x + B\right) {e}^{2 x}$
$\setminus \setminus \setminus = A x {e}^{2 x} + B {e}^{2 x}$

The reason this form of solution works is that the two individual components $x {e}^{2 x}$ and ${e}^{2 x}$ are linearly independent.

Once we have two linearly independent solutions say ${y}_{1} \left(x\right)$ and ${y}_{2} \left(x\right)$ then the particular solution of the general DE;

$a y ' ' + b y ' + c y = p \left(x\right)$

is given by:

${y}_{p} = {v}_{1} {y}_{1} + {v}_{2} {y}_{2} \setminus \setminus$, which are all functions of $x$

Where:

${v}_{1} = - \int \setminus \frac{p \left(x\right) {y}_{2}}{W \left[{y}_{1} , {y}_{2}\right]} \setminus \mathrm{dx}$
${v}_{2} = \setminus \setminus \setminus \setminus \setminus \int \setminus \frac{p \left(x\right) {y}_{1}}{W \left[{y}_{1} , {y}_{2}\right]} \setminus \mathrm{dx}$

And, $W \left[{y}_{1} , {y}_{2}\right]$ is the wronskian; defined by the following determinant:

$W \left[{y}_{1} , {y}_{2}\right] = | \left({y}_{1} , {y}_{2}\right) , \left(y {'}_{1} , y {'}_{2}\right) |$

So for our equation:

$p \left(x\right) = 2 {e}^{2 x}$
${y}_{1} \setminus \setminus \setminus = x {e}^{2 x} \implies y {'}_{1} = 2 x {e}^{2 x} + {e}^{2 x}$
${y}_{2} \setminus \setminus \setminus = {e}^{2 x} \setminus \setminus \implies y {'}_{2} = 2 {e}^{2 x}$

So the wronskian for this equation is:

$W \left[{y}_{1} , {y}_{2}\right] = | \left(x {e}^{2 x} , , {e}^{2 x}\right) , \left(2 x {e}^{2 x} + {e}^{2 x} , , 2 {e}^{2 x}\right) |$
$\text{ } = \left(x {e}^{2 x}\right) \left(2 {e}^{2 x}\right) - \left({e}^{2 x}\right) \left(2 x {e}^{2 x} + {e}^{2 x}\right)$
$\text{ } = \left({e}^{2 x}\right) \left(2 x {e}^{2 x} - 2 x {e}^{2 x} - {e}^{2 x}\right)$
$\text{ } = - {e}^{4 x}$

So we form the two particular solution function:

${v}_{1} = - \int \setminus \frac{p \left(x\right) {y}_{2}}{W \left[{y}_{1} , {y}_{2}\right]} \setminus \mathrm{dx}$
$\setminus \setminus \setminus = - \int \setminus \frac{\left(2 {e}^{2 x}\right) \left({e}^{2 x}\right)}{\left(- {e}^{4 x}\right)} \setminus \mathrm{dx}$
$\setminus \setminus \setminus = \int \setminus 2 \setminus \mathrm{dx}$
$\setminus \setminus \setminus = 2 x$

And;

${v}_{2} = \setminus \setminus \setminus \setminus \setminus \int \setminus \frac{p \left(x\right) {y}_{1}}{W \left[{y}_{1} , {y}_{2}\right]} \setminus \mathrm{dx}$
$\setminus \setminus \setminus = \int \setminus \frac{\left(2 {e}^{2 x}\right) \left(x {e}^{2 x}\right)}{- {e}^{4 x}} \setminus \mathrm{dx}$
$\setminus \setminus \setminus = \int \setminus - 2 x \setminus \mathrm{dx}$
$\setminus \setminus \setminus = - {x}^{2}$

And so we form the Particular solution:

${y}_{p} = {v}_{1} {y}_{1} + {v}_{2} {y}_{2}$
$\setminus \setminus \setminus = \left(2 x\right) \left(x {e}^{2 x}\right) + \left(- {x}^{2}\right) \left({e}^{2 x}\right)$
$\setminus \setminus \setminus = {e}^{2 x} \left(2 {x}^{2} - {x}^{2}\right)$
$\setminus \setminus \setminus = {x}^{2} {e}^{2 x}$

Which is the same particular solution as the other answers produced, leading to the general solution:

$y \left(x\right) = {y}_{c} + {y}_{p}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus = A x {e}^{2 x} + B {e}^{2 x} + {x}^{2} {e}^{2 x}$

Which then leads to the same specific solution of the other answers.

Mar 17, 2017

Another approach using the fact that $\frac{d}{\mathrm{dx}}$ is a linear operator.

#### Explanation:

Mary Boas teaches this in a way I not see very widely used, but which also obviates the need for the experienced guesswork.

If we note that $D = \frac{d}{\mathrm{dx}}$ is a linear operator, we can take the original equation and write it as this:

$y ' ' - 4 y ' + 4 y = 2 {e}^{2 x}$

$\implies {D}^{2} y - 4 D y + 4 y = 2 {e}^{2 x}$

$\left(D - 2\right) \left(D - 2\right) y = 2 {e}^{2 x}$

So it already looks like the eigenvalue form you'd get from a linear system, but is non-homogeneous. Then we can say that $z \left(x\right) = \left(D - 2\right) y \left(x\right)$ so we have this more trivial Integrating Factor problem:

$\left(D - 2\right) z = 2 {e}^{2 x}$

$z ' - 2 z = 2 {e}^{2 x}$

Integrating factor $= \exp \left(\int - 2 \setminus \mathrm{dx}\right)$

${e}^{- 2 x} \left(z ' - 2 z\right) = 2 {e}^{2 x} {e}^{- 2 x}$

$\left(z {e}^{- 2 x}\right) ' = 2$

$z {e}^{- 2 x} = 2 x + \alpha$

$\left(D - 2\right) y = {e}^{2 x} \left(2 x + \alpha\right)$

$y ' - 2 y = {e}^{2 x} \left(2 x + \alpha\right)$

(You can even apply the $y ' \left(0\right) = 4$ I.V. here (!!).)

So, it's another Integrating Factor: $= \exp \left(\int - 2 \setminus \mathrm{dx}\right)$

${e}^{- 2 x} \left(y ' - 2 y\right) = 2 x + \alpha$

$\left({e}^{- 2 x} y\right) ' = 2 x + \alpha$

${e}^{- 2 x} y = {x}^{2} + \alpha x + \beta$

$y = {e}^{- 2 x} \left({x}^{2} + \alpha x + \beta\right)$

And then apply the IV's as before.

Boas is my personal favourite maths book, but it's for scientists, not mathematicians. But this is a real good way to go at repeated eigenvalues, which are tricky.

Mar 17, 2017

$y = {e}^{2 x} {\left(x + 1\right)}^{2}$

#### Explanation:

Laplace Transform

$y ' ' - 4 y ' + 4 y = 2 {e}^{2 x}$

${p}^{2} Y - p {y}_{o} - {y}_{0} ' - 4 \left(p Y - {y}_{o}\right) + 4 Y = \frac{2}{p - 2}$

We have the IV's at $x = 0$, so:

${p}^{2} Y - p - 4 - 4 p Y + 4 + 4 Y = \frac{2}{p - 2}$

$Y \left({p}^{2} - 4 p + 4\right) = p + \frac{2}{p - 2}$

$Y = \frac{p}{p - 2} ^ 2 + \frac{2}{p - 2} ^ 3$

From Standard Tables, here using Mary Boas 3rd Ed, L6 and L18, pp469-470:

$y = {e}^{2 x} \left(1 + 2 x\right) + {e}^{2 x} {x}^{2}$

$= {e}^{2 x} {\left(x + 1\right)}^{2}$