71.9.6 problem 6

Internal problem ID [14414]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 4. N-th Order Linear Differential Equations. Exercises 4.1, page 186
Problem number : 6
Date solved : Monday, March 31, 2025 at 12:26:28 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

With initial conditions

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

Maple
ode:=(x^2-4)*diff(diff(y(x),x),x)+y(x)*ln(x) = x*exp(x); 
ic:=y(1) = 1, D(y)(1) = 2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica
ode=(x^2-4)*D[y[x],{x,2}]+Log[x]*y[x]==x*Exp[x]; 
ic={y[1]==1,Derivative[1][y][1]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*exp(x) + (x**2 - 4)*Derivative(y(x), (x, 2)) + y(x)*log(x),0) 
ics = {y(1): 1, Subs(Derivative(y(x), x), x, 1): 2} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : solve: Cannot solve -x*exp(x) + (x**2 - 4)*Derivative(y(x), (x, 2)) + y(x)*log(x)