Undergrad Polynomial approximation of a more complicated function

Click For Summary
To approximate a complicated function F(x,y,z) with a simpler function G(x,y,z) near a point (x0,y0,z0), a second-order Taylor series expansion can be utilized. This expansion requires the function value and its first and second derivatives at the point of interest, which can be computed using finite differences. The discussion highlights the importance of including cross derivatives for accuracy, as omitting them can lead to significant errors in approximation. Concerns are raised about the validity of removing cross terms to achieve a lower-order approximation, emphasizing that this approach may not yield a reliable result. Overall, careful consideration of derivative terms is crucial for effective polynomial approximation.
Hypatio
Messages
147
Reaction score
1
There is an arbitrarily complicated function F(x,y,z).

I want to find a simpler surface function G(x,y,z) which approximates F(x,y,z) within a region close to the point (x0,y0,z0).

Can I write a second-order accurate equation for G if I know F(x0,y0,z0) and can compute the derivatives at the point using finite-differences. What does that function look like? What derivatives are needed?

I want to do this because the function F(x,y,z) is very complicated, but I want to compute an approximate result many times at positions which only change slowly.
 
  • Like
Likes Delta2
Physics news on Phys.org
Start with the "Taylor's series expansion". For a function of three variables, f(x,y,z), about (x_0, y_0, z_0), that f(x_0, y_0, z_0)+ f_x(x_0,y_0,z_0) (x- x_0)+ f_y(x_0,y_0,z_0)(y- y_0)+ f_z(x_0,y_0,z_0)(z- z_0)+ f_{xx}(x_0,y_0,z_0)(x- x_0)^2+ f_{xy}(x_0,y_0,z_0)(x- x_0)(y- y_0)+ f_{xz}(x_0,y_0,z_0)(x- x_0)(z- z_0)+ f_{yy}(x_0,y_0,z_0)(y- y_0)^2+ f_{yz}(x_0,y_0,z_0)(y- y_0)(z- z_0)+ f_{zz}(x_0,y_0,z_0)(z- z_0)^2.
 
  • Like
Likes Hypatio and DaveE
If the function is differentiable near the point of interest then the derivative is the best local linear approximation near the point. You would need the partials to compute the total derivative, i.e., tangent plane.
 
HallsofIvy said:
Start with the "Taylor's series expansion". For a function of three variables, f(x,y,z), about (x_0, y_0, z_0), that f(x_0, y_0, z_0)+ f_x(x_0,y_0,z_0) (x- x_0)+ f_y(x_0,y_0,z_0)(y- y_0)+ f_z(x_0,y_0,z_0)(z- z_0)+ f_{xx}(x_0,y_0,z_0)(x- x_0)^2+ f_{xy}(x_0,y_0,z_0)(x- x_0)(y- y_0)+ f_{xz}(x_0,y_0,z_0)(x- x_0)(z- z_0)+ f_{yy}(x_0,y_0,z_0)(y- y_0)^2+ f_{yz}(x_0,y_0,z_0)(y- y_0)(z- z_0)+ f_{zz}(x_0,y_0,z_0)(z- z_0)^2.
How about also indicating the points on the finite difference grid that the function would be evaluated at to provide the coefficients in this finite difference approximation?
 
HallsofIvy said:
Start with the "Taylor's series expansion". For a function of three variables, f(x,y,z), about (x_0, y_0, z_0), that f(x_0, y_0, z_0)+ f_x(x_0,y_0,z_0) (x- x_0)+ f_y(x_0,y_0,z_0)(y- y_0)+ f_z(x_0,y_0,z_0)(z- z_0)+ f_{xx}(x_0,y_0,z_0)(x- x_0)^2+ f_{xy}(x_0,y_0,z_0)(x- x_0)(y- y_0)+ f_{xz}(x_0,y_0,z_0)(x- x_0)(z- z_0)+ f_{yy}(x_0,y_0,z_0)(y- y_0)^2+ f_{yz}(x_0,y_0,z_0)(y- y_0)(z- z_0)+ f_{zz}(x_0,y_0,z_0)(z- z_0)^2.

Thanks this works. However, I'm looking at the first derivatives of f(x,y,z) and its taylor series approx and see that the taylor series is wildly inaccurate unless the cross derivatives are included, even right next to the point. Is it correct to simply remove the cross terms to get a lower order approximation, or does something else need to be done?
 
Hypatio said:
Thanks this works. However, I'm looking at the first derivatives of f(x,y,z) and its taylor series approx and see that the taylor series is wildly inaccurate unless the cross derivatives are included, even right next to the point. Is it correct to simply remove the cross terms to get a lower order approximation, or does something else need to be done?
I don't understand what you are describing.
 
"Simply removing the cross terms" doesn't "get a lower order approximation"
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
570
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K