Please take a look at my work below and provide a good critique:
Solve the differential equation using the method of undetermined coefficients or variation of parameters.
y'' - 3y' + 2y = sin(x)
yc(x)= c1*e^2x+c2*e^x
y"-3y'+2y=sin(x)
r^2-3r+2=0
(r-1)(r-2)=0
r1=1, r2=2
yp(x)=Acosx+Bsinx
yp'(x)=-Asinx+Bcosx
yp"(x)=-Acosx-Bsinx
(-Acosx-Bsinx)-3(-Asinx+Bcosx)+2(Acosx+Bsinx)=sinx
-Acosx-Bsinx+3Asinx-3Bcosx+2Acosx+2Bsinx
(A-3B)cosx+(B+3A)sinx=sinx
A-3B=0 and B+3A=1
A=3B, B+3B=1
A=3/4, B=1/4
yp(x)=(3/4)cosx+(1/4)sinx=(1/4)(3cosx+sinx)
This did not come out correctly. I am trying to solve for yp(x). Where have I made an error and how can I fix it? Thanks.
-Acosx-Bsinx+3Asinx-3Bcosx+2Acosx+2Bsinx=sinx
from that line, to the next,
(A-3B)cosx+(B+3A)sinx=sinx
I think you should have
(A-3B+2A)cosx+(B+3A)sinx=sinx
check my adding.
got it, thanks.
You're welcome! It's important to carefully check the signs and terms when solving equations. In your case, you made a mistake in the line:
(A-3B)cosx+(B+3A)sinx=sinx
The correct line should be:
(A-3B+2A)cosx+(B+3A)sinx=sinx
By combining like terms, you can simplify the equation to:
(3A-3B)cosx + (B+3A)sinx = sinx
Now, you can equate the coefficients of cosx and sinx to the right side of the equation. That will give you the correct values for A and B:
3A - 3B = 0
B + 3A = 1
Solving this system of equations, you can find that A = 3/4 and B = 1/4. Therefore, the correct expression for yp(x) is:
yp(x) = (3/4)cosx + (1/4)sinx = (1/4)(3cosx + sinx)
I hope this helps! Let me know if you have any further questions.
Based on your work, it seems that you made a mistake when combining like terms in the line:
-Acosx - Bsinx + 3Asinx - 3Bcosx + 2Acosx + 2Bsinx = sinx
You correctly combined the coefficients of sin(x) and cos(x), but you missed the coefficient of cos(x) term. It should be:
(-A + 2A - 3B)cosx + (B + 3A)sinx = sinx
Simplifying further:
(A - 3B + 2A)cosx + (B + 3A)sinx = sinx
Now you have the correct equation. From here, you can solve for A and B by setting the coefficients of cos(x) and sin(x) equal to each other:
A - 3B + 2A = 0 (coefficient of cos(x))
B + 3A = 1 (coefficient of sin(x))
Solving these equations simultaneously, you can find:
A = 3/4
B = 1/4
Therefore, the correct particular solution is:
yp(x) = (3/4)cosx + (1/4)sinx = (1/4)(3cosx + sinx)
To fix the mistake, simply update the equation to include the coefficient of the cos(x) term when combining like terms.