40.11.5 problem 30

Internal problem ID [6739]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 16. Linear equations with constant coefficients (Short methods). Supplemetary problems. Page 107
Problem number : 30
Date solved : Sunday, March 30, 2025 at 11:21:04 AM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.007 (sec). Leaf size: 45
ode:=diff(diff(diff(y(x),x),x),x)+y(x) = cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_2 \,{\mathrm e}^{\frac {x}{2}} \cos \left (\frac {\sqrt {3}\, x}{2}\right )+c_3 \,{\mathrm e}^{\frac {x}{2}} \sin \left (\frac {\sqrt {3}\, x}{2}\right )+c_1 \,{\mathrm e}^{-x}-\frac {\sin \left (x \right )}{2}+\frac {\cos \left (x \right )}{2} \]
Mathematica. Time used: 0.443 (sec). Leaf size: 68
ode=D[y[x],{x,3}]+y[x]==Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {\sin (x)}{2}+\frac {\cos (x)}{2}+c_1 e^{-x}+c_3 e^{x/2} \cos \left (\frac {\sqrt {3} x}{2}\right )+c_2 e^{x/2} \sin \left (\frac {\sqrt {3} x}{2}\right ) \]
Sympy. Time used: 0.179 (sec). Leaf size: 46
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) - cos(x) + 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} \sin {\left (\frac {\sqrt {3} x}{2} \right )} + C_{2} \cos {\left (\frac {\sqrt {3} x}{2} \right )}\right ) e^{\frac {x}{2}} - \frac {\sin {\left (x \right )}}{2} + \frac {\cos {\left (x \right )}}{2} \]