62.29.3 problem Ex 3

Internal problem ID [12883]
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 : Monday, March 31, 2025 at 07:23:33 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+2 y^{\prime }+y&=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.438 (sec). Leaf size: 77
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]
 
\[ y(x)\to e^{-x} \left (\int _1^x\left (e^{4 K[1]} K[1]^2-2 e^{K[1]} K[1]^4\right )dK[1]+x \int _1^x\left (2 e^{K[2]} K[2]^3-e^{4 K[2]} K[2]\right )dK[2]+c_2 x+c_1\right ) \]
Sympy. Time used: 0.267 (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 \]