# Math Help - Nonhomogenous Linear Equation

1. ## Nonhomogenous Linear Equation

Solve the following differential equation:

$y^{''}+y=e^x+x^3$

so starting off with the auxiliary equation I have:

$r^2+1=0$ where the only available solution is $\pm i$

so I would have:

$y_c=c_1 \cos(x)+c_2 \sin(x)$

working on the particular solution I let $y_{p1}(x) = Ae^x$

substituting for $y_{p1}$ I come up $Ae^x+Ae^x=e^x \Rightarrow 2Ae^x=e^x \Rightarrow A=\frac{1}{2} e^x$

(this is the part that I get stuck on) Since $x^3$ is a polynomial of third degree I would have:

$y_{p2}=Bx^3+Cx^2+Dx+E$

where $y_{p2}^{''} = 6Bx+C$

substituting I get:

$(6Bx+C)+ (Bx^3+Cx^2+Dx+E) =x^3$, then

$(6B+C)x^3+ (Bx^3+Cx^2+Dx+E) =x^3$

so $(6B+C)=1$ and $(B+C+D+E)=0$ where I don't think that I'm approaching it correctly since i have 4 unknowns.

any help would be greatly appreciated.

2. Originally Posted by lllll
Solve the following differential equation:

$y^{''}+y=e^x+x^3$

so starting off with the auxiliary equation I have:

$r^2+1=0$ where the only available solution is $\pm i$

so I would have:

$y_c=c_1 \cos(x)+c_2 \sin(x)$

working on the particular solution I let $y_{p1}(x) = Ae^x$

substituting for $y_{p1}$ I come up $Ae^x+Ae^x=e^x \Rightarrow 2Ae^x=e^x \Rightarrow A=\frac{1}{2} e^x$ Mr F says: ${\color{red} \Rightarrow A = \frac{1}{2}}$. Therefore ${\color{red}y_{p1}(x) = \frac{1}{2} e^x}$.

(this is the part that I get stuck on) Since $x^3$ is a polynomial of third degree I would have:

$y_{p2}=Bx^3+Cx^2+Dx+E$

where $y_{p2}^{''} = 6Bx+C$ Mr F says: ${\color{red}y_{p2}^{''} = 6Bx+ {\color{blue}2} C}$. Note the blue bit. This will effect all the calculations that follow.

substituting I get:

$(6Bx+C)+ (Bx^3+Cx^2+Dx+E) =x^3$, then

$(6B+C)x^3+ (Bx^3+Cx^2+Dx+E) =x^3$

so $(6B+C)=1$ and $(B+C+D+E)=0$ where I don't think that I'm approaching it correctly since i have 4 unknowns.

any help would be greatly appreciated.
Some corrections in red. The bit in blue is important.

3. given the corrections, then would the following be correct:

$(6Bx+2C)+ (Bx^3+Cx^2+Dx+E) =x^3$, then

$(6B+2C)x^3+ (B+C+D+E) =x^3$, where

${\color{blue}(1)} \ (6B+2C) = 1 \ \mbox{and} \ {\color{blue}(2)} \ (B+C+D+E) = 0$

$B= \frac{1-2C}{6}$ and substituting into the second equation

which ends up giving me $\frac{2}{3} C+D+E = -\frac{1}{6}$

if I let $D$ and $E$ equal to 0 then I get a solution for $C$, but I don't think that I can do that.

4. Originally Posted by lllll
Solve the following differential equation:

$y^{''}+y=e^x+x^3$

so starting off with the auxiliary equation I have:

$r^2+1=0$ where the only available solution is $\pm i$

so I would have:

$y_c=c_1 \cos(x)+c_2 \sin(x)$

working on the particular solution I let $y_{p1}(x) = Ae^x$

substituting for $y_{p1}$ I come up $Ae^x+Ae^x=e^x \Rightarrow 2Ae^x=e^x \Rightarrow A=\frac{1}{2} e^x$

(this is the part that I get stuck on) Since $x^3$ is a polynomial of third degree I would have:

$y_{p2}=Bx^3+Cx^2+Dx+E$

where $y_{p2}^{''} = 6Bx+C$

substituting I get:

$(6Bx+C)+ (Bx^3+Cx^2+Dx+E) =x^3$, then

$(6B+C)x^3+ (Bx^3+Cx^2+Dx+E) =x^3$

so $(6B+C)=1$ and $(B+C+D+E)=0$ where I don't think that I'm approaching it correctly since i have 4 unknowns.

any help would be greatly appreciated.
When dealing with the non-homogeneous equation, I'd try to approach this using the annihilator technique (for it gives us the exact form of our particular solution in case we can't make a good guess at it). You can read more about it here.

Since $y^{\prime\prime}+y=e^x+x^3\implies (D^2+1)y=e^x+x^3$, the annihilator for $e^x=D-1$ and the annihilator for $x^3=D^4$. Thus, the Annihilator for $e^x+x^3=D^4(D-1)$.

Therefore, $(D^2+1)y=e^x+x^3\implies D^4(D-1)(D^2+1)y=D^4(D-1)\left[e^x+x^3\right]$ $\implies D^4(D-1)(D^2+1)y=0$

Then converting this over to the auxiliary equation, we have $r^4(r-1)(r^2+1)=0\implies r=0~\text{multiplicity 4}, r=1, r=\pm i$

Therefore, $y_p=A+Bx+Cx^2+Dx^3+Ee^x$

Thus, $y_p^{\prime\prime}=2C+6Dx+Ee^x$.

Thus, $y_p^{\prime\prime}+y_p=e^x + x^3\implies A+2C+(B+6D)x+Cx^2+Dx^3+2Ee^x=x^3+e^x$.

Therefore,

$\begin{array}{rcrcrcrcrcr} A&~&~&+&2C&~&~&~&~&=&0\\ ~ &~&B&~&~&+&6D&~&~&=&0\\~&~&~&~&C&~&~&~&~&=&0\\~&~& ~&~&~&~&D&~&~&=&1\\~&~&~&~&~&~&~&~&2E&=&1\end{arra y}$

Thus, $A=0,~B=-6,~C=0,~D=1,~E=\tfrac{1}{2}$

Therefore, the solution to your DE is $y=c_1\cos x+c_2\sin x-6x+x^3+\tfrac{1}{2}e^x$

Does this help?

5. Originally Posted by lllll
given the corrections, then would the following be correct:

$(6Bx+2C)+ (Bx^3+Cx^2+Dx+E) =x^3$, then

$(6B+2C)x^3+ (B+C+D+E) =x^3$, where Mr F says: I'm at a loss to understand how you could get this. Where have the x^2 terms and x terms gone on the left hand side? Where has the x^3 term come from?

${\color{blue}(1)} \ (6B+2C) = 1 \ \mbox{and} \ {\color{blue}(2)} \ (B+C+D+E) = 0$

$B= \frac{1-2C}{6}$ and substituting into the second equation

which ends up giving me $\frac{2}{3} C+D+E = -\frac{1}{6}$

if I let $D$ and $E$ equal to 0 then I get a solution for $C$, but I don't think that I can do that.
Re-arrange:

$Bx^3 + Cx^2 + (6B + D)x + (2C + E) = x^3$.

Equate coefficients:

B = 1 .... (1)

C = 0 .... (2)

6B + D = 0 .... (3)

2C + E = 0 .... (4)

Solve simultaneously.