The Gamma function is an extension of the factorial function to complex and real numbers. It is defined by a definite integral:
Γ(n) = ∫0∞ e-x xn-1 dx (for n > 0)
The Beta function is a related function defined by a different integral:
B(m, n) = ∫01 xm-1 (1-x)n-1 dx (for m > 0, n > 0)
Γ(n+1) = n Γ(n)
Γ(n+1) = n!(e.g., Γ(4) = 3! = 6; Γ(1) = 0! = 1)
B(m, n) = B(n, m)
B(m, n) = 2 ∫0π/2 (sinθ)2m-1 (cosθ)2n-1 dθ
This is the key identity that connects the two functions and allows for the easy evaluation of many integrals.
B(m, n) = [ Γ(m) Γ(n) ] / Γ(m+n)
We can use the relation `B(m, n) = [ Γ(m) Γ(n) ] / Γ(m+n)` and the trigonometric form of the Beta function to solve a very common class of definite integrals.
We know:
∫0π/2 (sinθ)p (cosθ)q dθ = (1/2) * B( (p+1)/2, (q+1)/2 )
...by comparing `p = 2m-1` and `q = 2n-1`.
Combining these, we get the W_all_is Integral Formula:
∫0π/2 (sinθ)p (cosθ)q dθ = [ Γ((p+1)/2) * Γ((q+1)/2) ] / [ 2 * Γ((p+q+2)/2) ]
These techniques are used to find the approximate value of a definite integral `I = ∫[a, b] f(x) dx` when `f(x)` is too difficult or impossible to integrate analytically. The method is to divide the interval `[a, b]` into `n` equal subintervals of width `h`.
h = (b - a) / n
Let `y₀ = f(x₀)`, `y₁ = f(x₁)`, ..., `yₙ = f(xₙ)`, where `x₀ = a` and `xₙ = b`.
This method approximates the area under the curve in each subinterval as a trapezoid.
I ≈ (h/2) [ (y₀ + yₙ) + 2(y₁ + y₂ + ... + yn-1) ]
In words: (h/2) * [ (first + last ordinates) + 2 * (sum of all other ordinates) ]
This method is more accurate. It approximates the function over two intervals at a time using a parabola. It requires `n` to be an even number.
I ≈ (h/3) [ (y₀ + yₙ) + 4(y₁ + y₃ + y₅ + ...) + 2(y₂ + y₄ + y₆ + ...) ]
In words: (h/3) * [ (first + last) + 4*(sum of odd ordinates) + 2*(sum of even ordinates) ]
This method approximates the function over three intervals at a time using a cubic. It requires `n` to be a multiple of 3.
I ≈ (3h/8) [ (y₀ + yₙ) + 3(y₁ + y₂ + y₄ + y₅ + ...) + 2(y₃ + y₆ + y₉ + ...) ]
In words: (3h/8) * [ (first + last) + 3*(sum of non-multiple-of-3 ordinates) + 2*(sum of multiple-of-3 ordinates) ]
(Note: The syllabus has a typo "Solution of linear equations...". Bisection and Newton-Raphson are for non-linear equations of the form `f(x) = 0`.)
This is a "bracketing" method that is slow but guaranteed to work.
This is an "open" method that is much faster but can sometimes fail to converge. It uses the tangent line to approximate the root.
xn+1 = xn - f(xn) / f'(xn)
Interpolation is the process of estimating the value of a function `y` at a point `x` that lies between known data points `(x₀, y₀), (x₁, y₁), ...`.
These formulas are for equally spaced data, where `h = x₁ - x₀ = x₂ - x₁`.
This formula is used to interpolate values of `y` near the beginning of the dataset (near `x₀`).
It uses a forward difference table.
            
First difference: Δy₀ = y₁ - y₀
            
Second difference: Δ²y₀ = Δy₁ - Δy₀
            
...and so on.
        
The formula is:
y(x) = y₀ + p Δy₀ + [p(p-1)/2!] Δ²y₀ + [p(p-1)(p-2)/3!] Δ³y₀ + ...
where p = (x - x₀) / h. (`x` is the point you are interpolating at).
This formula is used to interpolate values of `y` near the end of the dataset (near `xₙ`).
It uses a backward difference table.
            
First difference: ∇yₙ = yₙ - yn-1
            
Second difference: ∇²yₙ = ∇yₙ - ∇yn-1
            
...and so on.
        
The formula is:
y(x) = yₙ + p ∇yₙ + [p(p+1)/2!] ∇²yₙ + [p(p+1)(p+2)/3!] ∇³yₙ + ...
where p = (x - xₙ) / h. (Note the different definition of `p`!)