15.11.17 problem 17

Internal problem ID [3127]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 19, page 86
Problem number : 17
Date solved : Sunday, March 30, 2025 at 01:19:04 AM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

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

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