65.11.3 problem 3

Internal problem ID [15799]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 4. N-th Order Linear Differential Equations. Exercises 4.4, page 218
Problem number : 3
Date solved : Thursday, October 02, 2025 at 10:28:09 AM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

\begin{align*} y+2 y^{\prime \prime }+y^{\prime \prime \prime \prime }&=3+\cos \left (2 x \right ) \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 28
ode:=diff(diff(diff(diff(y(x),x),x),x),x)+2*diff(diff(y(x),x),x)+y(x) = 3+cos(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = 3+\frac {\cos \left (2 x \right )}{9}+\left (c_3 x +c_1 \right ) \cos \left (x \right )+\left (c_4 x +c_2 \right ) \sin \left (x \right ) \]
Mathematica. Time used: 0.149 (sec). Leaf size: 135
ode=D[y[x],{x,4}]+2*D[y[x],{x,2}]+y[x]==3+Cos[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \sin (x) \int _1^x\frac {1}{2} (\cos (2 K[2])+3) (\cos (K[2])+K[2] \sin (K[2]))dK[2]+x \sin (x) \int _1^x-\frac {1}{2} (\cos (2 K[3])+3) \sin (K[3])dK[3]+\cos (x) \int _1^x\frac {1}{2} (\cos (2 K[1])+3) (\cos (K[1]) K[1]-\sin (K[1]))dK[1]+\frac {1}{3} x \sin ^3(x) \cos (x)-2 x \sin (x) \cos (x)+c_1 \cos (x)+c_2 x \cos (x)+c_3 \sin (x)+c_4 x \sin (x) \end{align*}
Sympy. Time used: 0.069 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) - cos(2*x) + 2*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 4)) - 3,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} + C_{4} x\right ) \cos {\left (x \right )} + \frac {\cos {\left (2 x \right )}}{9} + 3 \]