Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store
seo-qna
SearchIcon
banner

Solve the following differential equation:
\[\dfrac{dy}{dx}+y\tan x=\cos x\]

Answer
VerifiedVerified
607.5k+ views
Hint: The given differential equation is a first degree linear differential equation of the form \[\dfrac{dy}{dx}+Py=Q\]. The solution is given by:
\[y\times I.F=\int{Q\times I.F.dx+c}\]
where \[I.F={{e}^{\int{Pdx}}}\]
So we will first calculate an integrating factor known as I.F then we will substitute it in the equation of solution.

Complete step-by-step answer:
We have been given the differential equation \[\dfrac{dy}{dx}+y\tan x=\cos x\].
It is of the form \[\dfrac{dy}{dx}+Py=Q\] known as first degree differential equation and the solution is given by,
\[y\times I.F=\int{Q\times I.Fdx+c}\]
where \[I.F={{e}^{\int{Pdx}}}\]
So we have where \[P=\tan x\] and \[Q=\cos x\].
Now we will calculate the value of I.F as follows:
\[I.F={{e}^{\int{Pdx}}}={{e}^{\int{\tan xdx}}}\]
Since we know that \[\int{\tan xdx}=ln\left( \sec x \right)\]
\[\Rightarrow I.F={{e}^{ln\left( \sec x \right)}}\]
Also, we know that \[{{e}^{lnt}}=t\]
\[\Rightarrow I.F=\sec x\]
So the equation of the given differential equation is given as follows:
\[y\sec x=\int{\sec x\cos xdx+c}\]
Since we know that \[\sec x=\dfrac{1}{\cos x}\]
\[\begin{align}
  & \Rightarrow y\sec x=\int{\dfrac{1}{\cos x}\times \operatorname{cosxdx}}+c \\
 & \Rightarrow y\sec x=\int{dx+c} \\
\end{align}\]
\[\Rightarrow y\sec x=x+c\], where c is any arbitrary constant.
Therefore, the solution of the given differential equation is equal to \[y\sec x=x+c\].

Note: Be careful while finding the value of I.F, i.e. integrating factor. Sometimes we just forget that the term \[\int{Pdx}\] is on the power to ‘e’ and we use the I.F is equal to the value obtained by \[\int{Pdx}\] which gives us the wrong result. Also, don’t forget to mention plus ‘c’ in the final solution which is an arbitrary constant.