86.11.7 problem 7 (a)

Internal problem ID [23201]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 9. The operational method. Exercise 9c at page 137
Problem number : 7 (a)
Date solved : Thursday, October 02, 2025 at 09:24:18 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

With initial conditions

\begin{align*} y \left (0\right )&=4 \\ y^{\prime }\left (0\right )&=-{\frac {25}{6}} \\ \end{align*}
Maple. Time used: 0.016 (sec). Leaf size: 25
ode:=diff(diff(y(x),x),x)-4*diff(y(x),x)+13*y(x) = exp(2*x)*sin(3*x); 
ic:=[y(0) = 4, D(y)(0) = -25/6]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\frac {{\mathrm e}^{2 x} \left (\left (x -24\right ) \cos \left (3 x \right )+24 \sin \left (3 x \right )\right )}{6} \]
Mathematica. Time used: 0.078 (sec). Leaf size: 29
ode=D[y[x],{x,2}]-4*D[y[x],x]+13*y[x]==Exp[2*x]*Sin[3*x]; 
ic={y[0]==4,Derivative[1][y][0] ==-25/6}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {1}{6} e^{2 x} (24 \sin (3 x)+(x-24) \cos (3 x)) \end{align*}
Sympy. Time used: 0.251 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(13*y(x) - exp(2*x)*sin(3*x) - 4*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {y(0): 4, Subs(Derivative(y(x), x), x, 0): -25/6} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (\left (4 - \frac {x}{6}\right ) \cos {\left (3 x \right )} - 4 \sin {\left (3 x \right )}\right ) e^{2 x} \]