74.5.12 problem 12

Internal problem ID [15897]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 2. First Order Equations. Exercises 2.3, page 49
Problem number : 12
Date solved : Thursday, March 13, 2025 at 06:56:29 AM
CAS classification : [_linear]

\begin{align*} y^{\prime }&=2 x +\frac {x y}{x^{2}-1} \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 23
ode:=diff(y(x),x) = 2*x+x*y(x)/(x^2-1); 
dsolve(ode,y(x), singsol=all);
 
\[ y = 2 x^{2}-2+\sqrt {x -1}\, \sqrt {x +1}\, c_{1} \]
Mathematica. Time used: 0.033 (sec). Leaf size: 24
ode=D[y[x],x]==2*x+x*y[x]/(x^2-1); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 2 x^2+c_1 \sqrt {x^2-1}-2 \]
Sympy. Time used: 0.403 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x - x*y(x)/(x**2 - 1) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \sqrt {x^{2} - 1} + 2 x^{2} - 2 \]