54.3.86 problem 1100

Internal problem ID [12381]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 2, linear second order
Problem number : 1100
Date solved : Wednesday, October 01, 2025 at 01:44:09 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x y^{\prime \prime }+2 y^{\prime }-x y-{\mathrm e}^{x}&=0 \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 23
ode:=x*diff(diff(y(x),x),x)+2*diff(y(x),x)-x*y(x)-exp(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\sinh \left (x \right ) c_2}{x}+\frac {\cosh \left (x \right ) c_1}{x}+\frac {{\mathrm e}^{x}}{2} \]
Mathematica. Time used: 0.02 (sec). Leaf size: 37
ode=-E^x - x*y[x] + 2*D[y[x],x] + x*D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {e^{-x} \left (e^{2 x} (2 x-1+2 c_2)+4 c_1\right )}{4 x} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*y(x) + x*Derivative(y(x), (x, 2)) - exp(x) + 2*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -x*y(x)/2 + x*Derivative(y(x), (x, 2))/2 - exp(x)/2 + Derivative(y(x), x) cannot be solved by the factorable group method