In my class on differential equations, I have encountered the following initial value problem
\begin{gather} y' = 1 + |y-1| \\ y(0) = 0 \end{gather}
I cannot solve this. The ODE is first order, but the absolute value confuses me as I cannot integrate or do anything like that with it, the equation is nonlinear and has me stuck. How would one find the solution to this? I know existence and uniqueness applies even though the absolute value is not smooth, but because it is Lipschitz continuous I know a smooth solution must exist which I cannot seem to find. Can anyone show me how to solve this? I thank all helpers.
Can you solve each piece of $$ y'(x) = \begin{cases} 1 + (y(x) - 1) &, y(x) \geq 1 \\ 1 - (y(x) - 1) &, y(x) < 1 \\ \end{cases} $$
Since the initial condition has $y(x) - 1 = -1 < 0$, you start in the second piece. If you develop that solution forward, at what $x$ does $y(x) = 1$ occur? Then what?