23.3.564 problem 572

Internal problem ID [6278]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 572
Date solved : Tuesday, September 30, 2025 at 02:42:08 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \left (a -x \right )^{2} \left (b -x \right )^{2} y^{\prime \prime }&=k^{2} y \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 108
ode:=(a-x)^2*(b-x)^2*diff(diff(y(x),x),x) = k^2*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sqrt {\left (a -x \right ) \left (b -x \right )}\, \left (\left (\frac {a -x}{b -x}\right )^{\frac {\sqrt {a^{2}-2 a b +b^{2}+4 k^{2}}}{2 a -2 b}} c_1 +\left (\frac {a -x}{b -x}\right )^{-\frac {\sqrt {a^{2}-2 a b +b^{2}+4 k^{2}}}{2 a -2 b}} c_2 \right ) \]
Mathematica. Time used: 19.565 (sec). Leaf size: 151
ode=(a - x)^2*(b - x)^2*D[y[x],{x,2}] == k^2*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to (x-a)^{\frac {1}{2} \left (1-\sqrt {\frac {4 k^2}{(a-b)^2}+1}\right )} (x-b)^{\frac {1}{2} \left (1-\sqrt {\frac {4 k^2}{(a-b)^2}+1}\right )} \left (c_1 (x-a)^{\sqrt {\frac {4 k^2}{(a-b)^2}+1}}-\frac {c_2 (x-b)^{\sqrt {\frac {4 k^2}{(a-b)^2}+1}}}{(a-b) \sqrt {\frac {4 k^2}{(a-b)^2}+1}}\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
k = symbols("k") 
y = Function("y") 
ode = Eq(-k**2*y(x) + (a - x)**2*(b - x)**2*Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -k**2*y(x) + (a - x)**2*(b - x)**2*Derivative(y(x), (x, 2)) cann