87.27.1 problem 1

Internal problem ID [23869]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 6. Boundary value problems. Exercise at page 262
Problem number : 1
Date solved : Thursday, October 02, 2025 at 09:46:03 PM
CAS classification : [[_2nd_order, _missing_x]]

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

With initial conditions

\begin{align*} y \left (0\right )&=1 \\ y \left (\pi \right )&=-1 \\ \end{align*}
Maple. Time used: 0.020 (sec). Leaf size: 15
ode:=diff(diff(y(x),x),x)+9*y(x) = 0; 
ic:=[y(0) = 1, y(Pi) = -1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = c_1 \sin \left (3 x \right )+\cos \left (3 x \right ) \]
Mathematica. Time used: 0.037 (sec). Leaf size: 17
ode=D[y[x],{x,2}]+9*y[x]==0; 
ic={y[0]==1,y[Pi]==-1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \cos (3 x)+c_2 \sin (3 x) \end{align*}
Sympy. Time used: 0.041 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(9*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {y(0): 1, y(pi): -1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \sin {\left (3 x \right )} + \cos {\left (3 x \right )} \]