# Thread: DE - General Solution

1. ## DE - General Solution

${d^2y}{dx^2}-4\frac{dy}{dx}+4y=e^{2x}$

(Particular integral (hoping that's what P.I. means) is $Ax^2e^{2x}$)

General Solution required

2. Originally Posted by Lonehwolf
${d^2y}{dx^2}-4\frac{dy}{dx}+4y=e^{2x}$

(Particular integral (hoping that's what P.I. means) is $Ax^2e^{2x}$)

General Solution required
Auxiliary equation:

$\lambda^2 - 4\lambda + 4 = 0$

$(\lambda - 2)^2 = 0$

$\lambda = \pm 2$

The complimentary function is a solution of the equation and is given by $y_c(x) = Be^{\lambda x} + xCe^{\lambda x}$ if the roots of the auxiliary equation are repeated roots. Hence:

$y_c(x) = Be^{2x} + xCe^{2x}$

Particular integral is given as:

$y_p(x) = Ax^2e^{2x}$

Differentiation twice gives:

$\frac{dy_{p}}{dx} = A(2xe^{2x} + 2x^2e^{2x})$

$\frac{d^2y_{p}}{dx^2} = A(2e^{2x} + 4xe^{2x} + 4xe^{2x}+4x^2e^{2x})$

Plug these into the original equation, and compare coefficients of $e^{2x}$ on the RHS and LHS. Solve for A.

After that, you will have a solution:

$y(x) = y_c(x) + y_p(x)$

3. Originally Posted by Lonehwolf
${d^2y}{dx^2}-4\frac{dy}{dx}+4y=e^{2x}$

(Particular integral (hoping that's what P.I. means) is $Ax^2e^{2x}$)

General Solution required
I assume the equation is

$\frac{d^2y}{dx^2}-4\frac{dy}{dx}+4y=e^{2x}$

Also when I teach 2nd order DEs I assume the complementary function has all the arbitrary constants and the particular integral is constant free. You need to solve for A from the DE as given by Mush above... When you substitute and solve you find A = 1/2

$y_p = \frac{1}{2}x^2e^{2x}.$

With that out of the way, you want the general solution which is a combination of the the complementary function $y_c$ and the particular integral. The the complementary function is the solution of the homogeneous equation. IE

$\frac{d^2y_c}{dx^2}-4\frac{dy_c}{dx}+4y_c=0$.

So you have a linear 2nd order de. The standard way to solve these is to make an exponential trial solution of

$y_c = e^{mx}$.

When we substitute and simplify we get

$(m^2 - 4m +4)e^{mx} = 0$

Since $e^{mx} \ne 0$ we can derive the auxiliary equation

$m^2 - 4m + 4 = 0$

$(m-2)^2 = 0$

So $m = 2$

When there are two equal root of the Auxiliary Equation the complementary function takes the form

$y_c = (C_1 x + C_2)e^{2x}.$

So the general solution is

$y = y_c + y_p = (C_1 x + C_2)e^{2x} + \frac{1}{2}x^2e^{2x}.$

HTH

4. Originally Posted by Mush
$\lambda = \pm 2$
Hi Mush, the $\pm$ is misplaced here. However, it doesn't affect the rest of your reply.

5. Originally Posted by Rincewind
Hi Mush, the $\pm$ is misplaced here. However, it doesn't affect the rest of your reply.
Ah, yes. Thanks for pointing that out.

6. Originally Posted by Mush
Auxiliary equation:
The complimentary function is a solution of the equation and is given by $y_c(x) = Be^{\lambda x} + xCe^{\lambda x}$ if the roots of the auxiliary equation are repeated roots.
I don't get this, what do the subscripts mean? I'm slightly confused from this step onwards, I haven't ever recalled using those subscripts, not in differentiation nor anywhere else when tackling DEs, unless this is one hell of a monster I can't follow from here onwards, maybe someone can put it in another, possibly simpler way?

7. Originally Posted by Lonehwolf
I don't get this, what do the subscripts mean? I'm slightly confused from this step onwards, I haven't ever recalled using those subscripts, not in differentiation nor anywhere else when tackling DEs, unless this is one hell of a monster I can't follow from here onwards, maybe someone can put it in another, possibly simpler way?
Here's an explanation. It's just a bit of notation, it doesn't mean anything specific.

What you are dealing with here is a linear non-homogeneous 2nd order differential equation with constant coefficients.

The standard form of these equations is:

$P\frac{d^2y}{dx^2} + Q\frac{dy}{dx} + Ry = r(x)$

It is 2nd order because the highest order of derivative involved is 2. It's linear because there are no products or powers of dependent variables. And it non-homogeneous because $r(x) \neq 0$.

Now, the superposition principle says that if 2 functions are solutions to a linear differential equation, then the sum of these functions is also a solution.

The first solution we find is called the complimentary function. We find this solution be solving the equation:

$P\lambda^2 + Q\lambda + R = 0$

This is called the auxiliary equation. P, Q and R are the coefficients from the LHS of the equation. When we solve form lambda, 3 things can happen.

1) If there are 2 distinct solutions, then the complimentary function is of the form $y_c(x) = C_1e^{\lambda x} + C_2e^{\lambda x}$.

C1 and C2 are arbitrary constants.

2) The there is only only 1 repeated solution to the auxiliary equation then the complimentary function is of the form $y_c(x) = C_1e^{\lambda x} + C_2xe^{\lambda x}$. This is the scenario we face.

3) If there are only complex roots, then the solution gets a bit more complicated than the scope of this problem, so we'll just ignore that for now.

So now you have one solution, $y_c(x)$.

So the superposition principle tells us that the final solution is a sum of $y_c(x)$ and some other function.

That other function is called the particular integral. We usually determine what particular integral to use depending on what functions make up $r(x)$ on the right hand side.

In your case, the particular integral is $y_p(x)=Ax^2e^{2x}$. The thing is that there is an arbitrary constant involved here. We already have 2 arbitrary constants from our complimentary function, so we can't have another one! There can only be as many arbitrary constants in the solution to an ODE as the order of the ODE. The ODE is 2nd order, so we can only have 2 arbitrary constants. In other words, we have to find out what A is. To do this, we find the 1st and 2nd derivative of $y_p(x)$ and plug it into the original ODE. We can then solve for A, and we find that A is in fact $\frac{1}{2}$. Hence $y_p(x)=\frac{1}{2}x^2e^{2x}$

Now we can finally USE the superposition principle to put together a full solution:

$y(x) = y_c(x) + y_p(x) = C_1e^{\lambda x} + C_2xe^{\lambda x} +\frac{1}{2}x^2e^{2x}$