MHB Maximum error for the Lagrange interpolating polynomials

AI Thread Summary
The discussion focuses on finding an upper bound for the maximum error of Lagrange interpolating polynomials for the function f(x) = cos(kπx) over the interval [0,1]. An upper bound for the error is identified as (kπh)^(n+1)/(n+1), where h = 1/n. To ensure that the error approaches zero as both k and n approach infinity, a necessary condition is established: kπ must be less than n. This implies a relationship such as n = 2πk, which allows both k and n to grow indefinitely while ensuring the error converges to zero. The conversation highlights the importance of the relationship between k and n in controlling the error of the interpolation.
mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey :o !

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
mathmari said:
Hey :o !

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 $$\frac{(k \pi)^{n+1} h^n}{n+1}$$. :o

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 $$h=\frac{1}{n}$$?
And then find the necessary condition for the limit to be zero?
 
I like Serena said:
Hmm, how did you get that?
I get $$\frac{(k \pi)^{n+1} h^n}{n+1}$$. :o
$$|(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 $$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$ ?
 
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! :o

$$\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?
 
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?
 
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?
 
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$?
 
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:
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! :o
 
Last edited by a moderator:
Back
Top