15.14.29 problem 31

Internal problem ID [3201]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 23, page 106
Problem number : 31
Date solved : Sunday, March 30, 2025 at 01:21:04 AM
CAS classification : [[_3rd_order, _missing_y]]

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

Maple. Time used: 0.002 (sec). Leaf size: 40
ode:=diff(diff(diff(y(x),x),x),x)+4*diff(diff(y(x),x),x)+5*diff(y(x),x) = exp(-2*x)*cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (\left (-5 x -20 c_1 -10 c_2 -4\right ) \cos \left (x \right )-10 \left (x -c_1 +2 c_2 +\frac {3}{10}\right ) \sin \left (x \right )\right ) {\mathrm e}^{-2 x}}{50}+c_3 \]
Mathematica. Time used: 0.272 (sec). Leaf size: 52
ode=D[y[x],{x,3}]+4*D[y[x],{x,2}]+5*D[y[x],x]==Exp[-2*x]*Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{50} e^{-2 x} (2 (-5 x+1-10 c_1+5 c_2) \sin (x)-(5 x+14+10 c_1+20 c_2) \cos (x))+c_3 \]
Sympy. Time used: 0.428 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(5*Derivative(y(x), x) + 4*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)) - exp(-2*x)*cos(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + \left (\left (C_{2} - \frac {x}{5}\right ) \sin {\left (x \right )} + \left (C_{3} - \frac {x}{10}\right ) \cos {\left (x \right )}\right ) e^{- 2 x} \]