56.27.9 problem Ex 9

Internal problem ID [14228]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter VII, Linear differential equations with constant coefficients. Article 50. Method of undetermined coefficients. Page 107
Problem number : Ex 9
Date solved : Thursday, October 02, 2025 at 09:26:55 AM
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.005 (sec). Leaf size: 33
ode:=diff(diff(diff(diff(y(x),x),x),x),x)+2*diff(diff(y(x),x),x)+y(x) = cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (8 c_3 x -x^{2}+8 c_1 +2\right ) \cos \left (x \right )}{8}+\sin \left (x \right ) \left (\left (c_4 +\frac {3}{8}\right ) x +c_2 \right ) \]
Mathematica. Time used: 0.045 (sec). Leaf size: 43
ode=D[y[x],{x,4}]+2*D[y[x],{x,2}]+y[x]==Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \left (-\frac {x^2}{8}+c_2 x+\frac {5}{16}+c_1\right ) \cos (x)+\frac {1}{4} (x+4 c_4 x+4 c_3) \sin (x) \end{align*}
Sympy. Time used: 0.093 (sec). Leaf size: 22
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 ) \sin {\left (x \right )} + \left (C_{3} + x \left (C_{4} - \frac {x}{8}\right )\right ) \cos {\left (x \right )} \]