Multivariable calculus

Partial Derivatives of sqrt(1 + x^2 + 2y^2 + 3z^2)

For f = sqrt(1 + x^2 + 2y^2 + 3z^2), the partials are x, 2y and 3z each divided by sqrt(1 + x^2 + 2y^2 + 3z^2). The outer root gives 1 over twice the root, the inner partials are 2x, 4y and 6z, and halving those leaves x, 2y and 3z. The weights survive; they do not all cancel to 1.

f(x,y,z)=1+x2+2y2+3z2f(x,y,z) = \sqrt{1 + x^2 + 2y^2 + 3z^2}
fx=x1+x2+2y2+3z2\frac{\partial f}{\partial x} = \frac{x}{\sqrt{1 + x^2 + 2y^2 + 3z^2}}
fy=2y1+x2+2y2+3z2\frac{\partial f}{\partial y} = \frac{2y}{\sqrt{1 + x^2 + 2y^2 + 3z^2}}
fz=3z1+x2+2y2+3z2\frac{\partial f}{\partial z} = \frac{3z}{\sqrt{1 + x^2 + 2y^2 + 3z^2}}

One pattern, three different weights

Let u=1+x2+2y2+3z2u = 1 + x^2 + 2y^2 + 3z^2, so f=uf = \sqrt{u} and the outer derivative is 12u\frac{1}{2\sqrt{u}}. The inner partials are 2x2x, 4y4y and 6z6z, and the 22 in that denominator halves each of them.

fx=12u2x=x1+x2+2y2+3z2\frac{\partial f}{\partial x} = \frac{1}{2\sqrt{u}}\cdot 2x = \frac{x}{\sqrt{1 + x^2 + 2y^2 + 3z^2}}
fy=12u4y=2yu,fz=12u6z=3zu\frac{\partial f}{\partial y} = \frac{1}{2\sqrt{u}}\cdot 4y = \frac{2y}{\sqrt{u}}, \qquad \frac{\partial f}{\partial z} = \frac{1}{2\sqrt{u}}\cdot 6z = \frac{3z}{\sqrt{u}}

Halving does not erase the weights, it passes them through. A coefficient cc on a squared term comes out as a coefficient cc on that variable, which is exactly why the numerators read xx, 2y2y and 3z3z.

Assuming every 2 cancels

On the unweighted version of this function all three coefficients cancel and the partials are xx, yy and zz over the root. That memory is the trap. At (1,1,1)(1,1,1) the inner sum is 77, so the partials are 170.378\frac{1}{\sqrt 7} \approx 0.378, 270.756\frac{2}{\sqrt 7} \approx 0.756 and 371.134\frac{3}{\sqrt 7} \approx 1.134: they sit in the ratio 1:2:31:2:3 even though the three coordinates are equal.

A second slip is losing either the 12\frac{1}{2} from the outer derivative or the inner partial itself, each of which puts the answer out by a factor of 22. A third is over-simplifying the denominator: x1+x2+2y2+3z2\frac{x}{\sqrt{1 + x^2 + 2y^2 + 3z^2}} is not x1+x+2y+3z\frac{x}{1 + x + 2y + 3z} and it is not 11+2y2+3z2\frac{1}{\sqrt{1 + 2y^2 + 3z^2}}. Square roots do not distribute across sums, so the denominator stays as one root.

  • Differentiate the outer root first, leaving the whole sum inside it.
  • Differentiate the inner sum with respect to one variable only.
  • Multiply, halve, then check the coefficient actually survived.

How steep it can get

The gradient is (x,2y,3z)u\frac{(x,\,2y,\,3z)}{\sqrt{u}}, so its length squared is x2+4y2+9z21+x2+2y2+3z2\frac{x^2 + 4y^2 + 9z^2}{1 + x^2 + 2y^2 + 3z^2}. Term by term the numerator carries the square of each weight while the denominator carries the weight itself, giving ratios 11\frac{1}{1}, 42\frac{4}{2} and 93\frac{9}{3}. The largest is 33, so f<31.732|\nabla f| < \sqrt{3} \approx 1.732 everywhere.

That bound is approached but never reached. Run out along the zz axis and the quotient tends to 9z21+3z23\frac{9z^2}{1 + 3z^2} \to 3; do the same along the xx axis and it tends to 11. The function is steepest in the direction it is weighted most heavily, which is what the coefficients were always going to say.

Every numerator carries its own variable, so all three partials vanish only at (0,0,0)(0,0,0). That is the sole critical point and the global minimum, with f=1f = 1, because uu is at its smallest there and the square root is increasing.

Frequently asked questions

Why add the 1?

Without it the function is x2+2y2+3z2\sqrt{x^2 + 2y^2 + 3z^2}, whose partials divide by a root that is zero at the origin, so no partial exists there. The 11 keeps u1u \ge 1, and every partial is then defined and continuous on all of space.

Does a third variable change the method?

No. A partial with respect to xx freezes yy and zz at the same time, exactly as it freezes a single variable in the two variable case. Only the bookkeeping grows: one outer derivative, one inner partial, three times over.