# Derivatives involved in Bilinear interpolation

If we choose a unit square in which the four points where the function $f$ is known are as shown in the diagram the interpolation formula for $f$ is: $$\begin{split} f(x+u, y+v)\approx (1-u)(1-v)f(x,y)+u(1-v)f(x+\Delta x,y)\\ &\hspace{-7cm}+(1-u)vf(x,y+\Delta y)+uvf(x+\Delta x,y+\Delta y). \end{split}$$

The above formula is equivalent to the following Taylor expansion series $$f(x+u, y+v) \approx f(x,y) + u \frac{\partial{f}}{\partial x}(x,y) + v\frac{\partial{f}}{\partial y}(x,y)+uv \frac{\partial^2{f}}{\partial x \partial y}(x,y).$$

The derivative of $f$ w.r.t. $x$ is given by:

$$\frac{\partial f}{\partial x}(x+u,y+v)= \frac{\partial{f}}{\partial x}(x,y)+u\frac{\partial^2{f}}{\partial x^2}(x,y) + v\frac{\partial{f}}{\partial x\partial y}(x,y)+uv \frac{\partial^3{f}}{\partial^2 x \partial y}(x,y)$$

In a previous post I stated the approximate derivatives as follows: $$\frac{\partial{f}}{\partial x}(x,y)= \frac{f(x+\Delta x, y)-f(x,y)}{\Delta x}$$

$$\frac{\partial^2{f}}{\partial^2 x}(x,y)= \frac{f(x+2\Delta x, y)-2f(x+\Delta x,y)+f(x,y)}{\Delta^2 x}$$

$$\frac{\partial^2{f}}{\partial x \partial y}(x,y)= \frac{f(x+\Delta x, y+\Delta y)-f(x, y+\Delta y)-f(x+\Delta x,y)+f(x,y)}{\Delta x\Delta y}$$

$$\frac{\partial^3{f}}{\partial^2 x \partial y}(x,y) = \frac{f(x+2\Delta x, y+\Delta y)-2f(x+\Delta x, y+\Delta y)+f(x, y +\Delta y)}{\Delta^2 x\Delta y}\\ \frac{-f(x+2\Delta x,y)+2f(x+\Delta x,y)-f(x,y)}{\Delta^2 x\Delta y}$$

Is it true to say that the $\frac{\partial^2{f}}{\partial^2 x}$ and $\frac{\partial^3{f}}{\partial^2 x \partial y}$ are equal to zero?

Because we have to move $2\Delta x$ and bilinear interpolation involves 4 points.

• What is $u,v$? Wouldn't it be easier to denote them $x_1, x_2, y_1, y_2$? Because right now it looks like you have phantom variables. I would also assume that one of the corners is at 0,0. I am not sure what is the goal, but the second degree derivative of linear function is 0, but it has nothing to do with bilinear interpolation. – Evil Jul 5 '17 at 16:01
• I'm confused by what you are asking. You seem to be using the same symbol $f$ to represent both the true function $f$ (which might be some very complicated thing, whose second and third derivatives are non-zero) and your approximation to $f$ (where we derive the approximation by making some assumptions that higher-order derivatives are zero; or equivalently, that we can discard the higher-order terms in the Taylor series). What exactly is your question? When you ask about $\frac{\partial^2{f}}{\partial^2 x}$, which $f$ are you referring to? – D.W. Jul 5 '17 at 18:03
• In bilinear interpolation, you are assuming that the function is bilinear. In particular, all its second derivatives vanish. – Yuval Filmus Jul 5 '17 at 19:02