9.5.17 problem 21

Internal problem ID [2953]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 9, page 38
Problem number : 21
Date solved : Tuesday, September 30, 2025 at 06:11:46 AM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (1\right )&=2 \\ \end{align*}
Maple. Time used: 0.017 (sec). Leaf size: 14
ode:=y(x)*(x^2-1)+x*(x^2+1)*diff(y(x),x) = 0; 
ic:=[y(1) = 2]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {4 x}{x^{2}+1} \]
Mathematica. Time used: 0.025 (sec). Leaf size: 15
ode=y[x]*(x^2-1)+x*(x^2+1)*D[y[x],x]==0; 
ic={y[1]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {4 x}{x^2+1} \end{align*}
Sympy. Time used: 0.156 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(x**2 + 1)*Derivative(y(x), x) + (x**2 - 1)*y(x),0) 
ics = {y(1): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {4 x}{x^{2} + 1} \]