27.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, March 04, 2025 at 06:19:31 PM
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.028 (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,ic],y(x), singsol=all);
 
\[ y \left (x \right ) = \sqrt {2 x^{2}+1} \]
Mathematica. Time used: 0.523 (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]
 
\[ y(x)\to \sqrt {2 x^2+1} \]
Sympy. Time used: 0.525 (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} \]