sanhuy
- 40
- 2
Homework Statement
\frac{dy}{dx}\:+\:ycosx\:=\:5cosx
I get two solutions for y however only one of them is correct according to my online homework
(see attempt at solution)
Homework Equations
y(0) = 7 is initial condition
The Attempt at a Solution
\int \:\frac{1}{5-y}dy\:=\:\int \:cosxdx\:+\:C
-ln\left|5-7\right|\:=\:sinx\:+C
\left|5-y\right|\:=\:De^{-sinx}\:where\:D\:=\:e^{-C}
\left|5-y\right|\:=\:5-y\:,\:if\:5-y\:>\:0\:and\:\left|5-y\right|\:=\:-\left(5-y\right)\:if\:5-y<0
using initial conditions for both equations
y=5\:-De^{-sinx}\:\:and\:\:y\:=\:5+De^{-sinx}
y=5\:-2e^{-sinx}\:\:and\:\:y\:=\:5+2e^{-sinx}
however the first solution is incorrect I don't understand why
Last edited by a moderator: