Question
Question: If \[\dfrac{{dy}}{{dx}} + y\tan x = \sin 2x\;\] and \[y\left( 0 \right) = 1\], then \[y\left( \pi \r...
If dxdy+ytanx=sin2x and y(0)=1, then y(π) is equal to
(A) 1
(B) −1
(C) −5
(D) 5
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(π)
The method of integrating factor is:-
If a differential equation is of the form: dxdy+y.P(x)=Q(x)
Then the integrating factor is given by:-
I.F.=e∫p(x)dx
And the solution of the equation is given by:-
y×I.F.=∫(Q(x)×I.F)dx+C
Complete step-by-step answer:
The given differential equation is:-
dxdy+ytanx=sin2x
Since it is of the form:
dxdy+y.P(x)=Q(x)
On comparing we get:-
Hence we will use the method of integrating factor to solve this equation.
The integrating factor is given by:-
I.F.=e∫p(x)dx
Hence in this equation the integrating factor is:-
I.F.=e∫tanxdx
Now we know that:-
∫tanxdx=log(secx)+C
Hence putting the value we get:-
I.F.=elogsecx
Simplifying it we get:-
I.F.=secx
Now the solution of the equation is given by:-
y×I.F.=∫(Q(x)×I.F)dx+C
Hence putting the respective values we get:-
y×secx=∫(sin2x×secx)dx+C
Now we know that:-
Hence substituting these values we get:-
y×secx=∫(2sinxcosx×cosx1)dx+C
Simplifying it further we get:-
Now we know that:-
∫sinxdx=−cosx+C
Hence putting this value in above equation we get:-
y×secx=2(−cosx)+C
We know that:-
secx=cosx1
Putting the value we get:-
cosxy=2(−cosx)+C
Simplifying it we get:-
y=−2cos2x+Ccosx……………………………….(1)
Now putting in the given value i.e. y(0)=1
We get:-
1=−2cos2(0)+Ccos(0)
We know that:-
cos0=1
Hence substituting this value we get:-
1=−2(1)+C(1)
Evaluating the value of C we get:-
Putting this value in equation 1 we get:-
y=−2cos2x+3cosx…………………………..(2)
Now we have to find y(π)
Hence putting x=πin equation 2 we get:-
y=−2cos2(π)+3cos(π)
Now we know that:
cos(π)=−1
Putting this value we get:-
y=−2(−1)2+3(−1)
Solving it further we get:-
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.