Solving $y'''(x)-2y''(x)+y'(x)=x+2+e^{2x}\sin x$

75 Views Asked by At

I have stumbled upon this differential equation in my notebook which is solved by the method variation of constants. $$y'''(x)-2y''(x)+y'(x)=x+2+e^{2x}\sin x$$ So let the general solution be $y=y_0 +y_p\,$ There is no problem when solving the homogeneous equation $y'''(x)-2y''(x)+y'(x)=0$ with the characteristic equation $$r(r-1)^2=0$$ giving $$y_0=c_1+c_2e^x+c_3xe^x$$ Now when solving $y_p$ by reducing it to $y_p=y_{p1}+y_{p2}$ where $y_{p1}$ is given by $$y'''(x)-2y''(x)+y'(x)=x+2$$ and $y_{p2}\,$ by $$y'''(x)-2y''(x)+y'(x)=e^{2x}\sin x$$ Here my teacher took $y_{p1}$ as $(Ax+B)x$ then introduced this into the equation and get $A$ and $B$. Also for the second one he took $y_{p2}$ as $$e^{2x}(A\cos x+B \sin x)$$ Now I don't really understand how this works, honestly I would took $y_{p1}$ as a $3$rd order polynomial. Could you perhaps teach me how to "fish" those? I can solve the equation after this is given...

2

There are 2 best solutions below

0
On

$$y'''(x)-2y''(x)+y'(x)=x+2$$ It's easy to determine the exponent of the function try to substitute $y=z+ax^n$ $$y'''+.............+y'=x+2$$ $$(z'''+....)+..............+(z'+nax^{n-1})=x+2$$ for y' we get the highest monomial degree in x so it must be equal to the degre of x on right side $$x^{n-1}=x \implies n=2$$ So you have to try a polynomial of degree two $$ax^2+bx+c$$ You observe that you have only derivatives on the left side so $c=0$

And $ax^2+bx$ is the right choice...

0
On

Hint:

You discover the rules by working backwards.

First consider polynomials, say of the third degree, like $ax^3+bx^2+cx+d$. The first derivative is a second degree polynomial, so that the LHS of a first order equation would yield

$$\alpha y+\beta y'=\alpha ax^3+(\alpha b+3\beta a)x^2+(\alpha c+2\beta b)x+(\alpha d+\beta c),$$ another cubic polynomial. Similarly,

$$\alpha y+\beta y'+\gamma y''=\alpha ax^3+(\alpha b+3\beta a)x^2+(\alpha c+2\beta b+6\gamma c)x+(\alpha d+\beta c+2\gamma b)$$ also third degree.

Now it is clear that for a linear equation of any degree, if the RHS is a polynomial of degree $d$, there will be another polynomial of degree $d$ which is a solution.


For an exponential function, $e^{ax}$,

$$\alpha y+\beta y'+\gamma y''=(\alpha +\beta a+\gamma a^2)e^{ax}$$ so that an exponential RHS is obtained from an exponential solution.


You can play the same game with RHS of the form $e^{ax}\sin bx$ and $e^{ax}\cos bx$.

If you are familiar with complex numbers, you can even take a shortcut by considering $e^{(a+ib)x}$, which combines the two functions in one.