# two constants of integration in first order ODE

Let's take for example the equation: $$y=1+y'^2$$ Now I see that this equation is seperable but I don't understand why using the general method for implicit ODEs can lead to the following strange outcome. First we substitute: $$y'=p(x)\, \,\,\,\,\,\,\, \text{ so} \,\,\,\,\,\,\, y=y(x,p(x))$$ Then we take the full derivative of $$y$$ to find $$p(x)$$: $$\frac{dy}{dx}=\frac{\partial y}{\partial x}+\frac{\partial y}{\partial p}\frac{dp}{dx}=p(x)$$ And so we get: $$p(x)=2y'p'\Rightarrow p'=\frac{1}{2}$$ But $$p'=y''$$ So we have two options:

One is to integrate twice and get an expression for $$y$$: $$\int p' dx=p=\frac{x}{2}+C_1\\ \int p \,dx=\int y'dx=y=\frac{x^2}{4}+xC_1+C_2 \\ \Rightarrow y(x)=\frac{x^2}{4}+xC_1+C_2$$ Second is to solve for $$p(x)$$ and plug it in the original ODE: $$\int p' dx=p=\frac{x}{2}+C \\ y=1+p^2=1+(\frac{x}{2}+C)^2$$ Why do the two methods give us different answers and what is the intuitive meaning behind the second constant? I just can't wrap my head around it. Or maybe there is a mistake in the first method that I don't catch. Please explain.

• I would be very suspicious if any method gave me two free constants for a first order ODE... Jul 31 at 10:24
• @A.P. Yes I mean the two different options that give us similar solutions but with different constants. Somehow using the first option loses more information on the function but i can't understand why is that. I'm not interested in the fact that it is seperable but why is there a solution with two constants to a first order ODE. Jul 31 at 10:43
• I deleted my comment because I had misunderstood the problem. We have solutions $y_{\pm}=x^2/4\pm Ax+A^2+1$. Jul 31 at 10:57

$$y'= 2y'y''$$ This implies that $$y'=0 \text{ or } y''=\tfrac{1}{2}\\ y=C\text{ or } y=\tfrac{x^2}{4}+C_1x+C_2$$ (It's important to note that a solution can also "jump" between different solution branches if you can glue them together in a sufficiently smooth way).
These two equations are easy to solve but by differentiating we introduced an additional degree of freedom. Indeed if we would have started with the ODE: $$y=1+y'^2+C$$ we would get the exact same solution because the $$C$$ would just vanish.
Therfore, to get really solutions of tue original ODE and not a more generic class of solutions we need to (at some point) evaluate our original ODE which gives $$y=1\text{ or } y=1+(\tfrac{x}{2}+C)^2$$ Again, please note that a specific solution can also consist of multiple sections with different constants and branches.