65.7.13 problem 14.3

Internal problem ID [13698]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 14, Inhomogeneous second order linear equations. Exercises page 140
Problem number : 14.3
Date solved : Wednesday, March 05, 2025 at 10:13:06 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{\prime \prime }+4 x&=289 t \,{\mathrm e}^{t} \sin \left (2 t \right ) \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 36
ode:=diff(diff(x(t),t),t)+4*x(t) = 289*t*exp(t)*sin(2*t); 
dsolve(ode,x(t), singsol=all);
 
\[ x \left (t \right ) = \left (\left (-68 t +76\right ) {\mathrm e}^{t}+c_{1} \right ) \cos \left (2 t \right )+17 \sin \left (2 t \right ) \left ({\mathrm e}^{t} \left (t -\frac {2}{17}\right )+\frac {c_{2}}{17}\right ) \]
Mathematica. Time used: 0.024 (sec). Leaf size: 40
ode=D[x[t],{t,2}]+4*x[t]==289*t*Exp[t]*Sin[2*t]; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to \left (e^t (76-68 t)+c_1\right ) \cos (2 t)+\left (e^t (17 t-2)+c_2\right ) \sin (2 t) \]
Sympy. Time used: 0.166 (sec). Leaf size: 39
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-289*t*exp(t)*sin(2*t) + 4*x(t) + Derivative(x(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \left (C_{1} - 68 t e^{t} + 76 e^{t}\right ) \cos {\left (2 t \right )} + \left (C_{2} + 17 t e^{t} - 2 e^{t}\right ) \sin {\left (2 t \right )} \]