44.2.8 problem 8

Internal problem ID [6940]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 1. Introduction to differential equations. Section 1.2 Initial value problems. Exercises 1.2 at page 19
Problem number : 8
Date solved : Wednesday, March 05, 2025 at 02:53:47 AM
CAS classification : [[_2nd_order, _missing_x]]

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

With initial conditions

\begin{align*} x \left (\frac {\pi }{2}\right )&=0\\ x^{\prime }\left (\frac {\pi }{2}\right )&=1 \end{align*}

Maple. Time used: 0.007 (sec). Leaf size: 8
ode:=diff(diff(x(t),t),t)+x(t) = 0; 
ic:=x(1/2*Pi) = 0, D(x)(1/2*Pi) = 1; 
dsolve([ode,ic],x(t), singsol=all);
 
\[ x \left (t \right ) = -\cos \left (t \right ) \]
Mathematica. Time used: 0.011 (sec). Leaf size: 9
ode=D[x[t],{t,2}]+x[t]==0; 
ic={x[Pi/2]==0,Derivative[1][x][Pi/2] == 1}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to -\cos (t) \]
Sympy. Time used: 0.087 (sec). Leaf size: 7
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(x(t) + Derivative(x(t), (t, 2)),0) 
ics = {x(pi/2): 0, Subs(Derivative(x(t), t), t, pi/2): 1} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = - \cos {\left (t \right )} \]