What is the general solution of the differential equation # dy/dx +y = y^2(cosx-sinx) #?

2 Answers
Feb 16, 2017

#y = 1/( C e^x - sin x)#

Explanation:

#y' + y = y^2 (cos x - sin x)#

#(y')/y^2 + 1/y = cos x - sin x#

Let #v(x) = 1/(y(x))#, such that #v' = - (y')/y^2#

#implies - v' + v = cos x - sin x#

#implies v' - v = - cos x + sin x#

From here, we grab the Integrating Factor, #\lambda(x)#:

#lambda(x) = e^(- int dx) = e^(-x)#

#implies e^(-x) ( v' - v) = e^(-x) ( - cos x + sin x)#

#implies v e^(-x) = int dx qquad e^(-x) ( - cos x + sin x)#

# qquad = int dx qquad d/dx ( -e^(-x) sin x)#

#implies v e^(-x) = -e^(-x) sin x + C#

From there, we remember that: #v = 1/y#.

Therefore:

#y = 1/( C e^x - sin x)#

Feb 16, 2017

The solution to the DE

# dy/dx +y = y^2(cosx-sinx) #

is:

# y = 1/(Ce^x - sin x) #

Explanation:

We have:

# dy/dx +y = y^2(cosx-sinx) \ \ \ \ \ ..... [1]#

This is a First Order Bernoulli differential equation of the form:

# dy/dx + P(x) \ y = Q(x) \ y^n #

The technique to solve such an equation is to use a substitution to reduce the equation to a linear differential equation. We can do this by letting # v = y^(-1) #

# v=y^(-1) <=> y=1/v#

Differentiating we get:

# \ \ \ \ \ (dv)/dy = -1/y^2 #
# \ \ \ \ \ (dy)/dx = (dy)/(dv)*(dv)/dx \ \ \ # (chain rule)
# :. (dy)/dx = -y^2 \ (dv)/dx #
# :. (dy)/dx = -1/v^2 \ (dv)/dx #

Substituting into the DE [1] gives us:

# -1/v^2 \ (dv)/dx +1/v = 1/v^2(cosx-sinx) #
# :. -(dv)/dx + v = cosx-sinx #
# :. (dv)/dx - v = sinx-cosx \ \ \ \ \ [2]#

And so we have reduced our non-linear DE to a First Order Linear Differential equation of the form

# (dv)/dx + P(x)v = Q(x) #

We can sole this equation by using an Integrating Factor to convert the equation to a the perfect differential of a product as follows:

Let # I = exp( \ int \ P(x) \ dx \ ) #
# \ \ \ \ \ \ \ = exp( \ int \ -1 \ dx \ ) #
# \ \ \ \ \ \ \ = exp( -x ) #
# \ \ \ \ \ \ \ = e^( -x ) #

Multiply the DE [2] by the IF:

# e^( -x )(dv)/dx - ve^( -x ) = e^( -x )(sinx-cosx) #
# d/dx \ (ve^( -x )) = e^( -x )(sinx-cosx) #

This is a simple separable DE so we can separate the variables to get:

# ve^( -x ) = int \ e^( -x )(sinx-cosx) dx #

To save space I will just quote the result for the integral on the RHS, but this can easily be derived using Integration by Parts, so we get:

# ve^( -x ) = -e^( -x )sinx + C #

Restoring the earlier substitution the gives:

# y^(-1) e^( -x ) = e^( -x )sinx + C #
# :. \ y^(-1) = -sinx + Ce^x #
# :. \ \ \ \ 1/y = Ce^x - sin x #
# :. \ \ \ \ \ y = 1/(Ce^x - sin x) #