## Sunday, November 28, 2021

### [znqttiii] non-polynomials

here are some subjectively interesting functions that are not polynomials, accompanied with a range over which the function does not do anything weird (no singularities).

motivation was to test numerical integration.  many quadrature schemes are exact for low-degree polynomials (future post), so we avoid polynomials.

we give the functions in Mathematica syntax for convenience of integration, followed by notes.  some integrals Mathematica cannot do.  all of these can be evaluated quickly to high precision by some way other than numerical integration, sometimes a special function, given in notes.

do some quadrature schemes work poorly if the first derivative is infinite (i.e., function is vertical) at an endpoint?

Integrate[Exp[-x^2/2]/Sqrt[2*Pi],{x,0,2}] : standard normal distribution, Erf, inflection at 1

Integrate[Sin[x],{x,0,Pi}] : integrating sine over a much larger range would even more strongly avoid polynomiality

Integrate[Cos[x],{x,0,Pi/2}]

Integrate[Cos[n*tau-x*Sin[tau]]/Pi,{tau,0,Pi}] : BesselJ[n,x], limits fixed, let n=1 x=10

Integrate[x^x,{x,0,1}] : sophomore's dream, limits fixed, defined as limit at 0, vertical at 0

Integrate[x^-x,{x,0,1}] : sophomore's dream, limits fixed, defined as limit at 0, vertical at 0

Integrate[Sqrt[x],{x,0,1}] : vertical at 0

Integrate[x^((1+Sqrt[5])/2-1),{x,0,1}] : vertical at 0, exponent is golden ratio

Integrate[Log[x],{x,1,E}]

Integrate[1/x,{x,1,E}]

Integrate[Exp[x],{x,0,1}]

Integrate[Exp[x]/x,{x,1/4,2}] : exponential integral

Integrate[Exp[-1/x],{x,0,1}] : exponential integral, defined as limit at 0, flat at zero

Integrate[1/Log[x],{x,0,1/2}] : logarithmic integral, defined as limit at 0

Integrate[Sqrt[1-x^2],{x,-1,1}] : semicircle area, vertical at endpoints

Integrate[Sqrt[1/(1-x^2)],{x,-1/2,1/2}] : 1/6 circle perimeter, we avoid integrating from -1 and 1 because function is undefined at endpoints

Integrate[1/(1+x^2),{x,0,1}] : atan(1) = pi/4

Integrate[Sqrt[1-k^2*Sin[x]^2], {x,0,Pi/2}] : complete elliptic integral of the second kind, arithmetic-geometric mean, limits fixed, ellipse perimeter, let k=255/256, we have used trigonometric form to avoid the function being undefined at endpoints

Integrate[1/Sqrt[1-k^2*Sin[x]^2], {x,0,Pi/2}] : complete elliptic integral of the first kind, limits fixed, let k=15/16, arithmetic-geometric mean, we have used trigonometric form to avoid the function being undefined at endpoints

Integrate[x^a*(1-x)^b, {x,0,1}] : beta function, limits fixed, let a=1/3 b=1/3, vertical at endpoints

future work: rescale, compute Taylor expansions around the midpoint of the interval.