Q: Find constants A and B so that the function y = Asin(x) + Bcos(x) satisfies the differential equation y'' + y' - 2y = sin(x).
Can someone explain how to solve this equation?
Can someone explain how to solve this equation?
-
y = Asin(x) + Bcos(x)
y' = Acos(x) -Bsin(x)
y'' = -Asin(x) -Bcos(x)
y'' +y' -2y =
-Asin(x) -Bcos(x) + Acos(x) -Bsin(x) - 2Asin(x) -2 Bcos(x)
= (-3A -B)Sin(x) +(A-3B)Cos(x)
==> (-3A -B)Sin(x) +(A-3B)Cos(x) = sin(x)
==> -3A-B = 1 and A-3B = 0
Solve simultaneously to get:
A = -3/4 , B= -1/4
y' = Acos(x) -Bsin(x)
y'' = -Asin(x) -Bcos(x)
y'' +y' -2y =
-Asin(x) -Bcos(x) + Acos(x) -Bsin(x) - 2Asin(x) -2 Bcos(x)
= (-3A -B)Sin(x) +(A-3B)Cos(x)
==> (-3A -B)Sin(x) +(A-3B)Cos(x) = sin(x)
==> -3A-B = 1 and A-3B = 0
Solve simultaneously to get:
A = -3/4 , B= -1/4