2

All the practical examples of spatial interpolation I've been able to find work by sampling additional surrounding points to estimate the derivatives. But is there a simpler method if the derivatives are already known—and if you only need the value (and derivatives) for the single point at the center of the known points?

To illustrate: suppose for each of the points (1, 1), (-1, 1), (-1, -1), and (1, -1) you know f(x, y), f'(x), f''(x), f'(y), and f''(y) — and you want interpolated values at (0, 0) for f(x, y), f'(x), f''(x), f'(y), and f''(y).

Regexident
  • 29,441
  • 10
  • 93
  • 100

1 Answers1

1

First of all the problem as posed does not make sense. In multi-variable calculus we don't have derivatives, we have partial derivatives. Lots of them.

Suppose you have the value, first partial derivatives and second partial derivatives at the corners. So at each corner we know the value, the partial by x, the partial by y, the second partial by x by x, the second partial by x by y, and the second partial by y by y. We have 6 pieces of data per corner, for 24 pieces of data total.

Next what we do is try to fit this to an appropriate polynomial. 24 terms, that would be, a0 + a1 x + a2 y + a3 x^2 + a4 x y + a5 y^2 + a6 x^3 + a7 x^2 y + a8 x y^2 + a9 y^3 + a10 x^4 + a11 x^3 y + a12 x^2 y^2 + a13 x y^3 + a14 y^4 + a15 x^5 + a16 x^4 y + a17 x^3 y^2 + a18 x^2 y^3 + a18 x y^4 + a19 y^5 + a20 x^6 + a21 x^4 y^2 + a22 x^2 y^4 + a23 y^6. (I had to leave out some 6th power terms because I was hitting that 24 limit.)

If you calculate that out, matching up all of those values against all of those points you get 24 equations in 24 variables. Solve and you get all of the coefficients to use. Plug in the value (0, 0) and you have your interpolation.

Straightforward, tedious, and not for the faint of heart.

btilly
  • 43,296
  • 3
  • 59
  • 88
  • Yes, I meant partial derivatives—sorry my calculus is a bit rusty. I'm also not clear on "the second partial by x by y"—is there a more intuitive description of that value? – AbouBenAdhem Jun 01 '12 at 22:23
  • @AbouBenAdhem Take a partial derivative by x. That gives you a function. Then take a partial derivative of that function by y. That is the partial that I'm talking about, and basically it picks up the xy term. You can also take the partial by y then the partial by x, but for well-behaved functions those are going to be the same thing. – btilly Jun 01 '12 at 22:48