80.5.18 problem B 18

Internal problem ID [21239]
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 5. Second order equations. Excercise 5.9 at page 119
Problem number : B 18
Date solved : Thursday, October 02, 2025 at 07:27:12 PM
CAS classification : [[_2nd_order, _missing_x]]

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

With initial conditions

\begin{align*} x \left (0\right )&=0 \\ x \left (\pi \right )&=0 \\ \end{align*}
Maple. Time used: 0.011 (sec). Leaf size: 5
ode:=diff(diff(x(t),t),t)+lambda^2*x(t) = 0; 
ic:=[x(0) = 0, x(Pi) = 0]; 
dsolve([ode,op(ic)],x(t), singsol=all);
 
\[ x = 0 \]
Mathematica. Time used: 0.002 (sec). Leaf size: 36
ode=D[x[t],{t,2}]+\[Lambda]^2*x[t]==0; 
ic={x[0]==0,x[Pi]==0}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \begin {array}{cc} \{ & \begin {array}{cc} c_1 \sin \left (t \sqrt {\lambda ^2}\right ) & \unicode {f80d}\in \mathbb {Z}\land \unicode {f80d}\geq 1\land \lambda ^2=\unicode {f80d}^2 \\ 0 & \text {True} \\ \end {array} \\ \end {array} \end{align*}
Sympy. Time used: 0.053 (sec). Leaf size: 3
from sympy import * 
t = symbols("t") 
lambda_ = symbols("lambda_") 
x = Function("x") 
ode = Eq(lambda_**2*x(t) + Derivative(x(t), (t, 2)),0) 
ics = {x(0): 0, x(pi): 0} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = 0 \]