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
@@ -164,17 +164,28 @@ given $n+1$ data points $(x_1, y_1)$ up to $(x_{n+1}, y_{n+1})$
164
164
we want to find a $n$-th degree polynomial
165
165
```math
166
166
\tag{3}
167
-
p_n(x) = \sum_{j=0}^n c_j x^j,
167
+
p_n(x) = \sum_{\textcolor{red}{j=0}}^n c_j x^j,
168
168
```
169
169
which is an interpolating function,
170
170
i.e. satisfies $p_n(x_i) = y_i$
171
171
for all $i = 1, \ldots, n + 1$.
172
-
The fundamential theorem of algebra
173
-
ensures that such a polynomial of degree $n$,
172
+
Fundamental results from algebra
173
+
ensure that such a polynomial of degree $n$,
174
174
which goes through all $n+1$ data points can always be found.
175
175
Moreover this polynomial (thus its coefficients $c_j$)
176
176
is uniquely defined by the data.
177
+
"""
178
+
179
+
# ╔═╡ 20a76496-f1a0-4690-8522-a13cf4656e6d
180
+
md"""
181
+
!!! danger "Indexing conventions: Starting at $0$ or $1$"
182
+
Note that in the definition of the polynomial (Equation (3)) the sum starts now from $j=0$ whereas in equation (1) it started from $j=1$.
183
+
184
+
When discussing numerical methods (such as here interpolations) it is sometimes more convenient to start indexing from $0$ and sometimes to start from $1$. Please be aware of this and read sums in this notebook carefully. Occasionally we use color to highlight the start of a sum explicitly.
185
+
"""
177
186
187
+
# ╔═╡ 17e97fad-6290-4ef6-9124-c9a816346564
188
+
md"""
178
189
To find this polynomial a
179
190
natural idea is thus to employ the monomials $1, x, x^2, \ldots x^n$
180
191
directly as the basis for our interpolation:
@@ -192,15 +203,15 @@ leads to the linear system in the $n+1$ unknowns $c_0, c_1, \ldots, c_n$
where the $(n+1)\times(n+1)$ matrix $\mathbf{V}$ is called the **Vandermonde matrix**. Assuming the data points $(x_i, y_i)$ to be distinct, we know that only one interpolating polynomial exists. The linear system (4) has therefore exactly one solution and the matrix $V$ is thus always invertible, $\det(\textbf{V}) \neq 0$.
@@ -232,6 +243,9 @@ thus a polynomial degree of $(n_data_monomial - 1)
232
243
233
244
# ╔═╡ ac94e6f2-ebf0-4ee8-b21f-d9d20c656dd5
234
245
begin
246
+
# We wish to find an interpolating polynomial for the mapping
247
+
# temperature to reaction rate.
248
+
235
249
x = temperature[1:n_data_monomial]
236
250
y = rate[1:n_data_monomial]
237
251
@@ -356,7 +370,7 @@ In particular the nodal property (6) makes it extremely convenient to use a Lagr
0 commit comments