<s>[INST] Solving the differential equation $y''=y'^2+1$ I would like help solving the next differential equation.
$$y''=y'^2+1$$
I tried subsitiuting $p=y'$ and got to $\frac{1}{2}\ln|p^2+1|=\frac{1}{2}\ln|y|+\ln|c|$
but I don't know how to continue and maybe made a mistake.
any ideas?
 [/INST] $$y''=y'^{ 2 }+1\\ { y }'=p\left( y \right) ,y''=pp'\\ \\ p{ p }'={ p }^{ 2 }+1\\ \int { \frac { pdp }{ { p }^{ 2 }+1 }  } =\int { dy } \\ \frac { 1 }{ 2 } \int { \frac { d\left( { p }^{ 2 }+1 \right)  }{ { p }^{ 2 }+1 }  } =y+{ C }_{ 1 }\\ \ln { \left( { p }^{ 2 }+1 \right) =2\left( y+{ C }_{ 1 } \right)  } \\ { p }^{ 2 }={ e }^{ 2\left( y+{ C }_{ 1 } \right)  }-1\\ p=\sqrt { { e }^{ 2\left( y+{ C }_{ 1 } \right)  }-1 } \\ \frac { dy }{ dx } =\sqrt { { e }^{ 2\left( y+{ C }_{ 1 } \right)  }-1 } \\ \int { \frac { dy }{ \sqrt { { e }^{ 2\left( y+{ C }_{ 1 } \right)  }-1 }  } = } \int { dx } \\ \arctan { \left( \sqrt { { e }^{ 2\left( y+{ C }_{ 1 } \right)  }-1 }  \right)  } =x+{ C }_{ 2 }\\ \\ \\ y=\frac { 1 }{ 2 } \ln { \left( \tan ^{ 2 }{ \left( x+{ C }_{ 2 } \right)  } +1 \right)  } +{ C }_{ 1 }$$ or
$$y=-\ln { \left( \cos { \left( x+{ C }_{ 2 } \right)  }  \right) + } { C }_{ 1 }$$
</s>