14.21.15 problem 15

Internal problem ID [2724]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 2. Second order differential equations. Section 2.15, Higher order equations. Excercises page 263
Problem number : 15
Date solved : Tuesday, March 04, 2025 at 02:40:23 PM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime \prime }+2 y^{\prime \prime }+y&=t^{2} \sin \left (t \right ) \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 46
ode:=diff(diff(diff(diff(y(t),t),t),t),t)+2*diff(diff(y(t),t),t)+y(t) = t^2*sin(t); 
dsolve(ode,y(t), singsol=all);
 
\[ y = \frac {\left (-t^{4}+48 c_4 t +9 t^{2}+48 c_2 -12\right ) \sin \left (t \right )}{48}-\frac {\cos \left (t \right ) \left (t^{3}+\left (-12 c_3 -3\right ) t -12 c_1 \right )}{12} \]
Mathematica. Time used: 0.149 (sec). Leaf size: 54
ode=D[y[t],{t,4}]+2*D[y[t],{t,2}]+y[t]==t^2*Sin[t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \left (-\frac {t^3}{12}+\left (\frac {1}{4}+c_2\right ) t+c_1\right ) \cos (t)+\frac {1}{96} \left (-2 t^4+18 t^2+96 c_4 t-15+96 c_3\right ) \sin (t) \]
Sympy. Time used: 0.288 (sec). Leaf size: 34
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-t**2*sin(t) + y(t) + 2*Derivative(y(t), (t, 2)) + Derivative(y(t), (t, 4)),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (C_{1} + t \left (C_{2} - \frac {t^{2}}{12}\right )\right ) \cos {\left (t \right )} + \left (C_{3} + t \left (C_{4} - \frac {t^{3}}{48} + \frac {3 t}{16}\right )\right ) \sin {\left (t \right )} \]