15.6.24 problem 24

Internal problem ID [2981]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 10, page 41
Problem number : 24
Date solved : Sunday, March 30, 2025 at 01:03:16 AM
CAS classification : [_linear]

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

With initial conditions

\begin{align*} y \left (0\right )&=-6 \end{align*}

Maple. Time used: 0.040 (sec). Leaf size: 38
ode:=(x^2-1)*diff(y(x),x)+(x^2-1)^2+4*y(x) = 0; 
ic:=y(0) = -6; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {\left (-\frac {x^{3}}{3}+2 x^{2}-7 x +8 \ln \left (x +1\right )-6\right ) \left (x +1\right )^{4}}{\left (x^{2}-1\right )^{2}} \]
Mathematica. Time used: 0.048 (sec). Leaf size: 38
ode=(x^2-1)*D[y[x],x]+(x^2-1)^2+4*y[x]==0; 
ic={y[0]==-6}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {(x+1)^2 \left (x^3-6 x^2+21 x-24 \log (x+1)+18\right )}{3 (x-1)^2} \]
Sympy. Time used: 0.620 (sec). Leaf size: 65
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x**2 - 1)**2 + (x**2 - 1)*Derivative(y(x), x) + 4*y(x),0) 
ics = {y(0): -6} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {- \frac {x^{5}}{3} + \frac {4 x^{4}}{3} - \frac {10 x^{3}}{3} + 8 x^{2} \log {\left (x + 1 \right )} - 18 x^{2} + 16 x \log {\left (x + 1 \right )} - 19 x + 8 \log {\left (x + 1 \right )} - 6}{x^{2} - 2 x + 1} \]