83.27.6 problem 6

Internal problem ID [19281]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter VII. Exact differential equations and certain particular forms of equations. Exercise VII (A) at page 104
Problem number : 6
Date solved : Monday, March 31, 2025 at 07:05:30 PM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+2 \,{\mathrm e}^{x} y^{\prime }+2 \,{\mathrm e}^{x} y&=x^{2} \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 29
ode:=diff(diff(y(x),x),x)+2*exp(x)*diff(y(x),x)+2*y(x)*exp(x) = x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_2 +\frac {\int \left (x^{3}+3 c_1 \right ) {\mathrm e}^{2 \,{\mathrm e}^{x}}d x}{3}\right ) {\mathrm e}^{-2 \,{\mathrm e}^{x}} \]
Mathematica. Time used: 60.021 (sec). Leaf size: 44
ode=D[y[x],{x,2}]+2*Exp[x]*D[y[x],x]+2*Exp[x]*y[x]==x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-2 e^x} \left (\int _1^x\frac {1}{3} e^{2 e^{K[1]}} \left (K[1]^3+3 c_1\right )dK[1]+c_2\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + 2*y(x)*exp(x) + 2*exp(x)*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -(x**2 - 2*y(x)*exp(x) - Derivative(y(x), (x, 2)))*exp(-x)/2 + Derivative(y(x), x) cannot be solved by the factorable group method