Question
Question: Solution of the differential equation \(\left( {\cos x} \right)dy = y\left( {\sin x - y} \right)dx,0...
Solution of the differential equation (cosx)dy=y(sinx−y)dx,0<x<2π is:
A) ysecx=tanx+c
B) ytanx=secx+c
C) tanx=(secx+c)y
D) secx=(tanx+c)y
Solution
Write the equation in the form of dxdy+f(x)×y=g(x) and then find the integrating factor
IF=e∫f(x)dx and we know the general equation will become
(IF)y=∫(IF)g(x)dx+c
Complete step-by-step answer:
Here we are given a differential equation
(cosx)dy=y(sinx−y)dx
So, we arrange it in the form of dxdy+f(x)×y=g(x).
So, we get,
dxdy=cosxysinx−y2
So, this cannot be in the form of dxdy+f(x)×y=g(x). If we divide by y2 both side,
y21dxdy=y1cosxsinx−cosx1
y21dxdy−y1×tanx=−secx (1)
Now we can assume that −y1=t
Upon differentiation with respect to x, we get
y21dxdy=dxdt
Now we can replace, y21dxdy=dxdt and −y1=t in equation (1)
So, we get
dxdt+ttanx=−secx
So we get in the form of dxdy+f(x)×y=g(x).
So, now we need to find the integrating factor.
IF=e∫f(x)dx Here, f(x)=tanx IF=e∫tanxdx=eloge(secx)=secx so, here we got IF=secx
Now the general equation will become
(IF)y=∫(IF)g(x)dx+c
Here replace y by t
(secx)t=∫−secx×secxdx+c (secx)t=−∫sec2xdx+c
We know that ∫sec2xdx=tanx
So,
t(secx)=−tanx+c
And we know −y1=t
ysecx=tanx+c secx=(tanx+c)y
So, option D is correct.
Note: Here we can use alternative method, we are given (cosx)dy=y(sinx−y)dx
⇒cosxdy−ysinxdx=−y2dx
If we differentiate d(ycosx)=cosxdy−ysinxdx
So, d(ycosx)=−y2dx
Now multiplying and dividing by cos2x
⇒d(ycosx)=cos2x−y2cos2xdx y2cos2xd(ycosx)=−cos2xdx
Integrating both sides,
∫(ycosx)21d(ycosx)=−∫sec2xdx \-ycosx1=−tanx+c secx=(tanx+c)y