LaTeX Test

We interpolate points\{(x_k,f_k)\} by polynomial
$latex
P_{N-1}(x)=\sum_{j=0}^{N-1}{a_jx^j}
$

Its coefficients \{a_j\} are found as a solution of system of linear equations:
$latex
\left\{ P_{N-1}(x_k) = f_k\right\},\quad k=-\frac{N-1}{2},\dots,\frac{N-1}{2}
$

Code example:

def fib(n):
    if n == 0:
        return 0
    elif n == 1:
        return 1
    else:
        return fib(n-1) + fib(n-2)

Leave a comment

Your email address will not be published. Required fields are marked *