Solving a differential equation $y''+2y'=x$

277 Views Asked by At

I've been stuck on this equation.

$y''+2y'=0$ is fairly simple, the general solution comes out as $y=c_{1}+c_{2}e^{-2x}$.

But when I try to solve the particular equation including the $x$ on the right I get stuck lacking a variable or like another equation. By the guessing method:

$y_{s} = Ax+B$, $y'_{s} = A$, $y''_{s} = 0$

Which leaves me with

$y_{s} = \frac{x}{2}+B$

Is there any other way to solve it or can it not be solved and the variable $B$ will be stuck there until I get some sort of more information / another equation or something?

3

There are 3 best solutions below

11
On BEST ANSWER

The reason why your solution doesn’t work is because this is a “failure case” - that is to say that the usual particular integral is not independent of the complementary function, due to the appearance of the constant term in both.

Instead of using $y=Ax+B$ as the particular integral you have to use instead $$y=Ax^2+Bx$$ $$\implies y’=2Ax+B\implies y’’=2A$$

And then, $$2A+4Ax+2B=x\implies A=\frac14, B=-\frac14$$

Now you can write out the complete solution.

1
On

$y''+2y'=x$ can be solved directly. Start with an integrating factor of $e^{2x}$: $$ e^{2x}(y''+2y')=xe^{2x} \\ \frac{d}{dx}(e^{2x}y')=xe^{2x} \\ e^{2x}y' = \int xe^{2x}dx=\frac{1}{2}e^{2x}x-\int\frac{1}{2}e^{2x}dx=\frac{1}{2}xe^{2x}-\frac{1}{4}e^{2x}+C \\ y'=\frac{1}{4}(2x-1)+Ce^{-2x} \\ y = \frac{1}{4}(x^2-x)-\frac{C}{2}e^{-2x}+D. $$ It's easy to check this $y$ is a solution: $$ y''=\frac{1}{2}-2Ce^{-2x} \\ 2y'=\frac{1}{2}(2x-1)+2Ce^{-2x} \\ y''+2y'=x $$

0
On

$$y''+2y'=x$$ Integrate: $$y'+2y=\dfrac 12x^2+C$$ Try to solve with: $$y_p=Ax^2+Bx+c$$