I am currently working on an algorithm application and I am trying to reach the solution that I found in the reference, but I did not reach it the function is $$f(H_{i},(R,\beta)) = R - || H_{x}^2 + H_{y}^2 + H_{z}^2 + 2H_{x}\beta_{x} + 2H_{y}\beta_{y} + 2H_{z}\beta_{z} + \beta_{x}^2 + \beta_{y}^2 + \beta_{z}^2 ||^{1/2}$$
i get partial derivarive $$\frac{\partial f(H_{i},(R,\beta))}{\partial \beta_{x}} = \frac{-\left ( H_{x} + \beta_{x} \right )}{|| H_{x}^2 + H_{y}^2 + H_{z}^2 + 2H_{x}\beta_{x} + 2H_{y}\beta_{y} + 2H_{z}\beta_{z} + \beta_{x}^2 + \beta_{y}^2 + \beta_{z}^2 ||}$$
but i found a different sign at the reference solution $$\frac{\partial f(H_{i},(R,\beta))}{\partial \beta_{x}} = \frac{-\left ( H_{x} - \beta_{x} \right )}{|| H_{x}^2 + H_{y}^2 + H_{z}^2 + 2H_{x}\beta_{x} + 2H_{y}\beta_{y} + 2H_{z}\beta_{z} + \beta_{x}^2 + \beta_{y}^2 + \beta_{z}^2 ||}$$ is the reference solution is right why it got minus sign ? , why can any body help?