• # question_answer If $y=y\left( x \right)$is the solution of the differential equation $\frac{dy}{dx}=(tanx-y)se{{c}^{2}}x,x\in \left( -\frac{\pi }{2},\frac{\pi }{2} \right),$such that$y(0)=0,$then $y\left( -\frac{\pi }{4} \right)$is equal to : [JEE Main 10-4-2019 Morning] A) $2+\frac{1}{e}$                   B) $\frac{1}{2}-e$C) $e-2$D) $\frac{1}{2}-e$

$\frac{dy}{dx}=(tan\,x-y)se{{c}^{2}}x$ Now, $put\,\tan x=t\Rightarrow \frac{dt}{dx}=se{{c}^{2}}x$ So$\frac{dy}{dt}+y=t$ On solving, we get $y{{e}^{t}}={{e}^{t}}(t-1)+c$ $\Rightarrow y=(tanx-1)+c{{e}^{-\tan x}}$ $\Rightarrow y(0)=0\Rightarrow c=1$ $\Rightarrow y=\tan x-1+{{e}^{-\tan x}}$ So $y\left( -\frac{\pi }{4} \right)=e-2$