56.29.13 problem Ex 15

Internal problem ID [14245]
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 15
Date solved : Thursday, October 02, 2025 at 09:27:07 AM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }-y&=x \,{\mathrm e}^{x}+\cos \left (x \right )^{2} \end{align*}
Maple. Time used: 0.011 (sec). Leaf size: 61
ode:=diff(diff(diff(y(x),x),x),x)-y(x) = x*exp(x)+cos(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {1}{2}+c_2 \,{\mathrm e}^{-\frac {x}{2}} \cos \left (\frac {\sqrt {3}\, x}{2}\right )+c_3 \,{\mathrm e}^{-\frac {x}{2}} \sin \left (\frac {\sqrt {3}\, x}{2}\right )-\frac {\cos \left (2 x \right )}{130}-\frac {4 \sin \left (2 x \right )}{65}+\frac {\left (3 x^{2}+18 c_1 -6 x +4\right ) {\mathrm e}^{x}}{18} \]
Mathematica. Time used: 2.343 (sec). Leaf size: 98
ode=D[y[x],{x,3}]-y[x]==x*Exp[x]+Cos[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {e^x x^2}{6}-\frac {e^x x}{3}+\frac {2 e^x}{9}-\frac {4}{65} \sin (2 x)-\frac {1}{130} \cos (2 x)+c_1 e^x+c_2 e^{-x/2} \cos \left (\frac {\sqrt {3} x}{2}\right )+c_3 e^{-x/2} \sin \left (\frac {\sqrt {3} x}{2}\right )-\frac {1}{2} \end{align*}
Sympy. Time used: 7.663 (sec). Leaf size: 63
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*exp(x) - y(x) - cos(x)**2 + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} \sin {\left (\frac {\sqrt {3} x}{2} \right )} + C_{2} \cos {\left (\frac {\sqrt {3} x}{2} \right )}\right ) e^{- \frac {x}{2}} + \left (C_{3} + \frac {x^{2}}{6} - \frac {x}{3}\right ) e^{x} - \frac {4 \sin {\left (2 x \right )}}{65} - \frac {\cos {\left (2 x \right )}}{130} - \frac {1}{2} \]