10.11.1 problem 28

Internal problem ID [1355]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Chapter 3, Second order linear equations, 3.7 Mechanical and Electrical Vibrations. page 203
Problem number : 28
Date solved : Saturday, March 29, 2025 at 10:53:09 PM
CAS classification : [[_2nd_order, _missing_x]]

\begin{align*} u^{\prime \prime }+2 u&=0 \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 21
ode:=diff(diff(u(t),t),t)+2*u(t) = 0; 
dsolve(ode,u(t), singsol=all);
 
\[ u = c_1 \sin \left (\sqrt {2}\, t \right )+c_2 \cos \left (\sqrt {2}\, t \right ) \]
Mathematica. Time used: 0.016 (sec). Leaf size: 28
ode=D[u[t],{t,2}]+2*u[t] ==0; 
ic={}; 
DSolve[{ode,ic},u[t],t,IncludeSingularSolutions->True]
 
\[ u(t)\to c_1 \cos \left (\sqrt {2} t\right )+c_2 \sin \left (\sqrt {2} t\right ) \]
Sympy. Time used: 0.054 (sec). Leaf size: 22
from sympy import * 
t = symbols("t") 
u = Function("u") 
ode = Eq(2*u(t) + Derivative(u(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=u(t),ics=ics)
 
\[ u{\left (t \right )} = C_{1} \sin {\left (\sqrt {2} t \right )} + C_{2} \cos {\left (\sqrt {2} t \right )} \]