interpolation_lagrange
Constructs the Lagrange interpolating polynomial from provided y-values or a generating function, evaluates it at an optional x, and returns the polynomial, degree, and error bounds.
Instructions
Build the Lagrange interpolating polynomial through a set of points.
Provide either the point values puntos_y or the generating function
func_str evaluated at puntos_x.
Args:
puntos_x: Distinct abscissas of the interpolation points.
x_eval: Optional x where the polynomial is evaluated.
func_str: Optional generating function f(x) for the y values.
puntos_y: Optional y values matching puntos_x one-to-one.
precision: Rounding digits.
Returns:
Dict with the polynomial, its degree, the points table and error
bounds when func_str is provided.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x_eval | No | ||
| func_str | No | ||
| puntos_x | Yes | ||
| puntos_y | No | ||
| precision | No |