23.5.137 problem 137

Internal problem ID [6746]
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 : 137
Date solved : Tuesday, September 30, 2025 at 03:51:21 PM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

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