32.6.34 problem Exercise 12.34, page 103

Internal problem ID [5899]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 12, Miscellaneous Methods
Problem number : Exercise 12.34, page 103
Date solved : Tuesday, March 04, 2025 at 11:54:43 PM
CAS classification : [_separable]

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

Maple. Time used: 0.005 (sec). Leaf size: 20
ode:=(x^2-1)*diff(y(x),x)+x*y(x)-3*x*y(x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {1}{3+\sqrt {x -1}\, \sqrt {x +1}\, c_{1}} \]
Mathematica. Time used: 2.049 (sec). Leaf size: 35
ode=(x^2-1)*D[y[x],x]+x*y[x]-3*x*y[x]^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{3+e^{c_1} \sqrt {x^2-1}} \\ y(x)\to 0 \\ y(x)\to \frac {1}{3} \\ \end{align*}
Sympy. Time used: 1.538 (sec). Leaf size: 53
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-3*x*y(x)**2 + x*y(x) + (x**2 - 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {1 - \sqrt {C_{1} \left (x^{2} - 1\right )}}{3 \left (- C_{1} x^{2} + C_{1} + 1\right )}, \ y{\left (x \right )} = \frac {\sqrt {C_{1} \left (x - 1\right ) \left (x + 1\right )} + 1}{3 \left (- C_{1} x^{2} + C_{1} + 1\right )}\right ] \]