csharpfftfsharpintegrationinterpolationlinear-algebramathdifferentiationmatrixnumericsrandomregressionstatisticsmathnet
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
378 lines
21 KiB
378 lines
21 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Special Functions
|
|
</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
<meta name="author" content="Christoph Ruegg, Marcus Cuda, Jurgen Van Gael">
|
|
|
|
<link rel="stylesheet" id="theme_link" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/4.6.0/materia/bootstrap.min.css">
|
|
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script>
|
|
|
|
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML"></script>
|
|
|
|
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
|
|
<link type="text/css" rel="stylesheet" href="https://numerics.mathdotnet.com/content/navbar-fixed-left.css" />
|
|
<link type="text/css" rel="stylesheet" href="https://numerics.mathdotnet.com/content/fsdocs-default.css" />
|
|
<link type="text/css" rel="stylesheet" href="https://numerics.mathdotnet.com/content/fsdocs-custom.css" />
|
|
<script type="text/javascript" src="https://numerics.mathdotnet.com/content/fsdocs-tips.js"></script>
|
|
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
|
<!--[if lt IE 9]>
|
|
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
|
<![endif]-->
|
|
<!-- BEGIN SEARCH BOX: this adds support for the search box -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/JavaScript-autoComplete/1.0.4/auto-complete.css" />
|
|
<!-- END SEARCH BOX: this adds support for the search box -->
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<nav class="navbar navbar-expand-md navbar-light bg-secondary fixed-left" id="fsdocs-nav">
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse navbar-nav-scroll" id="navbarsExampleDefault">
|
|
<a href="https://numerics.mathdotnet.com/"><img id="fsdocs-logo" src="/logo.png" /></a>
|
|
<!-- BEGIN SEARCH BOX: this adds support for the search box -->
|
|
<div id="header">
|
|
<div class="searchbox" id="fsdocs-searchbox">
|
|
<label for="search-by">
|
|
<i class="fas fa-search"></i>
|
|
</label>
|
|
<input data-search-input="" id="search-by" type="search" placeholder="Search..." />
|
|
<span data-search-clear="">
|
|
<i class="fas fa-times"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<!-- END SEARCH BOX: this adds support for the search box -->
|
|
<ul class="navbar-nav">
|
|
<li class="nav-header">Math.NET Numerics</li>
|
|
<li class="nav-item"><a class="nav-link" href="Packages.html">NuGet & Binaries</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="ReleaseNotes.html">Release Notes</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="https://github.com/mathnet/mathnet-numerics/blob/master/LICENSE.md">MIT License</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="Compatibility.html">Platform Support</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="https://numerics.mathdotnet.com/api/">Class Reference</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="https://github.com/mathnet/mathnet-numerics/issues">Issues & Bugs</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="Users.html">Who is using Math.NET?</a></li>
|
|
|
|
<li class="nav-header">Contributing</li>
|
|
<li class="nav-item"><a class="nav-link" href="Contributors.html">Contributors</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="Contributing.html">Contributing</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="Build.html">Build & Tools</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="https://github.com/mathnet/mathnet-numerics/discussions/categories/ideas">Your Ideas</a></li>
|
|
|
|
<li class="nav-header">Getting Help</li>
|
|
<li class="nav-item"><a class="nav-link" href="https://discuss.mathdotnet.com/c/numerics">Discuss</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="https://stackoverflow.com/questions/tagged/mathdotnet">Stack Overflow</a></li>
|
|
|
|
<li class="nav-header">Getting Started</li>
|
|
<l class="nav-item"i><a class="nav-link" href="/">Getting started</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="Constants.html">Constants</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="Matrix.html">Matrices and Vectors</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="Euclid.html">Euclid & Number Theory</a></li>
|
|
<li class="nav-item">Combinatorics</li>
|
|
|
|
<li class="nav-header">Evaluation</li>
|
|
<li class="nav-item"><a class="nav-link" href="Functions.html">Special Functions</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="Integration.html">Integration</a></li>
|
|
|
|
<li class="nav-header">Statistics/Probability</li>
|
|
<li class="nav-item"><a class="nav-link" href="DescriptiveStatistics.html">Descriptive Statistics</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="Probability.html">Probability Distributions</a></li>
|
|
|
|
<li class="nav-header">Generation</li>
|
|
<li class="nav-item"><a class="nav-link" href="Generate.html">Generating Data</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="Random.html">Random Numbers</a></li>
|
|
|
|
<li class="nav-header">Solving Equations</li>
|
|
<li class="nav-item"><a class="nav-link" href="LinearEquations.html">Linear Equation Systems</a></li>
|
|
|
|
<li class="nav-header">Optimization</li>
|
|
<li class="nav-item"><a class="nav-link" href="Distance.html">Distance Metrics</a></li>
|
|
|
|
<li class="nav-header">Curve Fitting</li>
|
|
<li class="nav-item"><a class="nav-link" href="Regression.html">Regression</a></li>
|
|
|
|
<li class="nav-header">Native Providers</li>
|
|
<li class="nav-item"><a class="nav-link" href="MKL.html">Intel MKL</a></li>
|
|
|
|
<li class="nav-header">Working Together</li>
|
|
<li class="nav-item"><a class="nav-link" href="CSV.html">Delimited Text Files (CSV)</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="MatrixMarket.html">NIST MatrixMarket</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="MatlabFiles.html">MATLAB</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="IFSharpNotebook.html">IF# Notebook</a></li>
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
<div class="container">
|
|
<div class="masthead">
|
|
<h3 class="muted">
|
|
<a href="https://numerics.mathdotnet.com">Math.NET Numerics</a> |
|
|
<a href="https://www.mathdotnet.com">Math.NET Project</a> |
|
|
<a href="https://github.com/mathnet/mathnet-numerics">GitHub</a>
|
|
</h3>
|
|
</div>
|
|
<hr />
|
|
<div class="container" id="fsdocs-content">
|
|
<h1><a name="Special-Functions" class="anchor" href="#Special-Functions">Special Functions</a></h1>
|
|
<p>All the following special functions are available in the static <code>SpecialFunctions</code> class:</p>
|
|
<h2><a name="Factorial" class="anchor" href="#Factorial">Factorial</a></h2>
|
|
<ul>
|
|
<li><code>Factorial(x)</code></li>
|
|
</ul>
|
|
<p><span class="math">\[x \mapsto x! = \prod_{k=1}^{x} k = \Gamma(x+1)\]</span></p>
|
|
<p>Code Sample:</p>
|
|
<table class="pre"><tr><td class="snippet"><pre class="fssnip highlighted"><code lang="csharp"><span class="k">double</span> x <span class="o">=</span> SpecialFunctions.Factorial(<span class="n">14</span>); <span class="c">// 87178291200.0</span>
|
|
<span class="k">double</span> y <span class="o">=</span> SpecialFunctions.Factorial(<span class="n">31</span>); <span class="c">// 8.2228386541779224E+33</span>
|
|
</code></pre></td></tr></table>
|
|
<ul>
|
|
<li><code>FactorialLn(x)</code></li>
|
|
</ul>
|
|
<p><span class="math">\[x \mapsto \ln x! = \ln\Gamma(x+1)\]</span></p>
|
|
<ul>
|
|
<li><code>Binomial(n,k)</code></li>
|
|
</ul>
|
|
<p>Binomial Coefficient</p>
|
|
<p><span class="math">\[\binom{n}{k} = \mathrm{C}_n^k = \frac{n!}{k! (n-k)!}\]</span></p>
|
|
<ul>
|
|
<li><code>BinomialLn(n,k)</code></li>
|
|
</ul>
|
|
<p><span class="math">\[\ln \binom{n}{k} = \ln n! - \ln k! - \ln(n-k)!\]</span></p>
|
|
<ul>
|
|
<li><code>Multinomial(n,k[])</code></li>
|
|
</ul>
|
|
<p>Multinomial Coefficient</p>
|
|
<p><span class="math">\[\binom{n}{k_1,k_2,\dots,k_r} = \frac{n!}{k_1! k_2! \cdots k_r!} = \frac{n!}{\prod_{i=1}^{r}k_i!}\]</span></p>
|
|
<h2><a name="Exponential-Integral" class="anchor" href="#Exponential-Integral">Exponential Integral</a></h2>
|
|
<ul>
|
|
<li><code>ExponentialIntegral(x,n)</code></li>
|
|
</ul>
|
|
<p>Generalized Exponential Integral</p>
|
|
<p><span class="math">\[E_n(x) = \int_1^\infty t^{-n} e^{-xt}\,\mathrm{d}t\]</span></p>
|
|
<h2><a name="Gamma-functions" class="anchor" href="#Gamma-functions">Gamma functions</a></h2>
|
|
<h4><a name="Gamma" class="anchor" href="#Gamma">Gamma</a></h4>
|
|
<ul>
|
|
<li><code>Gamma(a)</code></li>
|
|
</ul>
|
|
<p><span class="math">\[\Gamma(a) = \int_0^\infty t^{a-1} e^{-t}\,\mathrm{d}t\]</span></p>
|
|
<ul>
|
|
<li><code>GammaLn(a)</code></li>
|
|
</ul>
|
|
<p><span class="math">\[\ln\Gamma(a)\]</span></p>
|
|
<h4><a name="Incomplete-Gamma" class="anchor" href="#Incomplete-Gamma">Incomplete Gamma</a></h4>
|
|
<ul>
|
|
<li><code>GammaLowerIncomplete(a,x)</code></li>
|
|
</ul>
|
|
<p>Lower incomplete Gamma function, unregularized.</p>
|
|
<p><span class="math">\[\gamma(a,x) = \int_0^x t^{a-1} e^{-t}\,\mathrm{d}t\]</span></p>
|
|
<ul>
|
|
<li><code>GammaUpperIncomplete(a,x)</code></li>
|
|
</ul>
|
|
<p>Upper incomplete Gamma function, unregularized.</p>
|
|
<p><span class="math">\[\Gamma(a,x) = \int_x^\infty t^{a-1} e^{-t}\,\mathrm{d}t\]</span></p>
|
|
<h4><a name="Regularized-Gamma" class="anchor" href="#Regularized-Gamma">Regularized Gamma</a></h4>
|
|
<ul>
|
|
<li><code>GammaLowerRegularized(a,x)</code></li>
|
|
</ul>
|
|
<p>Lower regularized incomplete Gamma function.</p>
|
|
<p><span class="math">\[\mathrm{P}(a,x) = \frac{\gamma(a,x)}{\Gamma(a)}\]</span></p>
|
|
<ul>
|
|
<li><code>GammaUpperRegularized(a,x)</code></li>
|
|
</ul>
|
|
<p>Upper regularized incomplete Gamma function.</p>
|
|
<p><span class="math">\[\mathrm{Q}(a,x) = \frac{\Gamma(a,x)}{\Gamma(a)}\]</span></p>
|
|
<ul>
|
|
<li><code>GammaLowerRegularizedInv(a, y)</code></li>
|
|
</ul>
|
|
<p>Inverse <span class="math">\(x\)</span> of the lower regularized Gamma function, such that <span class="math">\(\mathrm{P}(a,x) = y\)</span>.</p>
|
|
<p><span class="math">\[\mathrm{P}^{-1}(a,y)\]</span></p>
|
|
<h4><a name="Psi-Derivative-of-Logarithmic-Gamma" class="anchor" href="#Psi-Derivative-of-Logarithmic-Gamma">Psi: Derivative of Logarithmic Gamma</a></h4>
|
|
<ul>
|
|
<li><code>DiGamma(x)</code></li>
|
|
</ul>
|
|
<p><span class="math">\[\psi(x) = \frac{\mathrm{d}}{\mathrm{d}x}\ln\Gamma(x)\]</span></p>
|
|
<ul>
|
|
<li><code>DiGammaInv(p)</code></li>
|
|
</ul>
|
|
<p>Inverse <span class="math">\(x\)</span> of the DiGamma function, such that <span class="math">\(\psi(x) = p\)</span>.</p>
|
|
<p><span class="math">\[\psi^{-1}(p)\]</span></p>
|
|
<h2><a name="Euler-Beta-functions" class="anchor" href="#Euler-Beta-functions">Euler Beta functions</a></h2>
|
|
<h4><a name="Euler-Beta" class="anchor" href="#Euler-Beta">Euler Beta</a></h4>
|
|
<ul>
|
|
<li><code>Beta(a,b)</code></li>
|
|
</ul>
|
|
<p><span class="math">\[\mathrm{B}(a,b) = \int_0^1 t^{a-1} (1-t)^{b-1}\,\mathrm{d}t = \frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}\]</span></p>
|
|
<ul>
|
|
<li><code>BetaLn(a,b)</code></li>
|
|
</ul>
|
|
<p><span class="math">\[\ln\mathrm{B}(a,b) = \ln\Gamma(a) + \ln\Gamma(b) - \ln\Gamma(a+b)\]</span></p>
|
|
<h4><a name="Incomplete-Beta" class="anchor" href="#Incomplete-Beta">Incomplete Beta</a></h4>
|
|
<ul>
|
|
<li><code>BetaIncomplete(a,b,x)</code></li>
|
|
</ul>
|
|
<p>Lower incomplete Beta function (unregularized).</p>
|
|
<p><span class="math">\[\mathrm{B}_x(a,b) = \int_0^x t^{a-1} (1-t)^{b-1}\,\mathrm{d}t\]</span></p>
|
|
<h4><a name="Regularized-Beta" class="anchor" href="#Regularized-Beta">Regularized Beta</a></h4>
|
|
<ul>
|
|
<li><code>BetaRegularized(a,b,x)</code></li>
|
|
</ul>
|
|
<p>Lower incomplete regularized Beta function.</p>
|
|
<p><span class="math">\[\mathrm{I}_x(a,b) = \frac{\mathrm{B}(a,b,x)}{\mathrm{B}(a,b)}\]</span></p>
|
|
<h2><a name="Error-functions" class="anchor" href="#Error-functions">Error functions</a></h2>
|
|
<h4><a name="Error-Function" class="anchor" href="#Error-Function">Error Function</a></h4>
|
|
<ul>
|
|
<li><code>Erf(x)</code></li>
|
|
</ul>
|
|
<p><span class="math">\[\mathrm{erf}(x) = \frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2}\,\mathrm{d}t\]</span></p>
|
|
<ul>
|
|
<li><code>ErfInv(z)</code></li>
|
|
</ul>
|
|
<p>Inverse <span class="math">\(x\)</span> of the Error function, such that <span class="math">\(\mathrm{erf}(x) = z\)</span>.</p>
|
|
<p><span class="math">\[z \mapsto \mathrm{erf}^{-1}(z)\]</span></p>
|
|
<h4><a name="Complementary-Error-function" class="anchor" href="#Complementary-Error-function">Complementary Error function.</a></h4>
|
|
<ul>
|
|
<li><code>Erfc(x)</code></li>
|
|
</ul>
|
|
<p><span class="math">\[\mathrm{erfc}(x) = 1-\mathrm{erf}(x) = \frac{2}{\sqrt{\pi}}\int_x^\infty e^{-t^2}\,\mathrm{d}t\]</span></p>
|
|
<ul>
|
|
<li><code>ErfcInv(z)</code></li>
|
|
</ul>
|
|
<p>Inverse <span class="math">\(x\)</span> of the complementary Error function, such that <span class="math">\(\mathrm{erfc}(x) = z\)</span>.</p>
|
|
<p><span class="math">\[z \mapsto \mathrm{erfc}^{-1}(z)\]</span></p>
|
|
<p>Code Sample:</p>
|
|
<table class="pre"><tr><td class="snippet"><pre class="fssnip highlighted"><code lang="csharp"><span class="k">double</span> erf <span class="o">=</span> SpecialFunctions.Erf(<span class="n">0.9</span>); <span class="c">// 0.7969082124</span>
|
|
</code></pre></td></tr></table>
|
|
<h2><a name="Sigmoid-Logistic-function" class="anchor" href="#Sigmoid-Logistic-function">Sigmoid: Logistic function</a></h2>
|
|
<ul>
|
|
<li><code>Logistic(x)</code></li>
|
|
</ul>
|
|
<p><span class="math">\[x \mapsto \frac{1}{1+e^{-x}}\]</span></p>
|
|
<ul>
|
|
<li><code>Logit(y)</code></li>
|
|
</ul>
|
|
<p>Inverse of the Logistic function, for <span class="math">\(y\)</span> between 0 and 1 (where the function is real-valued).</p>
|
|
<p><span class="math">\[y \mapsto \ln \frac{y}{1-y}\]</span></p>
|
|
<h2><a name="Harmonic-Numbers" class="anchor" href="#Harmonic-Numbers">Harmonic Numbers</a></h2>
|
|
<ul>
|
|
<li><code>Harmonic(t)</code></li>
|
|
</ul>
|
|
<p>The n-th Harmonic number is the sum of the reciprocals of the first n natural numbers.
|
|
With <span class="math">\(\gamma\)</span> as the Euler-Mascheroni constant and the DiGamma function:</p>
|
|
<p><span class="math">\[\mathrm{H}_n = \sum_{k=1}^{n}\frac{1}{k} = \gamma - \psi(n+1)\]</span></p>
|
|
<ul>
|
|
<li><code>GeneralHarmonic(n, m)</code></li>
|
|
</ul>
|
|
<p>Generalized harmonic number of order n of m.</p>
|
|
<p><span class="math">\[\mathrm{H}_{n,m} = \sum_{k=1}^{n}\frac{1}{k^m}\]</span></p>
|
|
<h2><a name="Bessel-and-Struve-Functions" class="anchor" href="#Bessel-and-Struve-Functions">Bessel and Struve Functions</a></h2>
|
|
<h4><a name="Bessel-functions" class="anchor" href="#Bessel-functions">Bessel functions</a></h4>
|
|
<p>Bessel functions are canonical solutions <span class="math">\(y(x)\)</span> of Bessel's differential equation</p>
|
|
<p><span class="math">\[x^2\frac{\mathrm{d}^2y}{\mathrm{d}x^2}+x\frac{\mathrm{d}y}{\mathrm{d}x}+(x^2-\alpha^2)y = 0\]</span></p>
|
|
<h4><a name="Modified-Bessel-functions" class="anchor" href="#Modified-Bessel-functions">Modified Bessel functions</a></h4>
|
|
<p>Modified Bessel's equation:</p>
|
|
<p><span class="math">\[x^2\frac{\mathrm{d}^2y}{\mathrm{d}x^2}+x\frac{\mathrm{d}y}{\mathrm{d}x}-(x^2+\alpha^2)y = 0\]</span></p>
|
|
<p>Modified Bessel functions:</p>
|
|
<p><span class="math">\[\begin{align}
|
|
\mathrm{I}_\alpha(x) &= \imath^{-\alpha}\mathrm{J}_\alpha(\imath x) = \sum_{m=0}^\infty \frac{1}{m!\Gamma(m+\alpha+1)}\left(\frac{x}{2}\right)^{2m+\alpha} \\
|
|
\mathrm{K}_\alpha(x) &= \frac{\pi}{2} \frac{\mathrm{I}_{-\alpha}(x)-\mathrm{I}_\alpha(x)}{\sin(\alpha\pi)}
|
|
\end{align}\]</span></p>
|
|
<ul>
|
|
<li><code>BesselI0(x)</code></li>
|
|
</ul>
|
|
<p>Modified or hyperbolic Bessel function of the first kind, order 0.</p>
|
|
<p><span class="math">\[x \mapsto \mathrm{I}_0(x)\]</span></p>
|
|
<ul>
|
|
<li><code>BesselI1(x)</code></li>
|
|
</ul>
|
|
<p>Modified or hyperbolic Bessel function of the first kind, order 1.</p>
|
|
<p><span class="math">\[x \mapsto \mathrm{I}_1(x)\]</span></p>
|
|
<ul>
|
|
<li><code>BesselK0(x)</code></li>
|
|
</ul>
|
|
<p>Modified or hyperbolic Bessel function of the second kind, order 0.</p>
|
|
<p><span class="math">\[x \mapsto \mathrm{K}_0(x)\]</span></p>
|
|
<ul>
|
|
<li><code>BesselK0e(x)</code></li>
|
|
</ul>
|
|
<p>Exponentionally scaled modified Bessel function of the second kind, order 0.</p>
|
|
<p><span class="math">\[x \mapsto e^x\mathrm{K}_0(x)\]</span></p>
|
|
<ul>
|
|
<li><code>BesselK1(x)</code></li>
|
|
</ul>
|
|
<p>Modified or hyperbolic Bessel function of the second kind, order 1.</p>
|
|
<p><span class="math">\[x \mapsto \mathrm{K}_1(x)\]</span></p>
|
|
<ul>
|
|
<li><code>BesselK1e(x)</code></li>
|
|
</ul>
|
|
<p>Exponentially scaled modified Bessel function of the second kind, order 1.</p>
|
|
<p><span class="math">\[x \mapsto e^x\mathrm{K}_1(x)\]</span></p>
|
|
<h4><a name="Struve-functions" class="anchor" href="#Struve-functions">Struve functions</a></h4>
|
|
<p>Struve functions are solutions <span class="math">\(y(x)\)</span> of the non-homogeneous Bessel's differential equation</p>
|
|
<p><span class="math">\[x^2\frac{\mathrm{d}^2y}{\mathrm{d}x^2}+x\frac{\mathrm{d}y}{\mathrm{d}x}+(x^2-\alpha^2)y = \frac{4(\frac{x}{2})^{\alpha+1}}{\sqrt{\pi}\Gamma(\alpha+\frac{1}{2})}\]</span></p>
|
|
<h4><a name="Modified-Struve-functions" class="anchor" href="#Modified-Struve-functions">Modified Struve functions</a></h4>
|
|
<p>Modified equation:</p>
|
|
<p><span class="math">\[x^2\frac{\mathrm{d}^2y}{\mathrm{d}x^2}+x\frac{\mathrm{d}y}{\mathrm{d}x}-(x^2+\alpha^2)y = \frac{4(\frac{x}{2})^{\alpha+1}}{\sqrt{\pi}\Gamma(\alpha+\frac{1}{2})}\]</span></p>
|
|
<p>Modified Struve functions:</p>
|
|
<p><span class="math">\[\mathrm{L}_\alpha(x) = \left(\frac{x}{2}\right)^{\alpha+1}\sum_{k=0}^\infty \frac{1}{\Gamma(\frac{3}{2}+k)\Gamma(\frac{3}{2}+k+\alpha)}\left(\frac{x}{2}\right)^{2k}\]</span></p>
|
|
<ul>
|
|
<li><code>StruveL0(x)</code></li>
|
|
</ul>
|
|
<p>Modified Struve function of order 0.</p>
|
|
<p><span class="math">\[x \mapsto \mathrm{L}_0(x)\]</span></p>
|
|
<ul>
|
|
<li><code>StruveL1(x)</code></li>
|
|
</ul>
|
|
<p>Modified Struve function of order 1.</p>
|
|
<p><span class="math">\[x \mapsto \mathrm{L}_1(x)\]</span></p>
|
|
<h4><a name="Misc" class="anchor" href="#Misc">Misc</a></h4>
|
|
<ul>
|
|
<li><code>BesselI0MStruveL0(x)</code></li>
|
|
</ul>
|
|
<p>Difference between the Bessel <span class="math">\(I_0\)</span> and the Struve <span class="math">\(L_0\)</span> functions.</p>
|
|
<p><span class="math">\[x \mapsto I_0(x) - L_0(x)\]</span></p>
|
|
<ul>
|
|
<li><code>BesselI1MStruveL1(x)</code></li>
|
|
</ul>
|
|
<p>Difference between the Bessel <span class="math">\(I_1\)</span> and the Struve <span class="math">\(L_1\)</span> functions.</p>
|
|
<p><span class="math">\[x \mapsto I_1(x) - L_1(x)\]</span></p>
|
|
<h2><a name="Numeric-Stability" class="anchor" href="#Numeric-Stability">Numeric Stability</a></h2>
|
|
<ul>
|
|
<li><code>ExponentialMinusOne(power)</code></li>
|
|
</ul>
|
|
<p><span class="math">\(\exp x-1\)</span> is a typical case where a subtraction can be fatal for accuracy.
|
|
For example, at <span class="math">\(10^{-13}\)</span> the naive expression is 0.08% off, at <span class="math">\(10^{-15}\)</span>
|
|
roughly 11% and at <span class="math">\(10^{-18}\)</span> it just returns 0.</p>
|
|
<p><span class="math">\[x \mapsto e^x - 1\]</span></p>
|
|
<ul>
|
|
<li><code>Hypotenuse(a, b)</code></li>
|
|
</ul>
|
|
<p><span class="math">\[(a,b) \mapsto \sqrt{a^2 + b^2}\]</span></p>
|
|
<h2><a name="Trigonometry" class="anchor" href="#Trigonometry">Trigonometry</a></h2>
|
|
<p>The <code>Trig</code> class provides the complete set of fundamental trigonometric functions
|
|
for both real and complex arguments.</p>
|
|
<ul>
|
|
<li><strong>Trigonometric</strong>: Sin, Cos, Tan, Cot, Sec, Csc</li>
|
|
<li><strong>Trigonometric Inverse</strong>: Asin, Acos, Atan, Acot, Asec, Acsc</li>
|
|
<li><strong>Hyperbolic</strong>: Sinh, Cosh, Tanh, Coth, Sech, Csch</li>
|
|
<li><strong>Hyperbolic Area</strong>: Asinh, Acosh, Atanh, Acoth, Asech, Acsch</li>
|
|
<li><strong>Sinc</strong>: Normalized sinc function <span class="math">\(x \mapsto \frac{\sin\pi x}{\pi x}\)</span></li>
|
|
<li>Conversion routines between radian, degree and grad.</li>
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
<!-- BEGIN SEARCH BOX: this adds support for the search box -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/JavaScript-autoComplete/1.0.4/auto-complete.css" />
|
|
<script type="text/javascript">var fsdocs_search_baseurl = 'https://numerics.mathdotnet.com/';</script>
|
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lunr.js/2.3.8/lunr.min.js"></script>
|
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/JavaScript-autoComplete/1.0.4/auto-complete.min.js"></script>
|
|
<script type="text/javascript" src="https://numerics.mathdotnet.com/content/fsdocs-search.js"></script>
|
|
<!-- END SEARCH BOX: this adds support for the search box -->
|
|
</div>
|
|
</body>
|
|
|
|
</html>
|
|
|