What is the particular solution of the differential equation # y' + y tanx = sin(2x) # where #y(0)=1#?

2 Answers
Jul 28, 2017

#y = -2cos^2(x)+3cos(x)#

Explanation:

The given equation,

#y'+ytan(x)=sin(2x)#

, is of the form:

#y' + P(x)y = Q(x)#

Where #P(x) = tan(x), and Q(x) = sin(2x)#

It is known that the integrating factor is:

#mu(x) = e^(intP(x)dx)#

#inttan(x)dx = log(sec(x))#

#mu(x) = e^log(sec(x)) = sec(x)#

Multiply the given equation by #mu(x)#:

#y'sec(x)+tan(x)sec(x)y=sin(2x)/sec(x)#

We know that the left side integrates to #mu(x)y# and we are left with the task of integrating the right side:

#sec(x)y = intsin(2x)sec(x)dx#

#sec(x)y = -2cos(x)+C#

Multiply both side by #cos(x)#

#y = -2cos^2(x)+Ccos(x)#

Use the boundary condition to find the value of C:

#1 = -2cos^2(0)+Ccos(0)#

#C = 3#

Jul 28, 2017

# y = -2cos^2x + 3cosx #

Explanation:

We have

# y' + y tanx = sin(2x) #

Which can be written:

# y' + tanx \ y = sin(2x) #

This is a first order linear ordinary differential equation of the form:

# (d zeta)/dx + P(x) zeta = Q(x) #

We solve this using an Integrating Factor

# I = exp( \ int \ P(x) \ dx ) #
# \ \ = exp( int \ (tanx) \ dx ) #
# \ \ = exp( ln |secx| ) #
# \ \ = exp( ln secx ) #
# \ \ = secx #

And if we multiply the DE by this Integrating Factor, #I#, we will have a perfect product differential;

# secx y' + y secxtanx = secx sin(2x) #
# :. d/dx(ysecx) = secx sin(2x) #

Which is now a separable DE, so we can "separate the variables" to get:

# ysec x = int \ secx sin(2x) \ dx #
# " " = int \ 1/cosx (2sinxcosx) \ dx #
# " " = 2 \ int \ sinx \ dx #

And, Integrating we get:

# ysecx = -2cosx + C #

# :. y/cosx = -2cosx + C #
# :. y = -2cos^2x + Ccosx #

Which is the general Solution. Then using #y(0)=1# we can find #C# as:

# 1 = -2cos^2 0 + Ccos0 => 1 = -2 + C => C= 3#

Hence

# :. y = -2cos^2x + 3cosx #