You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here the $B_n$ is the $n$th [Bernoulli number](https://en.wikipedia.org/wiki/Bernoulli_number), and $$E_n$$ is the $$n$$-th [Euler number](https://en.wikipedia.org/wiki/Euler_number).
112
+
Here the $$B_n$$ is the $$n$$th [Bernoulli number](https://en.wikipedia.org/wiki/Bernoulli_number), and $$E_n$$ is the $$n$$-th [Euler number](https://en.wikipedia.org/wiki/Euler_number).
113
113
The figure below shows the relationship between these trigonometric functions. This figure is inspired by a [wiki post](https://zh.wikipedia.org/wiki/%E5%8F%8C%E6%9B%B2%E5%87%BD%E6%95%B0).
114
114
These functions also have corresponding inverse functions: `asin`, `acos`, `atan`, `acot`, `asec`, `acsc`. For example, if $$\sin(a) = b$$, then $$\textrm{asin}(b) = a$$.
115
115
@@ -205,7 +205,7 @@ Bessel functions, first defined by the mathematician Daniel Bernoulli and then g
205
205
206
206
$$x^2y''+xy'+(x^2 - \alpha^2)y = 0.$$
207
207
208
-
The complex number $\alpha$ is called the "order" of the bessel function.
208
+
The complex number $$\alpha$$ is called the "order" of the bessel function.
209
209
Bessel functions are important for many problems in studying the wave propagation and static potentials, such as electromagnetic waves in a cylindrical waveguide.
210
210
In solving cylindrical coordinate systems, Bessel functions of integer order or half integer order are often used.
211
211
@@ -263,7 +263,7 @@ There are twelve Jacobi elliptic functions and `ellipj` we include here in Owl r
263
263
On the other hand, the *Elliptic integrals* are initially used to find the perimeters of ellipses.
264
264
A Elliptic integral function can be expressed in the form of:
265
265
$$f(x)=\int_c^xR(t, \sqrt(P(t)))dt,$$
266
-
where $R$ is a rational function of its two arguments, $$P$$ is a polynomial of degree 3 or 4 with no repeated roots, and $$c$$ is a constant.
266
+
where $$R$$ is a rational function of its two arguments, $$P$$ is a polynomial of degree 3 or 4 with no repeated roots, and $$c$$ is a constant.
267
267
An elliptic integral can be categorised as "complete" or "incomplete".
268
268
The former one is function of a single argument, while the latter contains two arguments.
269
269
Each elliptic integral can be transformed so that it contains integrals of rational functions and the three Legendre canonical forms, according to which the elliptic can be categorised into the first, second, and third kind.
@@ -296,7 +296,7 @@ For a positive integer n, the *Gamma function* is the factorial function:
296
296
297
297
$$\Gamma(n) = (n-1)!$$
298
298
299
-
For a complex numbers $z$ with a positive real part, the Gamma function is defined as:
299
+
For a complex numbers $$z$$ with a positive real part, the Gamma function is defined as:
When $q$ is set to 1, this function is reduced to the *Riemann zeta function*.
408
+
When $$q$$ is set to 1, this function is reduced to the *Riemann zeta function*.
409
409
The function `zetac x` returns Riemann zeta function minus 1.
410
410
The zeta function is often used to analyse the dynamic systems.
411
411
Besides, the Riemann zeta function plays an important role in number theory and is widely applied in quantum physics, probability theory, and applied statistics, etc.
@@ -502,7 +502,7 @@ The factorial function, together with several of its variants, are contained in
`log_doublefact n` |Logarithm of double factorial function
@@ -517,7 +517,7 @@ The factorial functions accepts integer as input, for example:
517
517
The factorials are applied in many areas of mathematics, most notably the combinatorics.
518
518
The permutation and combination are both defined in factorials.
519
519
The permutation function returns the number $$n!/(n-k)!$$ of ordered subsets of length $$k$$, taken from a set of $$n$$ elements.
520
-
The combination function returns the number $${n\choose k} = n!/(k!(n-k)!)$$ of subsets of $$k$$ elements of a set of $n$ elements.
520
+
The combination function returns the number $${n\choose k} = n!/(k!(n-k)!)$$ of subsets of $$k$$ elements of a set of $$n$$ elements.
521
521
The table below provides the combinatorics functions you can use in the `Math` module.
522
522
523
523
Function Explanation
@@ -566,7 +566,7 @@ val x : float array = [|2.; 3.; 4.; 5.; 6.|]
566
566
```
567
567
568
568
Now we can define the interpolation function `f` that accepts one float number and returns another float number.
569
-
Also we convert the given data $x$ and $y$ into matrix format for plotting purpose.
569
+
Also we convert the given data $$x$$ and $$y$$ into matrix format for plotting purpose.
570
570
571
571
```ocaml
572
572
let f a =
@@ -596,7 +596,7 @@ let _ =
596
596
## Integration
597
597
598
598
We have introduced some special integral functions, but we still need general integration methods that work for any input functions.
599
-
Given a function $f$ that accepts a real variable and an interval $$[a, b]$$ of the real line, the integral of this function
599
+
Given a function $$f$$ that accepts a real variable and an interval $$[a, b]$$ of the real line, the integral of this function
600
600
601
601
$$\int_a^bf(x)dx$$
602
602
@@ -618,11 +618,11 @@ Using numerical methods (or *quadrature*) to do integration dates back to the in
618
618
The basic idea is to use summation of small areas to approximate that of an integration.
619
619
There exist a lot of algorithms to do numerical integration, and using the trapezoial rule is one of them.
620
620
621
-
This classical method divides `a` to `b` into $N$ equally spaced abscissas: $$x_0, x_1, \ldots, x_N$$. Each area between $$x_i$$ and $$x_j$$ is seen as an "Trapezoid" and the area formula is computed as:
621
+
This classical method divides `a` to `b` into $$N$$ equally spaced abscissas: $$x_0, x_1, \ldots, x_N$$. Each area between $$x_i$$ and $$x_j$$ is seen as an "Trapezoid" and the area formula is computed as:
Here the error term $O(h^3f'')$ indicated that the error of approximation is related with that of abscissas size $h$ and second order derivative of the original function.
625
+
Here the error term $$O(h^3f'')$$ indicated that the error of approximation is related with that of abscissas size $$h$$ and second order derivative of the original function.
626
626
The function `trapz` implements this method. It's interface is:
627
627
628
628
```
@@ -667,7 +667,7 @@ This function is deterministic for all numbers representable by an int. It is im
667
667
```
668
668
669
669
Another number theory related idea is the *Fermat's factorization*, which represents an odd integer as the difference of two squares: $$N = a^2 - b^2$$, and therefore `N` can be factorised as $$(a+b)(a-b)$$.
670
-
The function `fermat_fact` performs Fermat factorisation over odd number `N`, i.e. into two roughly equal factors $x$ and $y$ so that $$N=x\times~y$$.
670
+
The function `fermat_fact` performs Fermat factorisation over odd number `N`, i.e. into two roughly equal factors $$x$$ and $$y$$ so that $$N=x\times~y$$.
0 commit comments