steinerberger


steinerberger, an Octave code which evaluates the Steinerberger functions f(n,x), which are continuous but have derivative discontinuities, are hard to accurately plot, interpolate, integrate, and minimize. Plots are made of several of the functions.

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

steinerberger is available in a C version and a C++ version and a Fortran77 version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.

Related Data and Programs:

steinerberger_test

dirichlet, an Octave code which evaluates the Dirichlet kernel function, sometimes called the periodic sinc function. The function includes a parameter n, normally taken to be an integer. The function is defined by diric(x,n)=sin(0.5*n*x)/n/sin(0.5*x). Sample plots of these functions are made.

fresnel, an Octave code which evaluates the Fresnel cosine and sine integrals.

gaussian, an Octave code which evaluates the Gaussian function for arbitrary mu and sigma, its antiderivative, and derivatives of arbitrary order.

humps, an Octave code which evaluates the humps() function, its first and second derivatives, and its antiderivative. The functions are plotted.

lagrange, an Octave code which evaluates any Lagrange basis polynomial L(i)(x), its antiderivative, or its first or second derivatives. Sample plots are made.

runge, an Octave code which evaluates the Runge() function, its first and second derivatives, and its antiderivative. This function causes a breakdown for polynomial interpolation over equally spaced nodes in [-1,+1]. The functions are plotted using gnuplot().

sigmoid, an Octave code which evaluates the sigmoid function s(x)=1/(1+exp(-x)) or its derivatives of any order. The test code creates graphic images.

sinc, an Octave code which evaluates the sinc() function, its first and second derivative and its antiderivative. The normalized function is defined by sincn=sin(pi*x)/(pi*x), the unnormalized function is sincu=sin(x)/x. Plots of these functions are made.

Reference:

  1. John D Cook,
    Pushing numerical integration software to its limits,
    https://www.johndcook.com/blog/2023/06/12/stressing-numerical-integration/
    Posted 12 June 2023.
  2. John D Cook,
    Plotting a function with lots of local minima,
    https://www.johndcook.com/blog/2023/06/12/lots-of-local-minima/
    Posted 12 June 2023.
  3. Stefan Steinerberger,
    A amusing sequence of functions,
    Mathematics Magazine,
    Volume 91, Number 4, October 2018, pages 262-266.

Source Code:


Last modified on 17 June 2024.