Your second equation is not y'=0 as you write in the question, but y'-y=0, in other words y'=y. This has the well-known solution $y=C_2e^x$.
So now you have the solutions $y=\frac{x^2}2+C_1$ and $y=C_2 e^x$. Now, for the most difficult part of the trick, you need to find all ways to glue intervals of these solutions together so the derivative matches across the glue point ... which means (consult the differential equations again!) that the gluing point(s) has to lie on the line $x=y$.
For example one solution among many would be $y=\cases{e^{x-1}&\text{for }x\le 1\\ \frac{x^2+1}2&\text{for }x\ge 1}$.
On the other hand, this gluing-together doesn't involve anything specific to differential equations, so perhaps you can take it from here?