29.13.25 problem 379

Internal problem ID [4979]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 13
Problem number : 379
Date solved : Sunday, March 30, 2025 at 04:27:45 AM
CAS classification : [[_homogeneous, `class D`], _rational, _Riccati]

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

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