Advertisements
Advertisements
Question
Solve the differential equation \[\frac{dy}{dx}\] + y cot x = 2 cos x, given that y = 0 when x = \[\frac{\pi}{2}\] .
Advertisements
Solution
\[\frac{dy}{dx}\] + y cot x = 2 cos x.
It is of the form \[\frac{dy}{dx} + Py = Q\].
Here, P = cot x; Q = 2cos x .
\[I . F . = e^\int Pdx \]
\[I . F . = e^\int cot x dx \]
\[I . F . = e^{\log\sin x} \]
\[I . F . = \sin x\]
The required solution is of the form
y(I.F.)= \[\int\left( I . F . \right)Qdx\]
\[\Rightarrow y\sin x = \int2\sin x\cos x dx\]
\[ \Rightarrow y\sin x = \int\sin2xdx\]
\[ \Rightarrow y\sin x = - \frac{\cos2x}{2} + C\]
Given: \[x = \frac{\pi}{2}, y = 0\]
\[\Rightarrow 0\sin\frac{\pi}{2} = - \frac{\cos2\frac{\pi}{2}}{2} + C\]
\[ \Rightarrow C - \frac{cos\pi}{2} = 0\]
\[ \Rightarrow C + \frac{1}{2} = 0\]
\[ \Rightarrow C = - \frac{1}{2}\]
Hence, the required solution is
\[y\sin x = - \frac{\cos2x}{2} - \frac{1}{2}\]
\[ \Rightarrow y\sin x + \frac{\cos2x}{2} + \frac{1}{2} = 0\]
\[ \Rightarrow 2y\sin x + \cos2x + 1 = 0\]
