23.5.7 problem 7

Internal problem ID [6616]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 5. THE EQUATION IS LINEAR AND OF ORDER GREATER THAN TWO, page 410
Problem number : 7
Date solved : Tuesday, September 30, 2025 at 03:50:16 PM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }&={\mathrm e}^{x} x +\cos \left (x \right )^{2}+y \end{align*}
Maple. Time used: 0.010 (sec). Leaf size: 61
ode:=diff(diff(diff(y(x),x),x),x) = x*exp(x)+cos(x)^2+y(x); 
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: 1.894 (sec). Leaf size: 98
ode=D[y[x],{x,3}] == E^x*x + Cos[x]^2 + y[x]; 
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.538 (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} \]