77.1.133 problem 160 (page 236)

Internal problem ID [17952]
Book : V.V. Stepanov, A course of differential equations (in Russian), GIFML. Moscow (1958)
Section : All content
Problem number : 160 (page 236)
Date solved : Monday, March 31, 2025 at 04:52:16 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.004 (sec). Leaf size: 26
ode:=diff(diff(y(x),x),x)-2*y(x) = 4*x^2*exp(x^2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\sqrt {2}\, x} c_2 +{\mathrm e}^{-\sqrt {2}\, x} c_1 +{\mathrm e}^{x^{2}} \]
Mathematica. Time used: 0.252 (sec). Leaf size: 36
ode=D[y[x],{x,2}]-2*y[x]==4*x^2*Exp[x^2]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{x^2}+c_1 e^{\sqrt {2} x}+c_2 e^{-\sqrt {2} x} \]
Sympy. Time used: 0.327 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*x**2*exp(x**2) - 2*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- \sqrt {2} x} + C_{2} e^{\sqrt {2} x} + e^{x^{2}} \]