19.1.10 problem 10

Internal problem ID [4222]
Book : Advanced Mathematica, Book2, Perkin and Perkin, 1992
Section : Chapter 11.3, page 316
Problem number : 10
Date solved : Tuesday, September 30, 2025 at 07:07:40 AM
CAS classification : [_separable]

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