# Interpolate

Polynomial fitting of a set of data.

## Syntax

interpolate(List, List)

interpolate(List, List, Identifier)

interpolate({Point, ..., Point})

interpolate({Point, ..., Point}, Identifier)

interpolate(Relation)

interpolate(Relation, Identifier)


## Description

Given two lists $X=\left\{{x}_{1},...,{x}_{n}\right\}$ and $Y=\left\{{y}_{1},...,{y}_{n}\right\}$, returns a polynomial of degree $n-1$ such that $p\left({x}_{i}\right)={y}_{i}$.

Given two lists $X=\left\{{x}_{1},...,{x}_{n}\right\}$ and $Y=\left\{{y}_{1},...,{y}_{n}\right\}$ and an identifier $t$, returns a polynomial $p\left(t\right)$ of degree $n-1$ such that $p\left({x}_{i}\right)={y}_{i}$.

Given a set of points ${P}_{i}=\left({x}_{i},{y}_{i}\right)$, $i=1...n$, returns a polynomial of degree $n-1$ such that $p\left({x}_{i}\right)={y}_{i}$.

Given a set of points ${P}_{i}=\left({x}_{i},{y}_{i}\right)$, $i=1...n$, and an identifier $t$, returns a polynomial $p\left(t\right)$ of degree $n-1$ such that $p\left({x}_{i}\right)={y}_{i}$.

Given a relation $\left\{{x}_{1}\to {y}_{1},...,{x}_{n}\to {y}_{n}\right\}$, returns a polynomial of degree $n-1$ such that $p\left({x}_{i}\right)={y}_{i}$.

Given a relation $\left\{{x}_{1}\to {y}_{1},...,{x}_{n}\to {y}_{n}\right\}$ and an identifier $t$, returns a polynomial $p\left(t\right)$ of degree $n-1$ such that $p\left({x}_{i}\right)={y}_{i}$.