23.5.12 problem 12

Internal problem ID [6621]
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 : 12
Date solved : Tuesday, September 30, 2025 at 03:50:18 PM
CAS classification : [[_3rd_order, _missing_y]]

\begin{align*} y^{\prime }+y^{\prime \prime \prime }&=x^{3}+\cos \left (x \right ) \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 33
ode:=diff(y(x),x)+diff(diff(diff(y(x),x),x),x) = x^3+cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (-x -2 c_2 \right ) \cos \left (x \right )}{2}+\left (1+c_1 \right ) \sin \left (x \right )+\frac {x^{4}}{4}-3 x^{2}+c_3 \]
Mathematica. Time used: 0.105 (sec). Leaf size: 39
ode=D[y[x],x] + D[y[x],{x,3}] == x^3 + Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x^4}{4}-3 x^2-\frac {1}{2} (x+2 c_2) \cos (x)+(1+c_1) \sin (x)+c_3 \end{align*}
Sympy. Time used: 0.116 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 - cos(x) + Derivative(y(x), x) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{3} \sin {\left (x \right )} + \frac {x^{4}}{4} - 3 x^{2} + \left (C_{2} - \frac {x}{2}\right ) \cos {\left (x \right )} \]