Solveeit Logo

Question

Question: Solve the differential equation: \[\dfrac{{dy}}{{dx}} + y{\sec ^2}x = \tan x{\sec ^2}x;y(0) = 1\]...

Solve the differential equation:
dydx+ysec2x=tanxsec2x;y(0)=1\dfrac{{dy}}{{dx}} + y{\sec ^2}x = \tan x{\sec ^2}x;y(0) = 1

Explanation

Solution

We need to solve the differential equation, which means we need to bring it to the simplest form. Now, as we observe the equation, we see that it is in the form dydx+Py=Q\dfrac{{dy}}{{dx}} + Py = Q. When the equation is in this form, we go to the next step which is finding out the Integrating Factor (IF). IF is given by eP.dx{e^{\int {P.dx} }}. The Solution is given by, y.eP.dx=(QeP.dx)dx+cy.{e^{\int {P.dx} }} = \int {\left( {Q{e^{\int {P.dx} }}} \right)} dx + c. We substitute the values of P and Q properly. Then after simplifying, we get the final solution by using substitution and integration by parts method. There is one more condition given in the question, that is, y(0)=1y(0) = 1. We use this condition to find the value of c and then we substitute it in the solution to get the final answer.

Complete step-by-step solution:
Let us consider the given equation,
dydx+ysec2x=tanxsec2x\dfrac{{dy}}{{dx}} + y{\sec ^2}x = \tan x{\sec ^2}x
This is of the form,
dydx+Py=Q\dfrac{{dy}}{{dx}} + Py = Q
We can identify P and Q, which is
P=sec2xP = {\sec ^2}x
Q=tanxsec2xQ = \tan x{\sec ^2}x
We find the Integrating Factor (IF) using the formula,
IF=eP.dxIF = {e^{\int {P.dx} }}
By substituting for P, we get
IF=esec2x.dxIF = {e^{\int {{{\sec }^2}x.dx} }}
We know that, sec2xdx=tanx+c\int {{{\sec }^2}} xdx = \tan x + c
Substituting this in the above equation,
IF=etanxIF = {e^{\tan x}}
We know that,
y.eP.dx=(QeP.dx)dx+cy.{e^{\int {P.dx} }} = \int {\left( {Q{e^{\int {P.dx} }}} \right)} dx + c
Where, eP.dx{e^{\int {P.dx} }} is the IF.
So, we get,
yetanx=(tanxsec2xetanx)dx\Rightarrow y{e^{\tan x}} = \int {\left( {\tan x{{\sec }^2}x{e^{\tan x}}} \right)} dx
Now, we consider the RHs
(tanxsec2xetanx)dx\int {\left( {\tan x{{\sec }^2}x{e^{\tan x}}} \right)} dx
We can solve this integral by substitution method.
Put tanx=t\tan x = t
Differentiating on both sides with respect to x,
sec2xdx=dt\Rightarrow {\sec ^2}xdx = dt
We substitute this in the above equation,
(tanxsec2xetanx)dx=t.etdt\int {\left( {\tan x{{\sec }^2}x{e^{\tan x}}} \right)} dx = \int {t.{e^t}} dt…….(1)
We now solve the RHS by Integration by parts.
The formula used is,
udv=uvvdu\int {udv = uv - \int {vdu} }
Where,

& u = t \cr & \Rightarrow du = 1 \cr} $$ $$\eqalign{ & v = {e^t} \cr & \Rightarrow dv = {e^t} \cr} $$ Substituting the values, we get $$ \Rightarrow \int {t.{e^t}} dt = t{e^t} - \int {{e^t}} .1 dt$$ We know, $$\int {{e^x}} = - {e^x}$$ $$ \Rightarrow \int {t.{e^t}} dt = t{e^t} - {e^t}$$ Equation (1) becomes, $$ \Rightarrow \int {\left( {\tan x{{\sec }^2}x{e^{\tan x}}} \right)} dx = t{e^t} - {e^t}$$ Now, by substituting back the value of t, $$ \Rightarrow \int {\left( {\tan x{{\sec }^2}x{e^{\tan x}}} \right)} dx = \tan x{e^{\tan x}} - {e^{\tan x}}$$ Simplifying the RHS, $$ \Rightarrow \int {\left( {\tan x{{\sec }^2}x{e^{\tan x}}} \right)} dx = \left( {\tan x - 1} \right){e^{\tan x}} + c$$ The solution is $$ \Rightarrow y{e^{\tan x}} = \left( {\tan x - 1} \right){e^{\tan x}} + c$$…….(2) Now, the given condition is $$y(0) = 1$$ This is of the form, $$y(x) = 1$$ So, $$x = 0,y = 1$$ Substituting this in (2), $$ \Rightarrow 1{e^{\tan 0}} = \left( {\tan 0 - 1} \right){e^{\tan 0}} + c$$ $$ \Rightarrow 1 = - 1 + c$$ $$ \Rightarrow c = 2$$ **Substituting the value of c in (2), we get the final answer. $$ \Rightarrow y{e^{\tan x}} = \tan x.{e^{\tan x}} - {e^{\tan x}} + 2$$** **Note:** The question has two parts. Read it carefully and solve both of them. Do not stop after finding the solution, substitute for the given condition and get to the final answer. There are many steps involved, so remember the proper formulae accordingly and go step by step.