We are given the differential equation:
+ycosx=sin2x. This is a first-order linear differential equation. The standard form of such an equation is:
+P(x)y=Q(x). In this example,
P(x)=cosx and
Q(x)=sin2x.
First, we need to find the integrating factor,
µ(x), which is given by:
µ(x)=e∫P(x)dx=e∫cosxdx=esinx.Now, multiply every term of the original differential equation by the integrating factor:
esinx+esinxycosx=esinxsin2xThe left-hand side of the equation can be rewritten (thanks to the integrating factor being correctly applied) as:
(yesinx). Notice that we can simplify
sin2x using the identity
sin2x=2sinxcosx, which in this case gives us:
sin2x=sinxcosx. Now our equation becomes:
(yesinx)=esinxsinxcosx Let's tackle the integral on the right. To simplify this integral, recognize that differentiating
esinx gives
esinxcosx, suggesting a substitution
u=sinx, hence
du=cosxdx :
∫esinxsinxcosxdx=∫ueuduThe integration of
ueu can be handled by integration by parts, or recognizing it as a standard integral:
∫ueudu=ueu−∫eudu=ueu−eu=(u−1)eu+C.Returning back to
x terms, we find:
∫esinxsinxcosxdx=(sinx−1)esinx+C Substituting this back into our integrated solution gives us:
yesinx=esinx(sinx−1)+C.Comparing this with the provided options, the correct answer is:
Option B:
yesinx=esinx(sinx−1)+C