28.2.42 problem 42

Internal problem ID [4485]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 4. Linear Differential Equations. Page 183
Problem number : 42
Date solved : Sunday, March 30, 2025 at 03:23:48 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.004 (sec). Leaf size: 45
ode:=diff(diff(y(x),x),x)-4*y(x) = 96*x^2*exp(2*x)+4*exp(-2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (\left (32 x^{3}-24 x^{2}+12 x -3\right ) {\mathrm e}^{4 x}-4 x +4 c_1 -1\right ) {\mathrm e}^{-2 x}}{4}+{\mathrm e}^{2 x} c_2 \]
Mathematica. Time used: 0.117 (sec). Leaf size: 48
ode=D[y[x],{x,2}]-4*y[x]==96*x^2*Exp[2*x]+4*Exp[-2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{4} e^{-2 x} \left (e^{4 x} \left (32 x^3-24 x^2+12 x-3+4 c_1\right )-4 x-1+4 c_2\right ) \]
Sympy. Time used: 0.156 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-96*x**2*exp(2*x) - 4*y(x) + Derivative(y(x), (x, 2)) - 4*exp(-2*x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} - x\right ) e^{- 2 x} + \left (C_{2} + 8 x^{3} - 6 x^{2} + 3 x\right ) e^{2 x} \]