Let us solve the differential equation dxdy+2ytanx=sinx, y(3π)=0. Let us divide both parts by cos2x. Then we get the differential equation cos2x1y′+cos3x2sinxy=cos2xsinx, which is equivalent to (cos2x1y)′=cos2xsinx. It follows that
cos2x1y=∫cos2xsinxdx=−∫cos2xd(cosx)=cosx1+C, and hence
y=cosx+Ccos2x is the general solution of the differential equation.
Since y(3π)=0, we get that 0=cos3π+Ccos23π=21+C41. Consequently, C=−2. We conclude that the solution of dxdy+2ytanx=sinx, y(3π)=0, is
y=cosx−2cos2x.
Comments