82.30.1 problem Ex. 1

Internal problem ID [18806]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter VI. Linear equations with constant coefficients. problems at page 77
Problem number : Ex. 1
Date solved : Thursday, March 13, 2025 at 12:59:22 PM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }+y^{\prime \prime }-y^{\prime }-y&=\cos \left (2 x \right ) \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 31
ode:=diff(diff(diff(y(x),x),x),x)+diff(diff(y(x),x),x)-diff(y(x),x)-y(x) = cos(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \left (c_3 x +c_{2} \right ) {\mathrm e}^{-x}+{\mathrm e}^{x} c_{1} -\frac {\cos \left (2 x \right )}{25}-\frac {2 \sin \left (2 x \right )}{25} \]
Mathematica. Time used: 0.119 (sec). Leaf size: 43
ode=D[y[x],{x,3}]+D[y[x],{x,2}]-D[y[x],x]-y[x]==Cos[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {2}{25} \sin (2 x)-\frac {1}{25} \cos (2 x)+e^{-x} \left (c_2 x+c_3 e^{2 x}+c_1\right ) \]
Sympy. Time used: 0.258 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x) - cos(2*x) - Derivative(y(x), x) + Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{3} e^{x} + \left (C_{1} + C_{2} x\right ) e^{- x} - \frac {2 \sin {\left (2 x \right )}}{25} - \frac {\cos {\left (2 x \right )}}{25} \]