56.27.6 problem Ex 6

Internal problem ID [14225]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter VII, Linear differential equations with constant coefficients. Article 50. Method of undetermined coefficients. Page 107
Problem number : Ex 6
Date solved : Thursday, October 02, 2025 at 09:26:54 AM
CAS classification : [[_3rd_order, _missing_y]]

\begin{align*} -3 y^{\prime }-2 y^{\prime \prime }+y^{\prime \prime \prime }&=3 x^{2}+\sin \left (x \right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 41
ode:=diff(diff(diff(y(x),x),x),x)-2*diff(diff(y(x),x),x)-3*diff(y(x),x) = 3*x^2+sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {x^{3}}{3}+\frac {2 x^{2}}{3}-{\mathrm e}^{-x} c_1 +\frac {{\mathrm e}^{3 x} c_2}{3}+\frac {\sin \left (x \right )}{10}+\frac {\cos \left (x \right )}{5}-\frac {14 x}{9}+c_3 \]
Mathematica. Time used: 0.275 (sec). Leaf size: 58
ode=D[y[x],{x,3}]-2*D[y[x],{x,2}]-3*D[y[x],x]==3*x^2+Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{9} \left (-3 x^3+6 x^2-14 x-9 c_1 e^{-x}+3 c_2 e^{3 x}+9 c_3\right )+\frac {\sin (x)}{10}+\frac {\cos (x)}{5} \end{align*}
Sympy. Time used: 0.170 (sec). Leaf size: 42
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-3*x**2 - sin(x) - 3*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} + C_{2} e^{- x} + C_{3} e^{3 x} - \frac {x^{3}}{3} + \frac {2 x^{2}}{3} - \frac {14 x}{9} + \frac {\sin {\left (x \right )}}{10} + \frac {\cos {\left (x \right )}}{5} \]