87.27.3 problem 6

Internal problem ID [23871]
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 : 6
Date solved : Thursday, October 02, 2025 at 09:46:06 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 (\frac {\pi }{2}\right )&=-1 \\ \end{align*}
Maple. Time used: 0.010 (sec). Leaf size: 13
ode:=diff(diff(y(x),x),x)+9*y(x) = 0; 
ic:=[y(0) = 1, y(1/2*Pi) = -1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \sin \left (3 x \right )+\cos \left (3 x \right ) \]
Mathematica. Time used: 0.007 (sec). Leaf size: 14
ode=D[y[x],{x,2}]+9*y[x]==0; 
ic={y[0]==1,y[Pi/2]==-1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \sin (3 x)+\cos (3 x) \end{align*}
Sympy. Time used: 0.043 (sec). Leaf size: 12
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/2): -1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \sin {\left (3 x \right )} + \cos {\left (3 x \right )} \]