Approximation of Functions

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play

1/26

encourage image

There are no tags or description

Looks like no tags are added yet.

27 Terms

1
New cards

Interpolation (definition)

Method to estimate unknown function values between known, nearby discrete data points (e.g., from measurements).

2
New cards

Nearest neighbor interpolation (idea & drawback)

Trivial "best guess": pick the value of the closest known data point. Rarely used in 1D because the error is generally too large.

3
New cards

Linear interpolation (how it works)

Divides data into segments between pairs of neighboring supporting points and connects each pair with a straight line (y = mx + b).

4
New cards

Assumptions for 1D linear interpolation

Sorted arrays where x is strictly monotonically increasing; spacing (Δx) can be arbitrary/non-uniform.

5
New cards

Main drawback of linear interpolation (continuous vs. smooth)

The resulting function is continuous (no jumps), but generally not smooth (sharp corners where the slope jumps at data points).

6
New cards

Smoothness classes (C^0 vs. C^1 vs. C^2)

C^0: continuous function (no jumps). C^1: continuous 1st derivative (no sharp corners). C^2: continuous 2nd derivative (smooth curvature).

7
New cards

Polynomial Interpolation Theorem

Given n distinct data points, a unique polynomial of degree n - 1 can be constructed that passes smoothly through all points.

8
New cards

3 ways to obtain polynomial interpolation coefficients

1) Vandermonde matrix (linear system), 2) Lagrange polynomials, 3) Newton polynomials.

9
New cards

What is Runge's phenomenon?

Strong oscillations near the boundaries of an interval when using high-degree polynomial interpolation on equidistant sample points.

10
New cards

Why avoid high-order polynomial interpolation?

It is numerically unstable and prone to large boundary oscillations (Runge's phenomenon); piecewise methods like splines are usually better.

11
New cards

Cubic spline interpolation (definition & main advantage)

Interpolation using piecewise cubic (degree-3) polynomials on each interval. Produces a smooth curve while avoiding Runge's phenomenon.

12
New cards

How smooth is a cubic spline?

C^2 smooth: the function, its 1st derivative (slope), and its 2nd derivative (curvature) are all continuous across data points.

13
New cards

Conceptually, how are cubic spline coefficients derived?

Rewrite each cubic segment using unknown 2nd derivatives M_i, enforce interpolation and C^1/C^2 continuity at inner points, add boundary conditions, and solve the linear system for M_i.

14
New cards

Natural boundary conditions (natural cubic splines)

Setting the 2nd derivative to zero at both endpoints (M_0 = 0, M_N = 0). It is the easiest way to supply the 2 missing equations at the ends.

15
New cards

Matrix structure of cubic splines & why it matters

The linear equation system is tridiagonal (only the main diagonal and its 2 neighbors are non-zero), so banded solvers (e.g., scipy.linalg.solve_banded) solve it much faster than general solvers.

16
New cards

Why cache the cubic spline matrix for repeated evaluations?

The matrix depends only on x-spacing (h_i), not on y-values. Caching it makes repeated interpolation efficient when y changes on the same x-grid.

17
New cards

Disadvantage of cubic splines (forcing C^2 smoothness)

Near sharp jumps or steps in data, forcing the 2nd derivative to remain continuous causes oscillations and overshoot.

18
New cards

Akima splines vs. Cubic splines

Akima splines are only C^1 smooth (relaxing 2nd-derivative continuity), which reduces overshoot/oscillations near sharp changes and makes them easier to derive.

19
New cards

Multi-D interpolation on regular grids

On grids with uniform spacing per dimension, 1D methods extend directly: 2D nearest-neighbor, bilinear (from linear), and bicubic (from cubic).

20
New cards

Linear interpolation on irregular multi-D grids

If a triangulation exists (splitting points into triangles), linear interpolation is still relatively easy to perform on irregular grids.

21
New cards

Interpolation vs. Curve fitting (core difference)

Interpolation passes exactly through all data points. Curve fitting adjusts a parametric model to noisy data without hitting every point, minimizing residuals.

22
New cards

Curve fitting model & residual (definition)

y_i = f(t_i, β) + ε_i. t_i is the independent variable, β are unknown parameters, and the residual ε_i (or r_i) is the deviation between observed y_i and model prediction f(t_i, β).

23
New cards

Degrees of freedom (in curve fitting)

The number of unknown parameters in β adjusted to fit the data (e.g., 4 for A * e^(λt) * sin(ωt + θ)).

24
New cards

Why can model parametrization be ambiguous? (e.g., Ae^(λt)sin(ωt + θ))

Different parameter combinations can yield the exact same curve — e.g., adding 2π to θ, or flipping the sign of A (or ω) while shifting θ by π.

25
New cards

Why is an initial guess (p0) needed in curve fitting, and how is it chosen?

Nonlinear optimization is iterative and needs a starting point β_0 to converge properly. Heuristics are often used to estimate p0 automatically.

26
New cards

Why must you inspect residuals after curve fitting?

A good fit leaves residuals looking like random noise around zero; visible non-random patterns signal a problem.

27
New cards

2 likely causes of non-random patterns in a residual plot

1) The optimizer failed to converge to the optimum (e.g., bad initial guess p0 or poor conditioning);

2) The chosen model cannot describe the data, even at the optimum.