# Find a particular solution of y"+2y'+y=8x^2*cosx-4xsinx

1. Mar 3, 2016

### Math10

1. The problem statement, all variables and given/known data
Find a particular solution of y"+2y'+y=8x^2*cosx-4xsinx. The answer is yp=-(14-10x)cosx-(2+8x-4x^2)sinx.

2. Relevant equations
None.

3. The attempt at a solution
r^2+2r+1=0
(r+1)^2=0
r=-1, -1
y=Axe^(-x)+Be^(-x)
So what should the initial guess yp be for this problem? How to find the initial guess yp?

2. Mar 3, 2016

### SteamKing

Staff Emeritus
The particular solution is not necessarily related to the complementary, or homogeneous, solution. Often times, yp can be found only by trial and error.

For some RHS, there are definite candidates to try, as can be seen here:

http://tutorial.math.lamar.edu/Classes/DE/UndeterminedCoefficients.aspx

There's a table at the end of Example 4, part way down from the top of the page, which gives particular solutions for different forms of the RHS of non-homogeneous equations.

3. Mar 3, 2016

### Math10

So shouldn't yp=(Ax^2+Bx+C)cosx+(Dx+E)sinx?

4. Mar 3, 2016

### SteamKing

Staff Emeritus
The OP said find 'a particular solution' to the given ODE. I don't know if the answer in your book is the only one which satisfies this equation.

5. Mar 3, 2016

### Ray Vickson

Determine the Green's Function $G(x)$ for $y'' + 2 y' + y$; this is the solution $G(x) = y(x)$ that solves the "almost-homogeneous" equation
$$y''(x) + 2 y'(x) + y(x) = \delta(x)$$
where $\delta(x)$ is the "Dirac Delta". Then, for $x \geq 0$ and RHS $f(x)$ on $x \geq 0$ (i.e., $f(x) = 0$ for $x < 0$) a particular solution of $y'' + 2 y' + y=f$ is
$$y_p(x) = \int_{-\infty}^{\infty} G(x-s) f(s) \, ds = \int_{s=0}^{\infty} G(x-s) f(s) \, ds$$
You can find an appropriate $G(x)$ by noting that $G''(x) + 2 G'(x) + G(x) = 0$ for $x < 0$ and for $x > 0$, which implies
$$G(x) = \begin{cases} A_1 x e^{-x} + B_1 e^{-x}, & x < 0 \\ A_2 x e^{-x} + B_2 e^{-x}, & x > 0 \end{cases}$$
for constants $A_1,A_2,B_1,B_2$. We need additional conditions: $G(-0) = G(+0)$ (continuity of $G$ at x=0) and $G'(+0) - G'(-0) = 1$ (jump condition on first derivative at x=0). Usually we impose two additional boundary conditions (at $\pm \infty$ for example) in order to get four equations in the four unknowns $A_1,B_1,A_2,B_2$. For example, if we want $G(x)$ to either remain bounded or have moderate growth at large $|x|$ we can take $A_1 = B_1 = 0$.

6. Mar 3, 2016

### haruspex

You should include an x2sin(x) term too because there is a y' on the left, and the x2cos(x) term on the right might come from that.

7. Mar 3, 2016

### Math10

I tried yp=(Ax^2+Bx+C)cosx+(Dx^2+Ex+F)sinx but it seems weird at the end because I got D+A=4 with 4D+E+B=-2.

8. Mar 3, 2016

### LCKurtz

It is the only answer in this sense. If $y_p$ and $y_q$ are both particular solutions of the NH equation, then their difference is a solution of the homogeneous and can be accounted for by the choice of the two arbitrary constants in the complementary solution:$$y_p - y_q = Ae^{-x} + Bxe^{-x}$$

9. Mar 3, 2016

### haruspex

I don't get that.
You should get 6 equations altogether, so probably enough to find all six constants.

10. Mar 4, 2016

### Ray Vickson

If you use the approach outlined in #5, you can write down an answer with no guesswork at all. A good Green's function for this problem is $G(x) = x e^{-x} \, 1_{\{ x > 0 \}}$, so a particular solution for your inhomogeneous DE (with RHS = 0 for $x < 0$) is
$$y_p(x) = \int_{\Re} G(x-y) f(y) dy = \int_0^x (x-y) e^{-(x-y)} (8y^2 \, \cos\,y- 4y \sin\, y) \, dy,$$
which evaluates to
$$y_p(x) = (4x^2-8x-2)\sin(x)+(10x-14) \cos(x)+6xe^{-x}+14 e^{-x}.$$
Since the last two terms here are just two solutions to the homogeneous DE, we can get another particular solution by dropping them, leaving the function in your answer. One advantage of this method is that for any RHS of the form $f(x) 1_{\{x>0\}}$ we can immediately write
$$y_p(x) = \int_0^x (x-y) e^{-(x-y)} f(y) \, dy,$$
so the problem is reduced to evaluation of an integral.

11. Mar 4, 2016

### Math10

You're totally right. When I checked my work, I found my mistakes. Now I found all six constants and the answer is right. Thanks for mentioning about that.

12. Mar 4, 2016

### Math10

@SteamKing , that website above was really helpful. Thanks a lot for the help.