What does a bivariate cubic polynomial look like?
July 13, 2011 10:45 AM Subscribe
What does a bivariate cubic polynomial look like?
I'm trying to fit a function to data in 3 dimensions and one of the fit functions I'm testing is the 3-dimensional version of a cubic function. I believe this is called a bivariate cubic polynomial (i.e., a cubic function with two variables).
The equation I've come up with is the following:
f(x,y) = ax3 + bx2 + cx + dx2y + exy2 + fy3 + gy2 + hy + i
However, when I use my statistics software to solve for the parameters using my data it is unable to do so. This makes me think the formula might not be correct, but I am not sure. I came here for a second opinion. Hopefully someone with some real math chops can give me a pointer?
posted by tybeet to science & nature (9 answers total) 2 users marked this as a favorite
So, you need:
4 third-order terms: x3, x2y, xy2, y3
3 second-order terms: x2, xy, y2
2 first-order terms: x, y
and 1 constant term.
Second, you might consider whether you're solving for the equation (which is appropriate if you have exactly ten data points, since you have ten unknowns), or trying to find a best fit (appropriate for more than ten data points). In general, you will not be able to find an exact solution if you have more than ten data points yet you're trying to model them with an equation with ten coefficients.
Just like a standard linear regression with a dependent variable and an independent variable: if you have just two data points, you can find a line that passes through both. If you have many data points, you (generally) can't find a line passing through all of them; you can find a best fit, but the method for finding that is different than finding the line that passes through two points. [OK, you can take the linear regression method and apply it to a data set of just two points to find the line that passes through them, but that's needlessly complex.] My point being, if you have more than ten data points but try to solve for an exact solution which passes through all the points, there probably isn't one.
posted by DevilsAdvocate at 11:02 AM on July 13, 2011 [3 favorites]