Maximum error for the Lagrange interpolating polynomials

In summary, the conversation discussed finding an upper bound for the maximum error in a Lagrange interpolating polynomial and determining the relation between the parameters $k$ and $n$ for the error to approach zero as both $k$ and $n$ approach infinity. It was concluded that $k\pi < n$ is a suitable condition for this to occur.
  • #1
mathmari
Gold Member
MHB
5,049
7
Hey :eek: !

Could you help me at the following exercise?

$k, n \in \mathbb{N}$
$f(x)=cos(k \pi x), x \in [0,1]$
$x_i=ih, i=0,1,2,...,n, h=\frac{1}{n}$

Let $p \in \mathbb{P}_n$ the Lagrange interpolating polynomials of $f$ at the points $x_i$.
Calculate an upper bound of the maximum error $\varepsilon_p =max_{0 \leq x \leq 1}{|f(x)-p(x)|}$ as a function of $k$ and $n$, and find a relation that $k$ and $n$ should satisfy so that $\varepsilon_p \rightarrow 0$ while $k \rightarrow \infty$ and $ n \rightarrow \infty$.

I have found that an upper bound of the maximum error is $ \frac{(k \pi h)^{n+1}}{n+1}$.

How can I find the relation that $k$ and $n$ should satisfy so that $\varepsilon_p \rightarrow 0$ while $k \rightarrow \infty$ and $ n \rightarrow \infty$ ??
 
Mathematics news on Phys.org
  • #2
mathmari said:
Hey :eek: !

Could you help me at the following exercise?

$k, n \in \mathbb{N}$
$f(x)=cos(k \pi x), x \in [0,1]$
$x_i=ih, i=0,1,2,...,n, h=\frac{1}{n}$

Let $p \in \mathbb{P}_n$ the Lagrange interpolating polynomials of $f$ at the points $x_i$.
Calculate an upper bound of the maximum error $\varepsilon_p =max_{0 \leq x \leq 1}{|f(x)-p(x)|}$ as a function of $k$ and $n$, and find a relation that $k$ and $n$ should satisfy so that $\varepsilon_p \rightarrow 0$ while $k \rightarrow \infty$ and $ n \rightarrow \infty$.

I have found that an upper bound of the maximum error is $ \frac{(k \pi h)^{n+1}}{n+1}$.

Oi! :)Hmm, how did you get that?
I get \(\displaystyle \frac{(k \pi)^{n+1} h^n}{n+1}\). :eek:

How can I find the relation that $k$ and $n$ should satisfy so that $\varepsilon_p \rightarrow 0$ while $k \rightarrow \infty$ and $ n \rightarrow \infty$ ??

First substitute \(\displaystyle h=\frac{1}{n}\)?
And then find the necessary condition for the limit to be zero?
 
  • #3
I like Serena said:
Hmm, how did you get that?
I get \(\displaystyle \frac{(k \pi)^{n+1} h^n}{n+1}\). :eek:
$$|(x-0h)(x-h)(x-2h)...(x-nh)| \frac{(k \pi)^{n+1}}{(n+1)!} \leq (h-x)(h-x)(2h-x)...(nh-x)| \frac{(k \pi)^{n+1}}{(n+1)!} \leq n! h^{n+1}\frac{(k \pi)^{n+1}}{(n+1)!} =\frac{(k \pi h)^{n+1}}{n+1}$$

I like Serena said:
First substitute \(\displaystyle h=\frac{1}{n}\)?
And then find the necessary condition for the limit to be zero?

$$\frac{(k \pi h)^{n+1}}{n+1}=\frac{(k \pi )^{n+1}}{n^{n+1} n+1}$$

So that the limit is zero the condition is $ k \pi <1$, isn't it? But shouldn't $k \rightarrow \infty$ ?
 
  • #4
mathmari said:
$$|(x-0h)(x-h)(x-2h)...(x-nh)| \frac{(k \pi)^{n+1}}{(n+1)!} \leq (h-x)(h-x)(2h-x)...(nh-x)| \frac{(k \pi)^{n+1}}{(n+1)!} \leq n! h^{n+1}\frac{(k \pi)^{n+1}}{(n+1)!} =\frac{(k \pi h)^{n+1}}{n+1}$$

Ah yes. That works! :eek:

$$\frac{(k \pi h)^{n+1}}{n+1}=\frac{(k \pi )^{n+1}}{n^{n+1} n+1}$$

So that the limit is zero the condition is $ k \pi <1$, isn't it? But shouldn't $k \rightarrow \infty$ ?

Not quite.
Aren't you forgetting the $n^{n+1}$ in the denominator?
(And also a couple of parentheses? (Lipssealed))
Perhaps you can merge it in the power that you have in the numerator?
 
  • #5
I like Serena said:
(And also a couple of parentheses? (Lipssealed))

(Tmi)

I like Serena said:
Not quite.
Aren't you forgetting the $n^{n+1}$ in the denominator?
(And also a couple of parentheses? (Lipssealed))
Perhaps you can merge it in the power that you have in the numerator?

So $$(\frac{k \pi}{n})^{n+1} \frac{1}{n+1}$$

While $ n \rightarrow \infty, \frac{1}{n+1} \rightarrow 0$.

But what about $(\frac{k \pi}{n})^{n+1}$ ? Since $n$ is a power, $\frac{k \pi}{n}$ should be smaller than $1$. But what can I do in this case where there is a $n$ in the denominator?
 
  • #6
mathmari said:
So $$(\frac{k \pi}{n})^{n+1} \frac{1}{n+1}$$

While $ n \rightarrow \infty, \frac{1}{n+1} \rightarrow 0$.

But what about $(\frac{k \pi}{n})^{n+1}$ ? Since $n$ is a power, $\frac{k \pi}{n}$ should be smaller than $1$. But what can I do in this case where there is a $n$ in the denominator?

Well, you needed a relation between $k$ and $n$.
What about $\frac{k \pi}{n} < 1$, or say $k \pi < n$?
Does that look like a relation?
 
  • #7
I like Serena said:
Well, you needed a relation between $k$ and $n$.
What about $\frac{k \pi}{n} < 1$, or say $k \pi < n$?
Does that look like a relation?

Does this relation stand for $k \rightarrow \infty$ and $n \rightarrow \infty$?
 
  • #8
mathmari said:
Does this relation stand for $k \rightarrow \infty$ and $n \rightarrow \infty$?

It's a condition.
If we set for instance $n = 2\pi k$ and let $k \to \infty$, obviously we also have that $n \to \infty$. Furthermore, $\varepsilon_p \to 0$.
However, if we set $n = k$ and let $k \to \infty,\ n \to \infty$, we do not necessarily get that $\varepsilon_p \to 0$.
 
Last edited:
  • #9
I like Serena said:
It's a condition.
If we set for instance $n = 2\pi k$ and let $k \to \infty$, obviously we also have that $n \to \infty$. Furthermore, $\varepsilon_p \to 0$.
However, if we set $n = k$ and let $k \to \infty,\ n \to \infty$, we get that $\varepsilon_p \to \infty$.

A ok! Thank you! :eek:
 
Last edited by a moderator:

FAQ: Maximum error for the Lagrange interpolating polynomials

What is the maximum error for Lagrange interpolating polynomials?

The maximum error for Lagrange interpolating polynomials is the largest possible difference between the actual function and the interpolated polynomial at any given point. It represents the accuracy of the polynomial in approximating the original function.

How is the maximum error for Lagrange interpolating polynomials calculated?

The maximum error for Lagrange interpolating polynomials can be calculated using the formula:
E = |f(x) - Pn(x)|
where E is the maximum error, f(x) is the actual function, and Pn(x) is the interpolated polynomial of degree n.

What factors affect the maximum error for Lagrange interpolating polynomials?

The maximum error for Lagrange interpolating polynomials is affected by the degree of the polynomial, the number and spacing of data points, and the smoothness of the original function. Higher degrees, more data points, and a smoother function typically result in a smaller maximum error.

How can the maximum error for Lagrange interpolating polynomials be reduced?

The maximum error for Lagrange interpolating polynomials can be reduced by increasing the degree of the polynomial, adding more data points, or using a different interpolation method such as splines. However, increasing the degree can also lead to numerical instability and overfitting.

Is the maximum error for Lagrange interpolating polynomials always guaranteed to be small?

No, the maximum error for Lagrange interpolating polynomials is not always guaranteed to be small. It depends on the factors mentioned above and the choice of interpolation points. In some cases, the maximum error can be quite large, especially if the interpolation points are poorly chosen.

Similar threads

Replies
3
Views
1K
Replies
10
Views
2K
Replies
5
Views
1K
Replies
1
Views
999
Replies
3
Views
1K
Replies
12
Views
598
Replies
5
Views
1K
Back
Top