# Kartika's question at Yahoo! Answers regarding solving a 2nd order inhomogeneous ODE

#### MarkFL

Staff member
Here is the question:

Solve this inhomogeneous differential equation?

Please show all your steps, and DO NOT use the method of undetermined coefficients. Thanks.

y'' -6y' +9y = 4e^(3x)
I have posted a link there to this topic so the OP can see my work.

#### MarkFL

Staff member
Re: Kartika's question at Yahoo! Answers regarding solvinga 2nd order inhomogeneous ODE

Hello Kartika,

We are given to solve:

$$\displaystyle y''-6y'+9y=4e^{3x}$$

and we are instructed not to use the method of undetermined coefficients. So, I will use variation of parameters instead.

First, we want to find a fundamental solution set for the corresponding homogeneous equation. We see that we have the repeated characteristic root $r=3$, and so our set is:

$$\displaystyle \{e^{3x},xe^{3x}\}$$

Hence, we take as our particular solution:

$$\displaystyle y_p(x)=v_1(x)e^{3x}+v_2xe^{3x}$$

Next, we determine $v_1(x)$ and $v_2(x)$ by solving the system:

$$\displaystyle e^{3x}v_1'+xe^{3x}v_2'=0$$

$$\displaystyle 3e^{3x}v_1'+\left(3xe^{3x}+e^{3x} \right)v_2'=4e^{3x}$$

Dividing through both equations by $e^{3x}\ne0$, we obtain:

$$\displaystyle v_1'+xv_2'=0$$

$$\displaystyle 3v_1'+\left(3x+1 \right)v_2'=4$$

The first equation gives us:

$$\displaystyle v_1'=-xv_2'$$

And substituting into the second equation, we find:

$$\displaystyle -3xv_2'+\left(3x+1 \right)v_2'=4$$

$$\displaystyle v_2'=4\,\therefore\,v_1'=-4x$$

Integrating with respect to $x$, we now find:

$$\displaystyle v_1(x)=-2x^2$$

$$\displaystyle v_2(x)=4x$$

And thus, our particular solution is:

$$\displaystyle y_p(x)=-2x^2e^{3x}+4x^2e^{3x}=2x^2e^{3x}$$

Thus, by superposition, we find the general solution is:

$$\displaystyle y(x)=y_h(x)+y_p(x)=c_1e^{3x}+c_2xe^{3x}+2x^2e^{3x}$$