40.12.6 problem 11

Internal problem ID [6754]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 17. Linear equations with variable coefficients (Cauchy and Legndre). Supplemetary problems. Page 110
Problem number : 11
Date solved : Wednesday, March 05, 2025 at 02:42:52 AM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.002 (sec). Leaf size: 41
ode:=(2*x+1)^2*diff(diff(y(x),x),x)-2*(2*x+1)*diff(y(x),x)-12*y(x) = 6*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_1}{2 x +1}+\left (2 x +1\right )^{3} c_2 +\frac {-24 x^{2}-8 x -1}{64 x +32} \]
Mathematica. Time used: 0.059 (sec). Leaf size: 41
ode=(2*x+1)^2*D[y[x],{x,2}]-2*(2*x+1)*D[y[x],x]-12*y[x]==6*x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {-24 x^2-8 x+32 c_1 (2 x+1)^4-1+32 c_2}{32 (2 x+1)} \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-6*x + (2*x + 1)**2*Derivative(y(x), (x, 2)) - (4*x + 2)*Derivative(y(x), x) - 12*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (4*x**2*Derivative(y(x), (x, 2)) + 4*x*Derivative(y(x), (x, 2)) - 6*x - 12*y(x) + Derivative(y(x), (x, 2)))/(2*(2*x + 1)) cannot be solved by the factorable group method