bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / special / _mathieu / mathieu_cem
ufunc_wrapper
scipy.special._mathieu:mathieu_cem
source: build-install/usr/lib/python3.14/site-packages/scipy/special/_mathieu.py
Signature
def mathieu_cem(m, q, x, out = None)Summary
Even Mathieu function and its derivative.
Extended Summary
Returns the even Mathieu function, ce_m(x, q), of order m and parameter q evaluated at x (given in degrees). Also returns the derivative with respect to x of ce_m(x, q)
Parameters
m: array_likeOrder of the function
q: array_likeParameter of the function
x: array_likeArgument of the function, given in degrees, not radians
out: tuple of ndarray, optionalOptional output arrays for the function results
Returns
y: scalar or ndarrayValue of the function
yp: scalar or ndarrayValue of the derivative vs x
Notes
The even Mathieu functions are the solutions to Mathieu's differential equation
for which the characteristic number (calculated with mathieu_a) results in an even, periodic solution with period 180 degrees (for even ) or 360 degrees (for odd ).
Examples
Plot even Mathieu functions of orders ``2`` and ``4``.import numpy as np from scipy import special import matplotlib.pyplot as plt m = np.asarray([2, 4]) q = 50 x = np.linspace(-180, 180, 300)[:, np.newaxis] y, _ = special.mathieu_cem(m, q, x)✓
plt.plot(x, y) plt.xlabel('x (degrees)') plt.ylabel('y') plt.legend(('m = 2', 'm = 4'))✗
<matplotlib.legend.Legend object at 0x7f3f5917fe00>Because the orders ``2`` and ``4`` are even, the period of each function is 180 degrees.
See also
Aliases
scipy.special.mathieu_cem