29.9.8 problem 4, using elementary method

Internal problem ID [7378]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 12, Series Solutions of Differential Equations. Section 1. Miscellaneous problems. page 564
Problem number : 4, using elementary method
Date solved : Tuesday, September 30, 2025 at 04:30:04 PM
CAS classification : [[_2nd_order, _missing_x]]

\begin{align*} y^{\prime \prime }&=-4 y \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 17
ode:=diff(diff(y(x),x),x) = -4*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \sin \left (2 x \right )+c_2 \cos \left (2 x \right ) \]
Mathematica. Time used: 0.009 (sec). Leaf size: 20
ode=D[y[x],{x,2}]==-4*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 \cos (2 x)+c_2 \sin (2 x) \end{align*}
Sympy. Time used: 0.024 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \sin {\left (2 x \right )} + C_{2} \cos {\left (2 x \right )} \]