# Solve the following differential equations : $\cos^2x\large\frac{dy}{dx}$$+y=\tan \: x ## 1 Answer Toolbox: • To solve the first order differential equation of the form \large\frac{dy}{dx}$$ + Py = Q$
• (i) Write the given equation in the form of $\large\frac{dy}{dx}$$+ Py = Q • (ii) Find the integrating factor (I.F) = e^{\int Pdx}. • (iii) Write the solution as y(I.F) = \int Q(I.F) dx + C Step 1: The given equation is a first order linear equation Let us write the equation by dividing throughout by \cos^2x \large\frac{dy}{dx} +\frac{ y}{\cos^2x }=\frac{ \tan x}{\cos^2x} \large\frac{dy}{dx}$$ + (\sec^2x) y = \sec^2x \tan x$
Let us find the I.F
$\int Pdx = \int \sec^2xdx = \tan x$
Hence $I.F = e^{\large\tan x}$
Hence the solution is $y.e^{\tan x} = \int\sec^2x \tan x.e^{\tan x} + C$
Step 2:
To integrate this we should follow the substitution method.
Let $\tan x = t$; then $dt = \sec^2dx$
$y.e^{\tan x} = \int t.e^t. dt + C$
This has to be solved by integration by parts.
Let $u = t$ and $du = dt$ and $dv = e^tdt$, hence $v = e^t$
$\int t.e^tdt = (t.e^t) - \int e^tdt$
$\qquad\;\;\;\;= t.e^t - e^t + C$
Step 3:
Substituting the value of t we get,
Hence the required equation is $y.e^{\tan x }= \tan x.e^{\tan x} - e^{\tan x }+ C$
$y.e^{\tan x} = e^{\tan x}(\tan x - 1) + C$
$y = (\tan x -1) +\large\frac{ C}{e^{\Large\tan x}}$
This is the required solution.