# Thread: Second-Order Linear Non Homogeneous ODE with Constant Coefficients

1. ## [SOLVED] Second-Order Linear Non Homogeneous ODE with Constant Coefficients

Here it is:
$\displaystyle \frac{d^2y}{dx^2}+6\frac{dy}{dx}+25y=-292sin(4x)$

So the auxiliary/characteristic equation will look like:
$\displaystyle r^2+6r+25=0$
Solving that gives:
$\displaystyle r^2+6r+25=0$
$\displaystyle r = 3\pm4i$

And so we'll get the following general homogeneous solution:
$\displaystyle GS(H) = e^{3x}(Acos(4x)+Bsin(4x))$

So now I try to find the particular non homogeneous solution, trying:
$\displaystyle y_P = \alpha xcos(4x)+\beta xsin(4x)$
Finding the first and second derivative of y particular:
$\displaystyle y_P' = \alpha cos(4x) - 4\alpha xsin(4x) + \beta sin(4x) + 4\beta xcos(4x)$
$\displaystyle y_P'' = -8\alpha sin(4x) + 8\beta cos(4x) - 16\alpha xcos(4x) - 16\beta xsin(4x)$

Then, when I try to compile all of this, to then equate coefficients and solve for alpha and beta, I realise that the x terms do not cancel out (as they should) and I cannot go any further (I don't think).

It will eventually look like this:
$\displaystyle -8\alpha sin(4x) + 8\beta cos(4x) - 16\alpha xcos(4x) - 16\beta xsin(4x)$
$\displaystyle + 6\alpha cos(4x) - 24\alpha xsin(4x) + 6\beta sin(4x) + 24\beta xcos(4x)$
$\displaystyle + 25\alpha xcos(4x) + 25\beta xsin(4x) = -292sin(4x)$

Have I made an error somewhere?

Any help is appreciated.

NB: It may/may not help, but in the previous part of the question we've already proved that when:
$\displaystyle x=0, \frac{dy}{dx}=-2$

2. Originally Posted by yianni
Here it is:
$\displaystyle \frac{d^2y}{dx^2}+6\frac{dy}{dx}+25y=-292sin(4x)$

So the auxiliary/characteristic equation will look like:
$\displaystyle r^2+6r+25=0$
Solving that gives:
$\displaystyle r^2+6r+25=0$
$\displaystyle r = 3\pm4i$

And so we'll get the following general homogeneous solution:
$\displaystyle GS(H) = e^{3x}(Acos(4x)+Bsin(4x))$

So now I try to find the particular non homogeneous solution, trying:
$\displaystyle y_P = \alpha xcos(4x)+\beta xsin(4x)$
Why is the trial particular solution not:

$\displaystyle y_P = \alpha \cos(4x)+\beta \sin(4x)$

CB

3. Originally Posted by yianni
Here it is:
$\displaystyle \frac{d^2y}{dx^2}+6\frac{dy}{dx}+25y=-292sin(4x)$

So the auxiliary/characteristic equation will look like:
$\displaystyle r^2+6r+25=0$
Solving that gives:
$\displaystyle r^2+6r+25=0$
$\displaystyle r = 3\pm4i$

And so we'll get the following general homogeneous solution:
$\displaystyle GS(H) = e^{3x}(Acos(4x)+Bsin(4x))$

So now I try to find the particular non homogeneous solution, trying:
$\displaystyle y_P = \alpha xcos(4x)+\beta xsin(4x)$
I suspect you put that "x" multiplying the sine and cosine in because you saw "(A cos(4x)+ Bsin(4x))" in the homogeneous solution. However, you really have $\displaystyle e^{3x}cos(4x)$ and $\displaystyle e^{3x}sin(4x)$ which are NOT equivalent to "cos(4x)" and "sin(4x)". More simply, the solutions to you characteristic equation are 3+ 4i and 3- 4i while just sin(4x) and cos(4x) correspond to 4i and -4i- quite different solutions.

Finding the first and second derivative of y particular:
$\displaystyle y_P' = \alpha cos(4x) - 4\alpha xsin(4x) + \beta sin(4x) + 4\beta xcos(4x)$
$\displaystyle y_P'' = -8\alpha sin(4x) + 8\beta cos(4x) - 16\alpha xcos(4x) - 16\beta xsin(4x)$

Then, when I try to compile all of this, to then equate coefficients and solve for alpha and beta, I realise that the x terms do not cancel out (as they should) and I cannot go any further (I don't think).

It will eventually look like this:
$\displaystyle -8\alpha sin(4x) + 8\beta cos(4x) - 16\alpha xcos(4x) - 16\beta xsin(4x)$
$\displaystyle + 6\alpha cos(4x) - 24\alpha xsin(4x) + 6\beta sin(4x) + 24\beta xcos(4x)$
$\displaystyle + 25\alpha xcos(4x) + 25\beta xsin(4x) = -292sin(4x)$

Have I made an error somewhere?

Any help is appreciated.

NB: It may/may not help, but in the previous part of the question we've already proved that when:
$\displaystyle x=0, \frac{dy}{dx}=-2$

4. Ah, I see my mistake.

Thanks guys; solved.