1
$\begingroup$

$y'' - 4y' + 5y = 25x - 3e^2x$

Where $y(0)=0$ and $y'(0)=0$

This is what I have done so far:-

$r^2 - r + 5 = 0$ $\sqrt{b^2-4ac} < 0$ ...... I get $2\pm i$

Thus $y(x)=e^2x(A\cos x + D\sin x)$

How do I find $A$ and $D$? Substitute $y(0)=0$ into the equation?

What about the right hand side equation? This is what I did for that... $g = 25x-3e^2x$ $g' = 25-6e^2x$ $g'' = -12e^2x$

Then I sub the values, giving me

$-12e^2x - 4(25-6e^2x) + 5(25x-3e^2x) = 25x - 3e^2x$

which will give me $x = 1$

Am I doing any of this right?

  • 0
    @David: you should put $y(x)=e^{2x}$($A$cos($x$)+$D$sin($x$)) into your original equation, so you can find the requried constants.2012-05-16

1 Answers 1

2

Solving an imhomogenous ODE is done in two steps.

  1. Determine the general solution to the corresponding homogenous ODE.
  2. Find a particular solution to the inhomogenous ODE.

It looks like youve done the first part correctly, but for completeness I'll repeat it here. Consider $ y'' - 4y' + 5y = 0.$ This is a linear ODE, so we know that our solutions are going to be exponentials. Substitute $y = \exp[rx]$ into the equation and find that: $ r^2 - 4r + 5 = 0.$ We solve using the quadratic formula and find that $r = 2 \pm i$. Since $r$ is complex, the solution is a combination of exponential growth and oscillation: $ y(x) = Ae^{2x}\cos(x) + Be^{2x}\sin(x).$ This is the general solution. Up to this point your answer is good. It's only in the second step that you've gone a little off track. There are a couple of ways to find particular solutions; I like the method of undetermined coefficients (this is the technical term for making an educated guess). If we look at the inhomogenous equation $ y'' - 4y' + 5y = 25x - 3e^{2x}$ we notice that the right hand side is the sum of a polynomial and an exponential. Our educated guess is that the particular solution will also be the sum of a polynomial and an exponential, $y_{p} = Ce^{2x} + Dx + E.$ Now we substitute this into the inhomogenous expression and solve for $C$, $D$ and $E$. $ 4Ce^{2x} -4(2Ce^{2x} + D) + 5(Ce^{2x} + Dx +E) = 25x - 3e^{2x},$ $5Dx +(5E - 4D) + (4C - 8C + 5C)e^{2x} = 25x -0 - 3e^{2x},$ comparing the coefficients of the $x$ terms shows that $D = 5$, comparing the constants shows that $E = 4$ and comparing the coefficients in front of the exponential shows that $C = -3$. The solution we want is just the sum of the general and particular solutions, $ y = Ae^{2x}\cos(x) + Be^{2x}\sin(x) -3e^{2x} +5x +4.$ To calculate the values of $A$ and $B$ you use the given initial values, $y(0) = 0$ and $y'(0)=0$. $ y(0) = A -3 + 4 \Rightarrow A = -1.$ $ y'(0) = 2B - 6 + 5 \Rightarrow B = \frac{1}{2}.$ Substitute these back into the expression for the solution to get the final answer. $ y = -e^{2x}\cos(x) + \frac{1}{2}e^{2x}\sin(x) -3e^{2x} +5x +4.$

  • 0
    @David, as long as the RHS is 'simple' then you can determine $y_{p}$ using the method of undetermined coefficients. So if the right hand side is $4e^{-3x} - 5\cos(5x) -3\sin(5x)$, the sum of an exponential and some trig functions, I'd assume that $y_{p} = Ae^{-3x} + B\cos(5x) +C\sin(5x)$, also the sum of an exponential and some trig functions. Substitute in and solve for the constants. If the RHS is more complicated, or the functions in the RHS are the same as the solution to the homogenous ODE then you have to use a different approach, e.g. variation of parameters.2012-05-17