solve the IVP, y'=abs(y-1), y(0)=1
is this diff eqs?
yeah
you mean calculus or differential equations?
i know that abs(y-1)=sqrt((y-1)^2) but i cant see how to apply it and i have just started studying diff eq
it is an initial value problem from a differential equations class
have not taken the class yet, sorry
Suppose that y>=1, then You can verify that \[ y= 1 - e^x \] is a solution
Suppose that y<=1, then You can verify that \[ y= 1- e^{-x} \] is a solution.
how does dy/dx = -e^x solve dy/dx=abs(y-1)??
you mean e^x + 1 ?
we suppose in each case that y >1 or y<1
ok so walk me through this, sorry. if y = 1 - e^x and y >1 then x<ln(1) = 0 right? and then dy/dx = -e^x but - e^x is negative for this interval and so isnt a solution to the diff eq
The first solution is not acceptable sinc \[ y = 1 - e^x <1 \] and the hypothesis was for y >1
Let concentrate on y < 1, so y -1 <0 and Abs(y-1)=1-y
i see how this solves the condition that y(0)=1 but do not see how it solves dy/dx=abs(y-1), it works if you ignore the abs but not otherwise
ok i follow
Use the initial condition to get c =0
\[ \frac {dy}{dx}= 1- y\\ \frac {dy}{1-y}= dx\\ -\ln(1-y) = x +c\\ e^{-\ln(1-y)}= e^{x+c}\\ \frac 1 {1-y} =e^{x+c}\\ 1-y= e^{-x +c}\\ y = 1 - e^{-x -c}\\ \]
very clear, thank you :)
YW
Join our real-time social learning platform and learn together with your friends!