spectral.fourier_diff_matrix_on_interval#

spectral.fourier_diff_matrix_on_interval(N: int, a: float = -2.0, b: float = 2.0, representation: str = 'real') ndarray[source]#

Fourier differentiation matrix rescaled to periodic interval \([a, b]\).

Parameters:
Nint

Number of grid points

afloat, optional

Left endpoint (default: -2.0)

bfloat, optional

Right endpoint (default: 2.0)

representation{“real”, “complex”}, optional

Choose between the real-valued cotangent form or the complex-valued DFT form. Default is “real”.

Returns:
np.ndarray

Rescaled Fourier differentiation matrix of shape (N, N)