49.23.4 problem 1(d)

Internal problem ID [7762]
Book : An introduction to Ordinary Differential Equations. Earl A. Coddington. Dover. NY 1961
Section : Chapter 6. Existence and uniqueness of solutions to systems and nth order equations. Page 238
Problem number : 1(d)
Date solved : Sunday, March 30, 2025 at 12:22:54 PM
CAS classification : [[_2nd_order, _missing_x]]

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

Maple. Time used: 0.004 (sec). Leaf size: 17
ode:=diff(diff(y(x),x),x)+k^2*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \sin \left (k x \right )+c_2 \cos \left (k x \right ) \]
Mathematica. Time used: 0.015 (sec). Leaf size: 20
ode=D[y[x],{x,2}]+k^2*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_1 \cos (k x)+c_2 \sin (k x) \]
Sympy. Time used: 0.079 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
k = symbols("k") 
y = Function("y") 
ode = Eq(k**2*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- i k x} + C_{2} e^{i k x} \]