What is the general solution of the differential equation # dy/dx +y = y^2(cosx-sinx) #?
2 Answers
Explanation:
Let
From here, we grab the Integrating Factor,
From there, we remember that:
Therefore:
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) <=> 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) #