Solveeit Logo

Question

Question: If \[\dfrac{{dy}}{{dx}} + y\tan x = \sin 2x\;\] and \[y\left( 0 \right) = 1\], then \[y\left( \pi \r...

If dydx+ytanx=sin2x  \dfrac{{dy}}{{dx}} + y\tan x = \sin 2x\; and y(0)=1y\left( 0 \right) = 1, then y(π)y\left( \pi \right) is equal to
(A) 1
(B) −1
(C) −5
(D) 5

Explanation

Solution

Here we will use the method of integrating factor t solve the given differential equation and the then use the given value to find the value of constant of integration and then finally find the value of y(π)y\left( \pi \right)
The method of integrating factor is:-
If a differential equation is of the form: dydx+y.P(x)=Q(x)\dfrac{{dy}}{{dx}} + y.P\left( x \right) = Q\left( x \right)
Then the integrating factor is given by:-
I.F.=ep(x)dxI.F. = {e^{\int {p\left( x \right)dx} }}
And the solution of the equation is given by:-
y×I.F.=(Q(x)×I.F)dx+Cy \times I.F. = \int {\left( {Q\left( x \right) \times I.F} \right)dx} + C

Complete step-by-step answer:
The given differential equation is:-
dydx+ytanx=sin2x  \dfrac{{dy}}{{dx}} + y\tan x = \sin 2x\;
Since it is of the form:
dydx+y.P(x)=Q(x)\dfrac{{dy}}{{dx}} + y.P\left( x \right) = Q\left( x \right)
On comparing we get:-

p(x)=tanx Q(x)=sin2x  p\left( x \right) = \tan x \\\ Q\left( x \right) = \sin 2x \\\

Hence we will use the method of integrating factor to solve this equation.
The integrating factor is given by:-
I.F.=ep(x)dxI.F. = {e^{\int {p\left( x \right)dx} }}
Hence in this equation the integrating factor is:-
I.F.=etanxdxI.F. = {e^{\int {\tan xdx} }}
Now we know that:-
tanxdx=log(secx)+C\int {\tan xdx = \log \left( {\sec x} \right)} + C
Hence putting the value we get:-
I.F.=elogsecxI.F. = {e^{\log \sec x}}
Simplifying it we get:-
I.F.=secxI.F. = \sec x
Now the solution of the equation is given by:-
y×I.F.=(Q(x)×I.F)dx+Cy \times I.F. = \int {\left( {Q\left( x \right) \times I.F} \right)dx} + C
Hence putting the respective values we get:-
y×secx=(sin2x×secx)dx+Cy \times \sec x = \int {\left( {\sin 2x \times \sec x} \right)dx} + C
Now we know that:-

sin2x=2sinxcosx secx=1cosx  \sin 2x = 2\sin x\cos x \\\ \sec x = \dfrac{1}{{\cos x}} \\\

Hence substituting these values we get:-
y×secx=(2sinxcosx×1cosx)dx+Cy \times \sec x = \int {\left( {2\sin x\cos x \times \dfrac{1}{{\cos x}}} \right)dx} + C
Simplifying it further we get:-

y×secx=(2sinx)dx+C y×secx=2(sinx)dx+C  y \times \sec x = \int {\left( {2\sin x} \right)dx} + C \\\ \Rightarrow y \times \sec x = 2\int {\left( {\sin x} \right)dx} + C \\\

Now we know that:-
sinxdx=cosx+C\int {\sin xdx = - \cos x + C}
Hence putting this value in above equation we get:-
y×secx=2(cosx)+Cy \times \sec x = 2\left( { - \cos x} \right) + C
We know that:-
secx=1cosx\sec x = \dfrac{1}{{\cos x}}
Putting the value we get:-
ycosx=2(cosx)+C\dfrac{y}{{\cos x}} = 2\left( { - \cos x} \right) + C
Simplifying it we get:-
y=2cos2x+Ccosxy = - 2{\cos ^2}x + C\cos x……………………………….(1)
Now putting in the given value i.e. y(0)=1y\left( 0 \right) = 1
We get:-
1=2cos2(0)+Ccos(0)1 = - 2{\cos ^2}\left( 0 \right) + C\cos \left( 0 \right)
We know that:-
cos0=1\cos 0 = 1
Hence substituting this value we get:-
1=2(1)+C(1)1 = - 2\left( 1 \right) + C\left( 1 \right)
Evaluating the value of C we get:-

C=1+2 C=3  C = 1 + 2 \\\ \Rightarrow C = 3 \\\

Putting this value in equation 1 we get:-
y=2cos2x+3cosxy = - 2{\cos ^2}x + 3\cos x…………………………..(2)
Now we have to find y(π)y\left( \pi \right)
Hence putting x=πx = \pi in equation 2 we get:-
y=2cos2(π)+3cos(π)y = - 2{\cos ^2}\left( \pi \right) + 3\cos \left( \pi \right)
Now we know that:
cos(π)=1\cos \left( \pi \right) = - 1
Putting this value we get:-
y=2(1)2+3(1)y = - 2{\left( { - 1} \right)^2} + 3\left( { - 1} \right)
Solving it further we get:-

y=23 y=5  y = - 2 - 3 \\\ \Rightarrow y = - 5 \\\

Hence option C is correct.

Note: In the questions of differential equations we have to observe which form is given and then solve it accordingly.
Students may make mistakes while evaluating the value of C so all the values should be substituted carefully.