Derive the formula for gradient using chain rule

In summary, we discussed how to find the gradient of a curve formed by the intersection of a surface and a plane. By using the chain rule and the reciprocity relation, we derived the formula for calculating the gradient. However, we also discovered that this formula is not always accurate and requires more careful handling of partial derivatives. The correct method involves using total derivatives and parametrizing the curve.
  • #1
Happiness
679
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
  • #2
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 Happiness
  • #3
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:
  • #4
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 Happiness and Delta2

Related to Derive the formula for gradient using chain rule

1. What is the formula for gradient using chain rule?

The formula for the gradient using chain rule is:
∇f(x,y) = (∂f/∂x)(∂x/∂u) + (∂f/∂y)(∂y/∂u)

2. How is the chain rule applied in deriving the gradient formula?

The chain rule is applied by taking the partial derivative of the function with respect to each variable, and then multiplying it by the partial derivative of the variable with respect to the independent variable.

3. What is the purpose of using the chain rule in gradient calculation?

The chain rule allows us to find the rate of change of a multivariable function with respect to a specific variable, by taking into account the dependencies between the variables.

4. Can the chain rule be used for functions with more than two variables?

Yes, the chain rule can be applied to functions with any number of variables. The formula remains the same, but the number of terms in the gradient will increase accordingly.

5. Are there any other methods to calculate the gradient besides using the chain rule?

Yes, there are other methods such as using partial derivatives or directional derivatives. However, the chain rule is often the most efficient and straightforward method for calculating the gradient.

Similar threads

Replies
6
Views
2K
  • Calculus
Replies
5
Views
1K
Replies
3
Views
1K
Replies
3
Views
1K
Replies
1
Views
263
Replies
1
Views
2K
  • Calculus
Replies
3
Views
2K
Replies
3
Views
1K
Replies
4
Views
2K
  • Calculus
Replies
2
Views
2K
Back
Top