12.9.8 problem 8

Internal problem ID [1764]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 5 linear second order equations. Section 5.6 Reduction or order. Page 253
Problem number : 8
Date solved : Saturday, March 29, 2025 at 11:38:51 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using reduction of order method given that one solution is

\begin{align*} y&={\mathrm e}^{-x^{2}} \end{align*}

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