74.19.5 problem 5

Internal problem ID [16556]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 5. Applications of Higher Order Equations. Exercises 5.1, page 232
Problem number : 5
Date solved : Monday, March 31, 2025 at 02:57:24 PM
CAS classification : [[_2nd_order, _missing_x]]

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

With initial conditions

\begin{align*} x \left (0\right )&=3\\ x^{\prime }\left (0\right )&=-4 \end{align*}

Maple. Time used: 0.050 (sec). Leaf size: 13
ode:=diff(diff(x(t),t),t)+x(t) = 0; 
ic:=x(0) = 3, D(x)(0) = -4; 
dsolve([ode,ic],x(t), singsol=all);
 
\[ x = -4 \sin \left (t \right )+3 \cos \left (t \right ) \]
Mathematica. Time used: 0.013 (sec). Leaf size: 14
ode=D[x[t],{t,2}]+x[t]==0; 
ic={x[0]==3,Derivative[1][x][0 ]==-4}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to 3 \cos (t)-4 \sin (t) \]
Sympy. Time used: 0.054 (sec). Leaf size: 12
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(x(t) + Derivative(x(t), (t, 2)),0) 
ics = {x(0): 3, Subs(Derivative(x(t), t), t, 0): -4} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = - 4 \sin {\left (t \right )} + 3 \cos {\left (t \right )} \]