58.2.32 problem 32

Internal problem ID [9155]
Book : Second order enumerated odes
Section : section 2
Problem number : 32
Date solved : Wednesday, March 05, 2025 at 07:36:03 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

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