# Thread:

1. ## Cannot Solve this Differential Equation

I would like some help solving this differential equation if possible:

y'' + 2y' + y = xe^(-x)

I end up with the complementary solution of the equation being:

y = C1*e^(-x) + C2*xe^(-x) + yp

However, here I get stumped for how to solve for yp. I set the trial solution as (Ax+B)e^(-x) and then differentiat to find y' and y'' and plug it into the equation. But then everything cancels out giving me x = 0.

Can someone explain how to solve the rest of this?

2. Originally Posted by zerobladex
I would like some help solving this differential equation if possible:

y'' + 2y' + y = xe^(-x)

I end up with the complementary solution of the equation being:

y = C1*e^(-x) + C2*xe^(-x) + yp

However, here I get stumped for how to solve for yp. I set the trial solution as (Ax+B)e^(-x) and then differentiat to find y' and y'' and plug it into the equation. But then everything cancels out giving me x = 0.

Can someone explain how to solve the rest of this?
Since your complimentry solution has the same form as the particular solution you need to increase the degree in the polynomials of $y_p$ by 2.

So the form will be $(Ax^3+Bx^2+Cx+D)e^{-x}$

If you write the ODE out as an operator you get

$(D+1)^2y=xe^{-x}$

To annihilate the right hand side you need to act on the equation by $(D+1)^2$ again. This gives

$(D+1)^4y=0$

This gives the form

$(Ax^3+Bx^2+Cx+D)e^{-x}$

as above
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 6, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9260638952255249, "perplexity_flag": "middle"}