Haversine
Haversine[z]
gives the haversine function .
Details
- Mathematical function, suitable for both symbolic and numerical manipulation.
- The haversine function is defined by .
- The argument of haversine is assumed to be in radians. (Multiply by Degree to convert from degrees.)
- Haversine[z] is the entire function of z with no branch cut discontinuities.
- Haversine can be evaluated to arbitrary numerical precision.
- Haversine automatically threads over lists. »
- Haversine can be used with Interval and CenteredInterval objects. »
Examples
open allclose allBasic Examples (4)
Scope (39)
Numerical Evaluation (6)
The precision of the output tracks the precision of the input:
Evaluate efficiently at high precision:
Compute the elementwise values of an array using automatic threading:
Or compute the matrix Haversine function using MatrixFunction:
Haversine can be used with Interval and CenteredInterval objects:
Or compute average-case statistical intervals using Around:
Specific Values (3)
Visualization (3)
Plot the Haversine function:
Plot the real part of Haversine(z):
Function Properties (13)
Haversine is defined for all real and complex values:
Haversine achieves all values between zero and one, inclusive, on the reals:
The range for complex values is the whole plane:
Haversine is periodic with period :
Expand using ComplexExpand assuming real variables x and y:
Haversine has the mirror property :
Haversine is an analytic function:
Haversine is neither non-decreasing nor non-increasing:
Haversine is not injective:
Haversine is not surjective:
Haversine is non-negative:
Haversine has no singularities or discontinuities:
Haversine is neither convex nor concave:
TraditionalForm formatting:
Differentiation (3)
Integration (3)
Compute the indefinite integral using Integrate:
Series Expansions (4)
Find the Taylor expansion using Series:
Plots of the first three approximations around :
The general term in the series expansion using SeriesCoefficient:
The first-order Fourier series:
This happens to be the complete series:
The Taylor expansion at a generic point:
Haversine can be applied to a power series:
Applications (1)
Distance between two points on a sphere:
Distance between two cities in kilometers (assuming spherical Earth):
Find the distance between the North Pole and the nearest city to it, using the defined function with Haversine:
Properties & Relations (2)
Derivative of haversine function:
Integral of haversine function:
Use FunctionExpand to expand Haversine in terms of standard trigonometric functions:
Text
Wolfram Research (2008), Haversine, Wolfram Language function, https://reference.wolfram.com/language/ref/Haversine.html.
CMS
Wolfram Language. 2008. "Haversine." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Haversine.html.
APA
Wolfram Language. (2008). Haversine. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Haversine.html