This is more of a numerical methods question. Hopefully, this is the right stackexchange board to post this question.

I am wondering if anyone is aware of the order of accuracy of using least squares to compute gradients, numerically, using the Linear basis:

$\phi = \begin{bmatrix} 1 & x & y & z \end{bmatrix}$


Quadratic basis: $\phi = \begin{bmatrix} 1 & x & y & z & xy & xz & yz & x^2 & y^2 & z^2 \end{bmatrix}$

With other schemes such as finite difference, I can just plug in taylor series approximations, and look at the truncation error to determine the theoretical order of accuracy, but I am not sure how to go about doing this with least squares.

  • $\begingroup$ There is very little which can be done to help you unless you tell us exactly what you are doing. $\endgroup$ – Carl Christian May 3 '18 at 22:24
  • $\begingroup$ I am using least squares to numerical compute gradients of a variable $u$ on a discretized domain (using finite volume method), and I am interested in knowing the theoretical order order of accuracy of using least squares for computing gradients, numerically. $\endgroup$ – David May 4 '18 at 15:34
  • $\begingroup$ You need to describe the domain and codomain of your function $u$. We need the classification of the function, how smooth is it? We need to know how you measure the difference between two functions. Are you using the $L_2$ norm or the $l_2$ norm. Are you dealing with finitely many points or not? $\endgroup$ – Carl Christian May 5 '18 at 18:22
  • $\begingroup$ So I am solving the linear elasticity equations, if that helps. When solving this equation, I need to compute gradients. The domain is $R^3$ in x,y,z coordinates. The codomain is also $R^3$. The function is smooth. I am dealing with discrete points because this is a numerical methods problem on a finite number of cells. So I use the $l_2$ norm. $\endgroup$ – David May 7 '18 at 0:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.