60.3.340 problem 1357

Internal problem ID [11336]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 2, linear second order
Problem number : 1357
Date solved : Sunday, March 30, 2025 at 08:17:16 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }&=-\frac {\left (a \,x^{2}+a -1\right ) y^{\prime }}{x \left (x^{2}+1\right )}-\frac {\left (b \,x^{2}+c \right ) y}{x^{2} \left (x^{2}+1\right )} \end{align*}

Maple. Time used: 0.041 (sec). Leaf size: 97
ode:=diff(diff(y(x),x),x) = -1/x*(a*x^2+a-1)/(x^2+1)*diff(y(x),x)-(b*x^2+c)/x^2/(x^2+1)*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = x^{-\frac {a}{2}+1} \left (\operatorname {LegendreQ}\left (-\frac {1}{2}+\frac {\sqrt {a^{2}-2 a -4 b +1}}{2}, \frac {\sqrt {a^{2}-4 a -4 c +4}}{2}, \sqrt {x^{2}+1}\right ) c_2 +\operatorname {LegendreP}\left (-\frac {1}{2}+\frac {\sqrt {a^{2}-2 a -4 b +1}}{2}, \frac {\sqrt {a^{2}-4 a -4 c +4}}{2}, \sqrt {x^{2}+1}\right ) c_1 \right ) \]
Mathematica. Time used: 0.709 (sec). Leaf size: 264
ode=D[y[x],{x,2}] == -(((c + b*x^2)*y[x])/(x^2*(1 + x^2))) - ((-1 + a + a*x^2)*D[y[x],x])/(x*(1 + x^2)); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x^{-\frac {1}{2} \sqrt {a^2-4 a-4 c+4}-\frac {a}{2}+1} \left (c_1 \operatorname {Hypergeometric2F1}\left (\frac {1}{4} \left (-\sqrt {a^2-2 a-4 b+1}-\sqrt {a^2-4 a-4 c+4}+1\right ),\frac {1}{4} \left (\sqrt {a^2-2 a-4 b+1}-\sqrt {a^2-4 a-4 c+4}+1\right ),1-\frac {1}{2} \sqrt {a^2-4 a-4 c+4},-x^2\right )+c_2 x^{\sqrt {a^2-4 a-4 c+4}} \operatorname {Hypergeometric2F1}\left (\frac {1}{4} \left (-\sqrt {a^2-2 a-4 b+1}+\sqrt {a^2-4 a-4 c+4}+1\right ),\frac {1}{4} \left (\sqrt {a^2-2 a-4 b+1}+\sqrt {a^2-4 a-4 c+4}+1\right ),\frac {1}{2} \left (\sqrt {a^2-4 a-4 c+4}+2\right ),-x^2\right )\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
y = Function("y") 
ode = Eq(Derivative(y(x), (x, 2)) + (a*x**2 + a - 1)*Derivative(y(x), x)/(x*(x**2 + 1)) + (b*x**2 + c)*y(x)/(x**2*(x**2 + 1)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Expected Expr or iterable but got None