Derive the formula for gradient using chain rule

Click For Summary

Discussion Overview

The discussion revolves around deriving the formula for the gradient using the chain rule in the context of a surface defined by the equation ##g(x, y, z)=0##. Participants explore the implications of partial versus total derivatives and the conditions under which they apply, focusing on the intersection of the surface with a plane and the resulting curve in the x-y plane.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant suggests that the gradient of the curve can be expressed using the chain rule, leading to a formula that differs from the expected result by a negative sign.
  • Another participant emphasizes the need for caution when dealing with partial derivatives, arguing that the relationship used may not hold under the conditions described, particularly when certain variables are held constant.
  • A third participant questions why the partial derivatives ##\frac{\partial g}{\partial x}## and ##\frac{\partial g}{\partial y}## are not zero in the context of their calculations, seeking clarification on when variables must be held constant in the application of the chain rule.
  • A later reply critiques the presentation of a referenced website, arguing that it improperly mixes total and partial derivatives, and proposes an alternative derivation that relies solely on total derivatives to arrive at the gradient formula.

Areas of Agreement / Disagreement

Participants express differing views on the correct application of the chain rule and the treatment of partial derivatives. There is no consensus on the validity of the methods presented, and the discussion remains unresolved regarding the correct approach to deriving the gradient.

Contextual Notes

Participants highlight limitations in the assumptions made regarding the treatment of derivatives, particularly the distinction between total and partial derivatives, and the conditions under which they apply. These nuances contribute to the complexity of the discussion.

Happiness
Messages
686
Reaction score
30
Consider a surface defined by the equation ##g(x, y, z)=0##. The intersection between this surface and the plane ##z=c## produces a curve that can be plotted on an x-y plane. Find the gradient of this curve.

By chain rule,

##\frac{\partial y}{\partial x}=\frac{\partial y}{\partial g}\frac{\partial g}{\partial x}##

Using the reciprocity relation ##\frac{\partial y}{\partial g}=\Big(\frac{\partial g}{\partial y}\Big)^{-1}##, we have

##\frac{\partial y}{\partial x}=\frac{(\frac{\partial g}{\partial x})}{(\frac{\partial g}{\partial y})}##

This differs from the correct answer by a negative sign. What's wrong with this method?
 
Physics news on Phys.org
Greater care is needed when handling partial derivatives. They cannot be treated in general the same as total derivatives. In particular it is not necessarily the case that
Happiness said:
##\frac{\partial y}{\partial x}=\frac{\partial y}{\partial g}\frac{\partial g}{\partial x}##
Indeed, in this case the ##\frac{\partial y}{\partial x}## that is being calculated is with the values of ##g## and ##z## held constant, so ##\frac{\partial y}{\partial g}## is undefined or infinite, while ##\frac{\partial g}{\partial x}## is zero.
 
  • Like
Likes   Reactions: Happiness
The following website calculates the gradient as follows:

Differentiate ##g## wrt ##x## while holding ##z## constant.

image.png


Then we will have ##\frac{\partial y}{\partial x}=-\frac{(\frac{\partial g}{\partial x})}{(\frac{\partial g}{\partial y})}##. Why ain't ##\frac{\partial g}{\partial x}## and ##\frac{\partial g}{\partial y}## zero in this case?

In what situations must the two partials on the RHS of the chain rule have the same variables held constant? Like you mentioned for post #1, ##(\frac{\partial y}{\partial g})_{gz}(\frac{\partial g}{\partial x})_{gz}##. But why is it not required in the attachment above, where ##(\frac{\partial g}{\partial y})_{xz}(\frac{\partial y}{\partial x})_{gz}##?

Source:
http://www.sjsu.edu/faculty/watkins/envelopetheo.htm
 
Last edited:
I find the presentation on that web page unnecessarily confusing. It attempts to use the formula for a total derivative in a case where all derivatives are partial. Sometimes one can get away with this, but sometimes one can't, so it is best avoided.

A more correct derivation would be as follows:

Say the point ##(x_0,y_0)## is on the curve. Let us parametrise the curve through that point by function ##\gamma:\mathbb R\to\mathbb R^2## and wlog set ##\gamma(0)=(x_0,y_0)##. Then we have ##g(\gamma_1(t).\gamma_2(t),c)=0##, where ##\gamma_1## and ##\gamma_2## are the component functions of ##\gamma##.

We then apply ##\frac d{dt}## to this - ie taking a total derivative - to get:

$$0=\frac d{dt}0=\frac d{dt}g(\gamma_1(t).\gamma_2(t),c)=\frac{\partial g}{\partial x}\frac {dx}{dt}+
\frac{\partial g}{\partial y}\frac {dy}{dt}+\frac{\partial g}{\partial c}\frac {dc}{dt}
=\frac{\partial g}{\partial x}\frac {dx}{dt}+
\frac{\partial g}{\partial y}\frac {dy}{dt}+\frac{\partial g}{\partial c}\cdot 0$$

Rearranging, we get

$$-\frac{\partial g}{\partial x}/\frac{\partial g}{\partial y}=\frac{dy}{dt}/\frac{dx}{dt}=\frac{dy}{dx}$$
as required. Note that the transformation in the final step is allowed because we are dealing with total derivatives, not partial derivatives.
 
  • Like
Likes   Reactions: Happiness and Delta2

Similar threads

  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K