20.12.6 problem Problem 21

Internal problem ID [3800]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.10, Chapter review. page 575
Problem number : Problem 21
Date solved : Tuesday, March 04, 2025 at 05:16:56 PM
CAS classification : [[_3rd_order, _missing_y]]

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

Maple. Time used: 0.003 (sec). Leaf size: 48
ode:=diff(diff(diff(y(x),x),x),x)-6*diff(diff(y(x),x),x)+25*diff(y(x),x) = sin(4*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {\left (\left (3 c_{1} -4 c_{2} \right ) \cos \left (4 x \right )+4 \left (c_{1} +\frac {3 c_{2}}{4}\right ) \sin \left (4 x \right )\right ) {\mathrm e}^{3 x}}{25}+c_3 -\frac {\cos \left (4 x \right )}{292}+\frac {2 \sin \left (4 x \right )}{219} \]
Mathematica. Time used: 0.699 (sec). Leaf size: 60
ode=D[y[x],{x,3}]-6*D[y[x],{x,2}]+25*D[y[x],x]==Sin[4*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {\left (25+292 (4 c_1-3 c_2) e^{3 x}\right ) \cos (4 x)}{7300}+\frac {\left (50+219 (3 c_1+4 c_2) e^{3 x}\right ) \sin (4 x)}{5475}+c_3 \]
Sympy. Time used: 0.263 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sin(4*x) + 25*Derivative(y(x), x) - 6*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + \left (C_{2} \sin {\left (4 x \right )} + C_{3} \cos {\left (4 x \right )}\right ) e^{3 x} + \frac {2 \sin {\left (4 x \right )}}{219} - \frac {\cos {\left (4 x \right )}}{292} \]