56.29.3 problem Ex 3

Internal problem ID [14235]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter VII, Linear differential equations with constant coefficients. Article 52. Summary. Page 117
Problem number : Ex 3
Date solved : Thursday, October 02, 2025 at 09:27:01 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y+2 y^{\prime }+y^{\prime \prime }&=2 x^{3}-x \,{\mathrm e}^{3 x} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 40
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)+y(x) = 2*x^3-x*exp(3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -48+\left (c_1 x +c_2 \right ) {\mathrm e}^{-x}+\frac {\left (-2 x +1\right ) {\mathrm e}^{3 x}}{32}+2 x^{3}-12 x^{2}+36 x \]
Mathematica. Time used: 0.23 (sec). Leaf size: 48
ode=D[y[x],{x,2}]+2*D[y[x],x]+y[x]==2*x^3-x*Exp[3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 2 \left (x^3-6 x^2+18 x-24\right )+\frac {1}{32} e^{3 x} (1-2 x)+e^{-x} (c_2 x+c_1) \end{align*}
Sympy. Time used: 0.175 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x**3 + x*exp(3*x) + y(x) + 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 2 x^{3} - 12 x^{2} + 36 x + \frac {\left (1 - 2 x\right ) e^{3 x}}{32} + \left (C_{1} + C_{2} x\right ) e^{- x} - 48 \]