Advertisements
Advertisements
Question
Solve the following differential equation :
`"dy"/"dx" + "y" = cos"x" - sin"x"`
Advertisements
Solution
Given:
`"dy"/"dx" + "y" = cos"x" - sin"x"` ............(1)
This differential equation is a linear differential equation of the form `"dy"/"dx"+"PQ"="Q"`
P = 1, Q = cos x - sin x
I.F. = e∫Pdx = e∫1dx = ex
Now multiply (1) with the I.F. we get
`"e"^"x"("dy"/"dx"+"y") = "e"^"x"(cos"x"-sin"x")`
Integrating both sides with respect to x.
yex=∫excosx-sinxdx+C⇒yex=∫excosxdx-∫exsinxdx+C⇒yex=excosx-∫-sinxexdx-∫exsinxdx+C⇒yex=excosx+∫exsinxdx-∫exsinxdx+C⇒yex=excosx+C">
yex = ∫ex (cos x -sin s)dx + C
⇒ yex = ∫ex cos xdx - ∫exsin xdx + C
⇒ yex = ex cosx - ∫(- sinx)exdx - ∫exsin xdx + C
⇒ yex = ex cosx + ∫exsin xdx - ∫exsin xdx + C
⇒ yex = ex cosx + C
Thus, yex = ex cosx + C is the required solution of the given differential equation.
