Solve the initial value problem (x^2+1)y'=xy+1 , y(0)=1
Solve the initial value problem $(x^2+1)y'=xy+1$, $y(0)=1$.
Explanation of Method
Independently re-solve the linear IVP from scratch with \texttt{sp.dsolve}, and separately recompute the integrating factor and the integral $\int dx/(x^2+1)^{3/2}$ term-by-term, cross-checking every intermediate quantity the source reports.
Step 1: Solve directly with \texttt{sp.dsolve}
Calling \texttt{sp.dsolve} on $(x^2+1)y'=xy+1$ with $y(0)=1$ returns $y=x+\sqrt{x^2+1}$ directly — matching the source's boxed answer with no intermediate steps assumed.
Step 2: Recompute the integrating factor independently
In standard form $y'-\dfrac{x}{x^2+1}y=\dfrac{1}{x^2+1}$, \texttt{sympy} computes $\mu(x)=\exp\!\left(\int -\dfrac{x}{x^2+1}\,dx\right)=(x^2+1)^{-1/2}$, matching the source exactly.
Step 3: Recompute $\int dx/(x^2+1)^{3/2}$ independently
\texttt{sp.integrate}$\!\left(1/(x^2+1)^{3/2},x\right)$ returns $\dfrac{x}{\sqrt{x^2+1}}$ directly, matching the source's trigonometric-substitution result exactly, giving $y=x+C\sqrt{x^2+1}$, and $C=1$ from $y(0)=1$.
Step 4: Confirm both the ODE and the initial condition
For $y=x+\sqrt{x^2+1}$, \texttt{sympy} gives $(x^2+1)y'-(xy+1)=0$ identically, and $y(0)=1$ exactly — both confirmed independently rather than trusting the source's checkmark.
Result
Final answer:
Fully confirmed by an independent \texttt{sp.dsolve} call and by separately re-deriving the integrating factor and integral: the source's work is entirely correct. \[\boxed{\,y=x+\sqrt{x^2+1}\,}\]