21.2.5 problem 5

Internal problem ID [4305]
Book : An introduction to the solution and applications of differential equations, J.W. Searl, 1966
Section : Chapter 4, Ex. 4.2
Problem number : 5
Date solved : Tuesday, September 30, 2025 at 07:16:52 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=\frac {x \left (1+y^{2}\right )}{y \left (x^{2}+1\right )} \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=1 \\ \end{align*}
Maple. Time used: 0.069 (sec). Leaf size: 13
ode:=diff(y(x),x) = x*(1+y(x)^2)/y(x)/(x^2+1); 
ic:=[y(0) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \sqrt {2 x^{2}+1} \]
Mathematica. Time used: 0.311 (sec). Leaf size: 16
ode=D[y[x],x]==(x*(1+y[x]^2))/(y[x]*(1+x^2)); 
ic=y[0]==1; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \sqrt {2 x^2+1} \end{align*}
Sympy. Time used: 0.314 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*(y(x)**2 + 1)/((x**2 + 1)*y(x)) + Derivative(y(x), x),0) 
ics = {y(0): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \sqrt {2 x^{2} + 1} \]