<s>[INST] Solving $y' = y^{2} + 1$ if $y(0) = 1$ The solution to the initial-value problem $y' = y^{2} + 1$ with $y(0)=1$ is $y = \tan(x + \frac{\pi}{4})$. I would like to show that this is the correct solution in a way that is analogous to my solution to differential equation $y' = y - 12$.
Solution to Differential Equation
If $y' = y - 12$,
\begin{equation*}
\frac{y'}{y - 12} = 1 ,
\end{equation*}
\begin{equation*}
\left(\ln(y - 12)\right)' = 1 ,
\end{equation*}
\begin{equation*}
\ln(y - 12) = t + C
\end{equation*}
for some constant $C$. If $C' = e^{C}$,
\begin{equation*}
y = C' e^{t} + 12 .
\end{equation*}
 [/INST] The equation can be written as
$$\frac {y'}{y^2+1}=1 $$
and after integration
$$\arctan (y)=x+C $$
for $x=0$, it gives
$$\arctan (1)=0+C=\frac {\pi}{4} $$
thus
$$y=\tan (x+\frac {\pi}{4}) .$$
</s>