80.4.4 problem 10

Internal problem ID [21221]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 4. Existence and uniqueness for systems and higher order. Excercise 4.3 at page 76
Problem number : 10
Date solved : Thursday, October 02, 2025 at 07:27:01 PM
CAS classification : [[_2nd_order, _missing_x]]

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

With initial conditions

\begin{align*} x \left (0\right )&=1 \\ x^{\prime }\left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.011 (sec). Leaf size: 8
ode:=diff(diff(x(t),t),t)+4*x(t) = 0; 
ic:=[x(0) = 1, D(x)(0) = 0]; 
dsolve([ode,op(ic)],x(t), singsol=all);
 
\[ x = \cos \left (2 t \right ) \]
Mathematica. Time used: 0.012 (sec). Leaf size: 9
ode=D[x[t],{t,2}]+4*x[t]==0; 
ic={x[0]==1,Derivative[1][x][0] ==0}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \cos (2 t) \end{align*}
Sympy. Time used: 0.033 (sec). Leaf size: 7
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(4*x(t) + Derivative(x(t), (t, 2)),0) 
ics = {x(0): 1, Subs(Derivative(x(t), t), t, 0): 0} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \cos {\left (2 t \right )} \]