# jerome's questions at Yahoo! Answers regarding inhomogeneous linear ODEs

#### MarkFL

Staff member
Here are the questions:

HELP WITH THESE DIFFERENTIAL EQUATION?

please use the method of undetermined coefficients and show your steps with explanations

(1) Y"'+y'=4sinx +2x^2
(2) Y'''+y"+3y'-5y=5sin2x+10x^2-3x+7
Here is a link to the questions:

HELP WITH THESE DIFFERENTIAL EQUATION? - Yahoo! Answers

I have posted a link there to this topic so the OP can find my response.

#### MarkFL

Staff member
Hello jerome,

1.) We are given to solve the inhomogeneous linear 3rd order ODE:

(1) $$\displaystyle y'''+y'=4\sin(x)+2x^2$$

The differential operator $$\displaystyle D^2+1$$ annihilates $$\displaystyle 4\sin(x)$$ and $$\displaystyle D^3$$ annihilates $$\displaystyle 2x^2$$ hence the operator:

$$\displaystyle A\equiv D^3(D^2+1)$$

annihilates $$\displaystyle 4\sin(x)+2x^2$$.

Thus, applying $$\displaystyle A$$ to both sides of (1) gives us:

(2) $$\displaystyle D^4(D^2+1)^2[y]=0$$

The characteristic roots are then:

$$\displaystyle r=0,\,\pm i$$

where $$\displaystyle r=0$$ is of multiplicity 4 and $$\displaystyle r=\pm i$$ are of multiplicity 2, and so the general solution to (2) is given by:

(3) $$\displaystyle y(x)=c_1+c_2x+c_3x^2+c_4x^3+(c_5+c_6x)\cos(x)+(c_7+c_8x)\sin(x)$$

Now, recall that a general solution to (1) is of the form $$\displaystyle y(x)=y_h(x)+y_p(x)$$. Since every solution to (1) is also a solution to (2), then $$\displaystyle y(x)$$ must have the form displayed on the right-hand side of (3). But we recognize that:

$$\displaystyle y_h(x)=c_1+c_2\cos(x)+c_3\sin(x)$$

and so there must exist a particular solution of the form:

$$\displaystyle y_p(x)=c_2x+c_3x^2+c_4x^3+c_6x\cos(x)+c_8x\sin(x)$$

Now it is a matter of using the method of undetermined coefficients to determine the particular solution that satisfies (1).

So, what we need to do is compute $$\displaystyle y_p'(x)$$ and $$\displaystyle y_p'''(x)$$, substitute these into (1), and solve the resulting linear system that arises when we equate coefficients. So, computing the necessary derivatives, we find:

$$\displaystyle y_p'(x)=c_2+2c_3x+3c_4x^2+c_6(\cos(x)-x\sin(x))+c_8(\sin(x)+x\cos(x))$$

$$\displaystyle y_p''(x)=2c_3+6c_4x+c_6(-2\sin(x)-x\cos(x))+c_8(2\cos(x)-x\sin(x))$$

$$\displaystyle y_p'''(x)=6c_4+c_6(-3\cos(x)+x\sin(x))+c_8(-3\sin(x)-x\cos(x))$$

Substituting into (1), we find:

$$\displaystyle \left(6c_4+c_6(-3\cos(x)+x\sin(x))+c_8(-3\sin(x)-x\cos(x)) \right)+\left(c_2+2c_3x+3c_4x^2+c_6(\cos(x)-x\sin(x))+c_8(\sin(x)+x\cos(x)) \right)=4\sin(x)+2x^2$$

Rearranging, we may write:

$$\displaystyle -2c_6\cos(x)-2c_8\sin(x)+3c_4x^2+2c_3x+c_2+6c_4=0\cos(x)+4\sin(x)+2x^2+0x+0$$

Equating coefficients, we find:

$$\displaystyle c_6=0$$

$$\displaystyle c_8=-2$$

$$\displaystyle c_4=\frac{2}{3}$$

$$\displaystyle c_3=0$$

$$\displaystyle c_2=-4$$

Hence, we find:

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

and by the principle of superposition, we find:

$$\displaystyle y(x)=c_1+c_2\cos(x)+c_3\sin(x)-4x+\frac{2}{3}x^3-2x\sin(x)$$

2.) We are given to solve the inhomogeneous linear 3rd order ODE:

(1) $$\displaystyle y'''+y''+3y'-5y=5\sin(2x)+10x^2-3x+7$$

The differential operator $$\displaystyle \frac{D^2}{2^2}+1$$ annihilates $$\displaystyle 5\sin(2x)$$ and $$\displaystyle D^3$$ annihilates $$\displaystyle 10x^2-3x+7$$ hence the operator:

$$\displaystyle A\equiv \frac{1}{4}D^3(D^2+4)$$

annihilates $$\displaystyle 5\sin(2x)+10x^2-3x+7$$.

Thus, applying $$\displaystyle A$$ to both sides of (1) gives us:

(2) $$\displaystyle D^3(D^2+4)(D-1)(D^2+2D+5)[y]=0$$

The characteristic roots are then:

$$\displaystyle r=0,\pm2i,1,-1\pm2i$$

The root $$\displaystyle r=0$$ is of multiplicity 3, and so the general solution to (2) is given by:

$$\displaystyle y(x)=c_1+c_2x+c_3x^2+c_4\cos(2x)+c_5\sin(2x)+c_6e^x+c_7e^{-x}\cos(2x)+c_8e^{-x}\sin(2x)$$

Now, recall that a general solution to (1) is of the form $$\displaystyle y(x)=y_h(x)+y_p(x)$$. Since every solution to (1) is also a solution to (2), then $$\displaystyle y(x)$$ must have the form displayed on the right-hand side of (3). But we recognize that:

$$\displaystyle y_h(x)=c_6e^x+c_7e^{-x}\cos(2x)+c_8e^{-x}\sin(2x)$$

and so there must exist a particular solution of the form:

$$\displaystyle y_p(x)=c_1+c_2x+c_3x^2+c_4\cos(2x)+c_5\sin(2x)$$

Now it is a matter of using the method of undetermined coefficients to determine the particular solution that satisfies (1).

So, what we need to do is compute $$\displaystyle y_p'(x),\,y_p''(x),\,y_p..'(x)$$ and substitute these into (1), and solve the resulting linear system that arises when we equate coefficients. So, computing the necessary derivatives, we find:

$$\displaystyle y_p'(x)=c_2+2c_3x-2c_4\sin(2x)+2c_5\cos(2x)$$

$$\displaystyle y_p''(x)=2c_3-4c_4\cos(2x)-4c_5\sin(2x)$$

$$\displaystyle y_p'''(x)=8c_4\sin(2x)-8c_5\cos(2x)$$

Substituting into (1), we find:

$$\displaystyle \left(8c_4\sin(2x)-8c_5\cos(2x) \right)+\left(2c_3-4c_4\cos(2x)-4c_5\sin(2x) \right)+3\left(c_2+2c_3x-2c_4\sin(2x)+2c_5\cos(2x) \right)-$$

$$\displaystyle \,\,\,\,\,\,\,\,5\left(c_1+c_2x+c_3x^2+c_4\cos(2x)+c_5\sin(2x) \right)=5\sin(2x)+10x^2-3x+7$$

Rearranging, we may write:

$$\displaystyle (-9c_4-2c_5)\cos(2x)+(2c_4-9c_5)\sin(2x)+(-5c_3)x^2+(-5c_2+6c_3)x+(-5c_1+3c_2+2c_3)=0\cos(2x)+5\sin(2x)+10x^2-3x+7$$

Equating coefficients, we find:

$$\displaystyle -9c_4-2c_5=0$$

$$\displaystyle 2c_4-9c_5=5$$

$$\displaystyle -5c_3=10$$

$$\displaystyle -5c_2+6c_3=-3$$

$$\displaystyle -5c_1+3c_2+2c_3=7$$

Solving this system, we find:

$$\displaystyle c_1=-\frac{82}{25},\,c_2=-\frac{9}{5},\,c_3=-2,\,c_4=\frac{2}{17},\,c_5=-\frac{9}{17}$$

Hence, we find:

$$\displaystyle y_p(x)=-\frac{82}{25}-\frac{9}{5}x-2x^2+\frac{2}{17}\cos(2x)-\frac{9}{17}\sin(2x)$$

and by the principle of superposition, we find:

$$\displaystyle y(x)=c_1e^x+c_2e^{-x}\cos(2x)+c_3e^{-x}\sin(2x)-\frac{82}{25}-\frac{9}{5}x-2x^2+\frac{2}{17}\cos(2x)-\frac{9}{17}\sin(2x)$$

To jerome and any other guests viewing this topic, I invite and encourage you to post other differential equations problems in our Differential Equations forum.

Best Regards,

Mark.

Last edited:

#### Jerome

##### New member
the method i understand is the undetermined coefficients, i don't understand all these sir

#### MarkFL

Staff member
Rather than use a look-up table, I used the annihilator method to determine the form of the particular solution, and then I used the method of undetermined coefficients to determine the actual particular solution. I will demonstrate how to determine the form of the particular solution for the first problem using a table, and then I want to see if you can apply this to the second problem.

1.) $$\displaystyle y'''+y'=4\sin(x)+2x^2$$

First, we want to find the corresponding homogeneous solution $$\displaystyle y_h(x)$$, i.e., the solution to:

$$\displaystyle y'''+y'=0$$

The characteristic or auxiliary equation is:

$$\displaystyle r^3+r=r(r^2+1)=0$$

and so the characteristic roots are:

$$\displaystyle r=0,\,\pm i$$

and so we find:

$$\displaystyle y_h(x)=c_1+c_2\cos(x)+c_2\sin(x)$$

Now, we look at the right-hand side of the original ODE, which is:

$$\displaystyle 4\sin(x)+2x^2$$

Now, referring to a table, we find for the term:

$$\displaystyle 4\sin(x)$$

which is of the form:

$$\displaystyle a\cos(\beta x)+b\sin(\beta x)$$

that the particular solution associated with this term must be of the form:

$$\displaystyle y_{p_1}(x)=x^s\left(A\cos(\beta x)+B\sin(\beta x) \right)$$

where the non-negative integer $s$ is chosen to be the smallest integer so that no term in the particualr solution is a solution to the corresponding homogeneous equation. Thus, as you can see, we find in this case we require $s=1$, and so:

$$\displaystyle y_{p_1}(x)=x\left(A\cos(\beta x)+B\sin(\beta x) \right)$$

Now, for the term:

$$\displaystyle 2x^2$$

which is of the form:

$$\displaystyle a_2x^2+a_1x+a_0$$

we find that the particular solution associated with this term must be of the form:

$$\displaystyle y_{p_2}(x)=x^s\left(Cx^2+Dx+E \right)$$

Since $$\displaystyle y_h(x)$$ has a constant term, we find $$\displaystyle s=1$$, and so:

$$\displaystyle y_{p_2}(x)=x\left(Cx^2+Dx+E \right)$$

By superposition, we then have:

$$\displaystyle y_p(x)=y_{p_1}(x)+y_{p_2}(x)=x\left(A\cos(\beta x)+B\sin(\beta x) \right)+x\left(Cx^2+Dx+E \right)$$

As you can see this is the same form I determined above by using the annihilator method.

Now, see if you can apply this technique to the second problem, and post what you find, and I will be more than happy to help if you get stuck.