44.16.2 problem 2

Internal problem ID [9356]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 2. Problems for Review and Discovery. Problems for Discussion and Exploration. Page 105
Problem number : 2
Date solved : Tuesday, September 30, 2025 at 06:16:54 PM
CAS classification : [[_2nd_order, _missing_x]]

\begin{align*} y^{\prime \prime }&=-3 y \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=-1 \\ \end{align*}
Maple. Time used: 0.072 (sec). Leaf size: 21
ode:=diff(diff(y(x),x),x) = -3*y(x); 
ic:=[y(0) = -1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = c_1 \sin \left (\sqrt {3}\, x \right )-\cos \left (\sqrt {3}\, x \right ) \]
Mathematica. Time used: 0.011 (sec). Leaf size: 27
ode=D[y[x],{x,2}]==-3*y[x]; 
ic={y[0]==-1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\cos \left (\sqrt {3} x\right )+c_2 \sin \left (\sqrt {3} x\right ) \end{align*}
Sympy. Time used: 0.030 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(3*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {y(0): -1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \sin {\left (\sqrt {3} x \right )} - \cos {\left (\sqrt {3} x \right )} \]