23.5.2 problem 2

Internal problem ID [6611]
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 : 2
Date solved : Tuesday, September 30, 2025 at 03:50:13 PM
CAS classification : [[_3rd_order, _quadrature]]

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