To determine
To find: The constants A and B.
Answer
The constants A and B are −310_ and −110_, respectively.
Explanation
Given:
The function is y=Asinx+Bcosx.
The differential equation y″+y′−2y=sinx.
Derivative Rules:
(1) Sum Rule: ddx[f(x)+g(x)]=ddx[f(x)]+ddx[g(x)]
(2) Difference Rule: ddx[f(x)−g(x)]=ddx[f(x)]−ddx[g(x)]
Calculation:
Obtain the first derivative of y.
y′=ddx(y)=ddx(Asinx+Bcosx)
Apply the sum rule (1),
y′=ddx(Asinx)+ddx(Bcosx)=Addx(sinx)+Bddx(cosx)=A(cosx)+B(−sinx)=Acosx−Bsinx
Thus, the first derivative of y is y′=Acosx−Bsinx.
Obtain the second derivative of y.
y″=ddx(y′)=ddx(Acosx−Bsinx)
Apply the difference rule (2),
y″=ddx(Acosx)−ddx(Bsinx)=Addx(cosx)−Bddx(sinx)=A(−sinx)−B(cosx)=−Asinx−Bcosx
Thus, the first derivative of y is y″=−Asinx−Bcosx.
Substitute y, y′, y″ in the given differential equation y″+y′−2y=sinx,
(−Asinx−Bcosx)+(Acosx−Bsinx)−2(Asinx+Bcosx)=sinx−Asinx−Bcosx+Acosx−Bsinx−2Asinx−2Bcosx=sinx−3Asinx−3Bcosx+Acosx−Bsinx=sinx(−3A−B)sinx+(A−3B)cosx=1sinx
Equate the coefficient of sinx,
−3A−B=1 (1)
Equate the coefficient of cosx,
A−3B=0 (2)
Multiply the equation (2) by 3,
3A−9B=0 (3)
Add equation (1) and (3),
−10B=1B=−110
Substitute B=−110 in equation (1),
A−3(−110)=0A+310=0A=−310
Therefore, the constants A and B are −310_ and −110_, respectively.