- #1
sanhuy
- 40
- 2
Homework Statement
[tex] \frac{dy}{dx}\:+\:ycosx\:=\:5cosx [/tex]
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
[tex]\int \:\frac{1}{5-y}dy\:=\:\int \:cosxdx\:+\:C [/tex]
[tex] -ln\left|5-7\right|\:=\:sinx\:+C [/tex]
[tex] \left|5-y\right|\:=\:De^{-sinx}\:where\:D\:=\:e^{-C} [/tex]
[tex] \left|5-y\right|\:=\:5-y\:,\:if\:5-y\:>\:0\:and\:\left|5-y\right|\:=\:-\left(5-y\right)\:if\:5-y<0 [/tex]
using initial conditions for both equations
[tex] y=5\:-De^{-sinx}\:\:and\:\:y\:=\:5+De^{-sinx}[/tex]
[tex] y=5\:-2e^{-sinx}\:\:and\:\:y\:=\:5+2e^{-sinx} [/tex]
however the first solution is incorrect I don't understand why
Last edited by a moderator: