83.36.4 problem 4

Internal problem ID [19359]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter VIII. Linear equations of second order. Excercise VIII (A) at page 125
Problem number : 4
Date solved : Thursday, March 13, 2025 at 02:20:31 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} \left (1+x \right ) y^{\prime \prime }-2 \left (x +3\right ) y^{\prime }+\left (x +5\right ) y&={\mathrm e}^{x} \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 39
ode:=(1+x)*diff(diff(y(x),x),x)-2*(x+3)*diff(y(x),x)+(x+5)*y(x) = exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \left (c_{1} x^{5}+5 c_{1} x^{4}+10 c_{1} x^{3}+10 c_{1} x^{2}+\left (5 c_{1} -\frac {1}{4}\right ) x +c_{2} \right ) {\mathrm e}^{x} \]
Mathematica. Time used: 0.048 (sec). Leaf size: 30
ode=(1+x)*D[y[x],{x,2}]-2*(x+3)*D[y[x],x]+(x+5)*y[x]==Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{20} e^x \left (-5 x+4 c_2 (x+1)^5-1+20 c_1\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + 1)*Derivative(y(x), (x, 2)) + (x + 5)*y(x) - (2*x + 6)*Derivative(y(x), x) - exp(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (x*y(x) + x*Derivative(y(x), (x, 2)) + 5*y(x) - exp(x) + Derivative(y(x), (x, 2)))/(2*(x + 3)) cannot be solved by the factorable group method