## anonymous 4 years ago Solve the differential equation $y'+3y-2=4cos(\pi*x)+x^2-4e^{2x}$ using the method of undetermined coefficients

1. TuringTest

$y'+3y=4\cos(\pi x)+x^2-4e^{2x}+2$now it's linear and should be doable with an integrating factor

2. TuringTest

$\mu(x)=e^{\int 3dx}=e^{3x}$multiply through...

3. TuringTest

$(ye^{3x})'=4e^{3x}\cos(\pi x)+x^2e^{3x}+4e^{5x}+2e^{3x}$$\int (ye^{3x})'=ye^{3x}+C=\int4e^{3x}\cos(\pi x)+x^2e^{3x}+4e^{5x}+2e^{3x}dx$some parts of this integral may get a little ugly, but nothing integration by parts can't handle

4. TuringTest

if you're not familiar with what I did on the left side you should acquaint yourself with solving linear equations with integrating factors

5. anonymous

USING THE METHOD OF UNDETERMINED COEFFICIENTS. I know how to use the integrating factor method and I hate integration by parts.

6. anonymous

Hatred is foolish. I distaste integrating by parts so please use the method of undetermined coefficients.

7. TuringTest

Undetermined coefficients for a first-order DE? never heard of such a thing

8. TuringTest

well this was interesting, I didn't know you could use undetermined coefficients here, but here it is:

9. TuringTest

$y'+3y=4\cos(\pi x)+x^2-4e^{2x}+2$$y_c=c_1e^{-3}$$Y_p=A\cos(\pi x)+B\sin(\pi x)+Ce^{2x}+Dx^2+Ex+F$$Y'_p=-A\pi\sin(\pi x)+B\pi\cos(\pi x)+2Ce^{2x}+2Dx+E$plugging this into the equation we find that matching the coefficients on the left and right for$Y_p'+3Y_p$leads to the system$-\pi A+3B=0$$3A+B\pi=4$$5C=-4$$3D=1$$3E+2D=0$$E+3F=2$C, D, E, and F are found easily, and A and B can be found quickly using Cramer's rule. We find that$A=\frac{12}{\pi^2+9}$$B=\frac{4\pi}{\pi^2+9}$$C=-\frac54$$D=\frac13$$E=-\frac23$$F=\frac{20}{27}$so our solution is$y(x)=c_1y_c+Y_p=\dots$$c_1e^{-3x}+\frac{12}{\pi^2+9}\cos(\pi x)+\frac{4\pi}{\pi^2+9}\sin(\pi x)-\frac45e^{2x}+\frac13x^2-\frac29x+\frac{20}{27}$actually that wasn't so bad. maybe even easier than integration by parts. Interesting!

10. TuringTest

*the last number is$+\frac{20}{27}$in case you can't see it