Lagrange polynomial second order derivative

2.4k Views Asked by At

Well I came across a problem to find a generalized version ($n+1$ nodes) of first and second order derivatives for Lagrange interpolation polynomial. In some former post, I found an expression for deriving $L_j(x)$, where $L_j$ stands for Lagrange basis polynomial. The expression is as follows:

\begin{align} L_j'(x) = \sum_{l\not = j} \frac{1}{x_j-x_l}\prod_{m\not = (j,l)} \frac{x-x_m}{x_j-x_m} \end{align}

Now, what I wanted to do naturally was to find second order derivative for $L_j(x)$, and as each element in main sum has only an expression

\begin{align} \prod_{m\not = (j,l)} {x-x_m} \end{align}

which contains $X$, and the other expressions are constants, I need to find derivative of the above expression, but how do I do this?

2

There are 2 best solutions below

0
On BEST ANSWER

Let me just quickly provide the reference to the original question (It was posted by me and I had some problems to derive the formula: Link)

So we start with \begin{align} L_j'(x) = \sum_{l\not = j} \frac{1}{x_j-x_l}\prod_{m\not = (j,l)} \frac{x-x_m}{x_j-x_m} \end{align} as you already mentioned, the interesting part is the product \begin{align} \prod_{m\not =(j,l)} \frac{x-x_m}{x_j-x_m} \end{align} To compute the derivative, we apply the chain rule to get

\begin{align} \frac{d}{dx}\left( \prod_{m\not =(j,l)} \frac{x-x_m}{x_j-x_m} \right) = \sum_{w \not = (j,l)} \frac{1}{x_j-x_w}\prod_{m\not = (j,l,w)}\frac{x-x_m}{x_j-x_m} \end{align}

Putting this together, we end up with \begin{align} L_j''(x) = \sum_{l\not = j} \frac{1}{x_j-x_l} \sum_{w \not = (j,l)}\frac{1}{x_j-x_w} \prod_{m\not = (j,l,w)}\frac{x-x_m}{x_j-x_m} \end{align}

Like in the last thread, I'm sure that this can be simplified, but since I failed the last time, I don't want to attempt this again.

0
On

$$L_{j}(x) = \prod_{i\neq j} \frac{x-x_{i}}{x_{j}-x_{i}} $$

then $$ ln\Big(L_{j}(x)\Big) = ln\Big(\prod_{i\neq j} \frac{x-x_{i}}{x_{j}-x_{i}} \Big) = \sum_{i \neq j } ln\Big( \frac{x-x_{i}}{x_{j}-x_{i}} \Big) $$

if we derivate we have:

$$ \frac{L'_{j}(x)}{L_{j}(x)} =\sum_{i \neq j} \frac{\frac{1}{x_{j}-x_{i}}}{\frac{x-x_{i}}{x_{j}-x_{i}}} = \sum_{i \neq j} \frac{1}{x-x_{i}} $$ then

$$ L'_{j}(x) = L_{j}(x) \Big( \sum_{i \neq j} \frac{1}{x-x_{i}} \Big) $$

if we use the product rule for derivatives we have that:

$$ L''_{j}(x) = L'_{j}(x) \Big( \sum_{i \neq j} \frac{1}{x-x_{i}} \Big)+L_{j}(x) \Big( \sum_{i \neq j} \frac{1}{x-x_{i}} \Big)' \\ = L'_{j}(x) \Big( \sum_{i \neq j} \frac{1}{x-x_{i}} \Big)+L_{j}(x) \Big( \sum_{i \neq j} \frac{-1}{(x-x_{i})^2} \Big) $$ we know $ L'_{j}(x) $ so $$ \\ = L_{j}(x) \Big( \sum_{i \neq j} \frac{1}{x-x_{i}} \Big)\Big( \sum_{i \neq j} \frac{1}{x-x_{i}} \Big)-L_{j}(x) \Big( \sum_{i \neq j} \frac{1}{(x-x_{i})^2} \Big)\\ = L_{j}(x) \Big( \sum_{i \neq j} \frac{1}{x-x_{i}} \Big)^2 -L_{j}(x) \Big( \sum_{i \neq j} \frac{1}{(x-x_{i})^2} \Big) \\ = L_{j}(x) \Big\{\Big( \sum_{i \neq j} \frac{1}{x-x_{i}} \Big)^2 - \sum_{i \neq j} \frac{1}{(x-x_{i})^2} \Big\} $$