34.11.8 problem 33

Internal problem ID [8029]
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 : 33
Date solved : Tuesday, September 30, 2025 at 05:14:25 PM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }+y^{\prime \prime }+y^{\prime }+y&={\mathrm e}^{x}+{\mathrm e}^{-x}+\sin \left (x \right ) \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 46
ode:=diff(diff(diff(y(x),x),x),x)+diff(diff(y(x),x),x)+diff(y(x),x)+y(x) = exp(x)+exp(-x)+sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (2 x +4 c_3 +2\right ) {\mathrm e}^{-x}}{4}+\frac {\left (4 c_2 -x +1\right ) \sin \left (x \right )}{4}+\frac {\left (-x +4 c_1 \right ) \cos \left (x \right )}{4}+\frac {{\mathrm e}^{x}}{4} \]
Mathematica. Time used: 0.108 (sec). Leaf size: 146
ode=D[y[x],{x,3}]+D[y[x],{x,2}]+D[y[x],x]+y[x]==Exp[x]+Exp[-x]+Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \cos (x) \int _1^x-\frac {1}{2} e^{-K[1]} (\cos (K[1])+\sin (K[1])) \left (e^{K[1]} \sin (K[1])+e^{2 K[1]}+1\right )dK[1]+\sin (x) \int _1^x\frac {1}{2} e^{-K[2]} (\cos (K[2])-\sin (K[2])) \left (e^{K[2]} \sin (K[2])+e^{2 K[2]}+1\right )dK[2]+e^{-x} \left (\int _1^x\frac {1}{2} \left (e^{K[3]} \sin (K[3])+e^{2 K[3]}+1\right )dK[3]+c_1 e^x \cos (x)+c_2 e^x \sin (x)+c_3\right ) \end{align*}
Sympy. Time used: 0.198 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) - exp(x) - sin(x) + Derivative(y(x), x) + Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)) - exp(-x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} - \frac {x}{4}\right ) \sin {\left (x \right )} + \left (C_{2} - \frac {x}{4}\right ) \cos {\left (x \right )} + \left (C_{3} + \frac {x}{2}\right ) e^{- x} + \frac {e^{x}}{4} \]