77.15.4 problem 4

Internal problem ID [20474]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter III. Ordinary linear differential equations with constant coefficients. Exercise III (G) at page 45
Problem number : 4
Date solved : Thursday, October 02, 2025 at 06:03:13 PM
CAS classification : [[_3rd_order, _missing_y]]

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