Polynomial approximation of a more complicated function

  • I
  • Thread starter Hypatio
  • Start date
133
1

Main Question or Discussion Point

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.
 

Answers and Replies

HallsofIvy
Science Advisor
Homework Helper
41,735
893
Start with the "Taylor's series expansion". For a function of three variables, f(x,y,z), about [itex](x_0, y_0, z_0)[/itex], that [tex]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[/tex].
 
WWGD
Science Advisor
Gold Member
5,021
2,251
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.
 
19,524
3,912
Start with the "Taylor's series expansion". For a function of three variables, f(x,y,z), about [itex](x_0, y_0, z_0)[/itex], that [tex]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[/tex].
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?
 
133
1
Start with the "Taylor's series expansion". For a function of three variables, f(x,y,z), about [itex](x_0, y_0, z_0)[/itex], that [tex]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[/tex].
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?
 
19,524
3,912
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.
 
HallsofIvy
Science Advisor
Homework Helper
41,735
893
"Simply removing the cross terms" doesn't "get a lower order approximation"
 

Related Threads for: Polynomial approximation of a more complicated function

Replies
2
Views
2K
Replies
3
Views
4K
Replies
6
Views
573
Replies
1
Views
2K
  • Last Post
Replies
1
Views
2K
Replies
3
Views
655
Replies
4
Views
3K
Top