How to manipulate functions that are not explicitly given?

  • #1
Rick16
67
20
TL;DR Summary
In situations, where a function is not given explicitly, but just in a general form like f(ax+by), I am often lost when such functions are being manipulated.
Here are two examples:

The first one is from Taylor's Mechanics, section 6.2:

Taylor takes the function ##f(y+\alpha\eta, y' + \alpha\eta', x)## and differentiates it with respect to ##\alpha##. In the expression for the function, ##y## and ##\eta## depend on ##x##, ##\alpha## is an independent parameter. Here is what he gets: $$\frac {\partial f} {\partial \alpha}= \eta \frac {\partial f} {\partial y} +\eta' \frac {\partial f} {\partial y'}$$

In order to simplify the situation, I am just considering the function ##f(y+\alpha\eta)##. If I understand correctly, this function could be something like ##f=(y+\alpha\eta)^2## or ##f=e^{y+\alpha\eta}## or ##f=\frac {\pi} {\sqrt{y+\alpha\eta}}##, but it could not be something like ##f=y^2+\alpha\eta##, i.e. the term ##y+\alpha\eta## should appear unchanged in the explicit expression for the function. Is this correct?

The simplest such function would then be ##f=y+\alpha\eta##. If I take the derivative of this function with respect to ##\alpha##, I get: ##\frac {\partial f} {\partial \alpha}=\eta##. If I take the derivative of ##f=(y+\alpha\eta)^2##, I get ##\frac {\partial f} {\partial \alpha}=2(y+\alpha\eta)\eta##. Taking the derivative of ##f=e^{y+\alpha\eta}## gives ##\frac {\partial f} {\partial \alpha}=\eta f##. So I actually do get ##\frac {\partial f} {\partial \alpha}=\eta \frac {\partial f} {\partial y}## in all of these cases. But I cannot see how I can arrive at this expression without looking at specific cases. Also, looking at only a few specific cases does not give me the guarantee that the result would be the same in all cases.

The second example is from Landau's Mechanics, §4:

Landau writes the Lagrangian of a free particle as ##L(v^2)## in a reference frame ##K##. He then considers a reference frame ##K'## that moves with a velocity ##\vec{\epsilon}## relative to ##K##, so that the velocity of the particle in the frame ##K'## is ##\vec{v'}=\vec{v}+\vec{\epsilon}##.

He then writes the Lagrangian ##L'=L(v')^2=L(\vec{v}+\vec{\epsilon})^2=L(v^2+2\vec{v}\vec{\epsilon}+\epsilon^2)## and in the next step ##L(v')^2=L(v^2)+\frac {\partial L} {\partial v^2} 2\vec{v}\vec{\epsilon}##. Where does this come from? It looks like a Taylor expansion, but I cannot make sense of it. Why does he take the derivative with respect to ##v^2##? ##L'## does not depend on ##v^2##, it depends on ##(v')^2##. And I don't see how the other terms fit in either.

Apart from these two examples, could someone recommend a text to me where this kind of manipulations is systematically explained?
 
  • Like
Likes PeroK
Physics news on Phys.org
  • #2
The simple example you are looking at is just the chain rule. ##\frac{\partial f}{\partial \alpha} =\frac{\partial f}{\partial y}\frac{\partial y}{\partial \alpha}## (where in this case the partial derivatives are full derivatives)
 
  • #3
Office_Shredder said:
The simple example you are looking at is just the chain rule. ##\frac{\partial f}{\partial \alpha} =\frac{\partial f}{\partial y}\frac{\partial y}{\partial \alpha}## (where in this case the partial derivatives are full derivatives)
The problem with this is that ##y## does not depend on ##\alpha## and ##\frac {\partial y} {\partial \alpha}\neq \eta##.
 
  • #4
Rick16 said:
The problem with this is that ##y## does not depend on ##\alpha## and ##\frac {\partial y} {\partial \alpha}\neq \eta##.
Yeah, this is very abused notation. I think it helps to separate the variables a bit. Let ##f=f(x_1)##, and let ##x_1=y+\alpha \eta##. Then it's really ##\frac{\partial f}{\partial x_1}\frac{\partial x_1}{\partial \alpha}##. Unfortunately people don't want to need 2n variables for an n dimensional function so they will use ##y## to refer to both the input of ##f## and also the thing being perturbed, even though they are slightly different things if you squint hard at it
 
  • Like
Likes PeroK
  • #5
Rick16 said:
TL;DR Summary: In situations, where a function is not given explicitly, but just in a general form like f(ax+by), I am often lost when such functions are being manipulated.

Here are two examples:

The first one is from Taylor's Mechanics, section 6.2:

Taylor takes the function ##f(y+\alpha\eta, y' + \alpha\eta', x)## and differentiates it with respect to ##\alpha##. In the expression for the function, ##y## and ##\eta## depend on ##x##, ##\alpha## is an independent parameter. Here is what he gets: $$\frac {\partial f} {\partial \alpha}= \eta \frac {\partial f} {\partial y} +\eta' \frac {\partial f} {\partial y'}$$

In order to simplify the situation, I am just considering the function ##f(y+\alpha\eta)##. If I understand correctly, this function could be something like ##f=(y+\alpha\eta)^2## or ##f=e^{y+\alpha\eta}## or ##f=\frac {\pi} {\sqrt{y+\alpha\eta}}##, but it could not be something like ##f=y^2+\alpha\eta##, i.e. the term ##y+\alpha\eta## should appear unchanged in the explicit expression for the function. Is this correct?

The simplest such function would then be ##f=y+\alpha\eta##. If I take the derivative of this function with respect to ##\alpha##, I get: ##\frac {\partial f} {\partial \alpha}=\eta##. If I take the derivative of ##f=(y+\alpha\eta)^2##, I get ##\frac {\partial f} {\partial \alpha}=2(y+\alpha\eta)\eta##. Taking the derivative of ##f=e^{y+\alpha\eta}## gives ##\frac {\partial f} {\partial \alpha}=\eta f##. So I actually do get ##\frac {\partial f} {\partial \alpha}=\eta \frac {\partial f} {\partial y}## in all of these cases. But I cannot see how I can arrive at this expression without looking at specific cases. Also, looking at only a few specific cases does not give me the guarantee that the result would be the same in all cases.
That all seems fine, so I'm not sure where the problem lies. If you want a more in-depth discussion of multiple-variable partial derivatives, you could try my Insight:

https://www.physicsforums.com/insights/demystifying-chain-rule-calculus/
Rick16 said:
The second example is from Landau's Mechanics, §4:

Landau writes the Lagrangian of a free particle as ##L(v^2)## in a reference frame ##K##. He then considers a reference frame ##K'## that moves with a velocity ##\vec{\epsilon}## relative to ##K##, so that the velocity of the particle in the frame ##K'## is ##\vec{v'}=\vec{v}+\vec{\epsilon}##.

He then writes the Lagrangian ##L'=L(v')^2=L(\vec{v}+\vec{\epsilon})^2=L(v^2+2\vec{v}\vec{\epsilon}+\epsilon^2)## and in the next step ##L(v')^2=L(v^2)+\frac {\partial L} {\partial v^2} 2\vec{v}\vec{\epsilon}##. Where does this come from? It looks like a Taylor expansion, but I cannot make sense of it. Why does he take the derivative with respect to ##v^2##? ##L'## does not depend on ##v^2##, it depends on ##(v')^2##. And I don't see how the other terms fit in either.

Apart from these two examples, could someone recommend a text to me where this kind of manipulations is systematically explained?
This is a tricky question that comes up now and again. The key point is that the function ##L## has a unique, well-defined function that is its derivative. When you use the ##\frac{\partial L} {\partial X}## notation, you have to put something in place of ##X## in the denominator. What you choose to put there is purely notational.

Note that in this context ##L## is the same well-defined function throughout. This is in contrast to the common convention of using ##L## for different functions where the chain rule is involved.

As an example. If ##L(x) = x^2##, and ##x = 2u##, then (mathematically speaking) ##L(u) = u^2##. Because ##L## is a well-defined function.

But, many physics textbooks will use the often unstated convention that: ##L(u) = 4u^2##. Mathematically speaking, that is the functional composition of ##L## and the function ##2u##.
 
  • #6
Rick16 said:
The problem with this is that ##y## does not depend on ##\alpha## and ##\frac {\partial y} {\partial \alpha}\neq \eta##.
You should definitely read my Insight!
 
  • #7
Office_Shredder said:
Yeah, this is very abused notation. I think it helps to separate the variables a bit. Let ##f=f(x_1)##, and let ##x_1=y+\alpha \eta##. Then it's really ##\frac{\partial f}{\partial x_1}\frac{\partial x_1}{\partial \alpha}##. Unfortunately people don't want to need 2n variables for an n dimensional function so they will use ##y## to refer to both the input of ##f## and also the thing being perturbed, even though they are slightly different things if you squint hard at it
I see. So ##\frac{\partial f}{\partial y}## actually means ##\frac{\partial f}{\partial (y+\alpha\eta)}## here. But this only works because ##y## is linear in the function argument. If the function were ##f(y^2+\alpha\eta)##, then ##\frac {\partial f}{\partial y}\neq\frac{\partial f}{\partial(y+\alpha\eta)}##. In any case, I finally understand now what Taylor did. I will have to think longer about the Landau case.
 
  • #8
PeroK said:
You should definitely read my Insight!
I have read your insight. I don't see an exact parallel to how Taylor uses ##y## in his text, except for the ambiguity in ##y##. But as I see it, this ambiguity comes from the fact that Taylor uses ##y## in a rather "cavalier" way. Office_Shredder writes "this is very abused notation". So this abuse could have been avoided, and it does not seem to be an inherent notational problem.
 
  • #9
Rick16 said:
I have read your insight. I don't see an exact parallel to how Taylor uses ##y## in his text, except for the ambiguity in ##y##. But as I see it, this ambiguity comes from the fact that Taylor uses ##y## in a rather "cavalier" way. Office_Shredder writes "this is very abused notation". So this abuse could have been avoided, and it does not seem to be an inherent notational problem.
It is an inherent notational problem. When you define a function ##f##, the definition is independent of the dummy variable you choose. So, for example, all these represent the same function:
$$\sin x, \ \sin y, \ \sin \ \theta$$Moreover, the sine function has a well-defined derivative, which is the cosine function. All those functions have the same derivative and, we can write:
$$\sin' = \cos$$However, if you use the ##\frac d {dX}## notation, you are compelled to specify a dummy variable. And this is an inherent notation problem in many contexts.

The problem really comes to the fore when you have a composite function like ##\sin(y + \alpha \eta)##, whose derivative is ##\cos(y + \alpha \eta)##. To be precise, this is the derivative evaluated at that function value. And, in fact, its the well-defined derivatives of the function that appear in the Taylor series:
$$f(y + \alpha \eta) = \sum_{n = 0}^{\infty}\frac{f^{(n)}(y)(\alpha \eta)^n}{n!}$$In that expression, the function ##f## and its nth derivatives are completely unambiguous.

The confusion is created when you want to replace ##f^{(n)}(y)## with a derivative in the Leibnitz notation, which demands a dummy variable.

Rick16 said:
I see. So ##\frac{\partial f}{\partial y}## actually means ##\frac{\partial f}{\partial (y+\alpha\eta)}## here. But this only works because ##y## is linear in the function argument. If the function were ##f(y^2+\alpha\eta)##, then ##\frac {\partial f}{\partial y}\neq\frac{\partial f}{\partial(y+\alpha\eta)}##. In any case, I finally understand now what Taylor did. I will have to think longer about the Landau case.
It makes no difference what you use for a dummy variable and argument over whether it should be ##y## or ##y + \alpha \eta## is meaningless. So, for example:
$$\frac {\partial f}{\partial y} =\frac{\partial f}{\partial(y+\alpha\eta)} = f'$$It's all the same function ##f## and the same nth derivatives.
 
  • #10
Rick16 said:
I see. So ##\frac{\partial f}{\partial y}## actually means ##\frac{\partial f}{\partial (y+\alpha\eta)}## here. But this only works because ##y## is linear in the function argument. If the function were ##f(y^2+\alpha\eta)##, then ##\frac {\partial f}{\partial y}\neq\frac{\partial f}{\partial(y+\alpha\eta)}##. In any case, I finally understand now what Taylor did. I will have to think longer about the Landau case.

The Landau case, ##\frac{\partial L}{\partial v^2}## is the same thing, you could let ##x_1=v^2## and you're just doing the chain rule. ##\frac{\partial L}{\partial v^2}=\frac{\partial L}{\partial x_1}## the ##v^2## in the denominator is the author's way of just making sure you don't compute the derivative with respect to ##v## instead by accident.


I also don't really agree with @PeroK 's claim that the denominator is irrelevant, for example if ##f=f(x,y)## and then I write ##\frac{\partial f}{\partial z}## this is obviously ridiculously ambiguous. So the dummy variable is important. I found the labeling pretty confusing when I first learned this material.
 
  • #11
Office_Shredder said:
I also don't really agree with @PeroK 's claim that the denominator is irrelevant, for example if ##f=f(x,y)## and then I write ##\frac{\partial f}{\partial z}## this is obviously ridiculously ambiguous. So the dummy variable is important. I found the labeling pretty confusing when I first learned this material.
For a multi-variable function, you of course have to distinguish between the first and second arguments. Is ##\frac{\partial f}{\partial x}## always the partial derivative with respect to the first argument? Is that essentially a pre-defined notation?
 
  • #12
PeroK said:
For a multi-variable function, you of course have to distinguish between the first and second arguments. Is ##\frac{\partial f}{\partial x}## always the partial derivative with respect to the first argument? Is that essentially a pre-defined notation?

The first function in the original post, that would probably refer to the third variable actually
 
  • #13
PeroK said:
It is an inherent notational problem. When you define a function ##f##, the definition is independent of the dummy variable you choose. So, for example, all these represent the same function:
$$\sin x, \ \sin y, \ \sin \ \theta$$Moreover, the sine function has a well-defined derivative, which is the cosine function. All those functions have the same derivative and, we can write:
$$\sin' = \cos$$However, if you use the ##\frac d {dX}## notation, you are compelled to specify a dummy variable. And this is an inherent notation problem in many contexts.

The problem really comes to the fore when you have a composite function like ##\sin(y + \alpha \eta)##, whose derivative is ##\cos(y + \alpha \eta)##. To be precise, this is the derivative evaluated at that function value. And, in fact, its the well-defined derivatives of the function that appear in the Taylor series:
$$f(y + \alpha \eta) = \sum_{n = 0}^{\infty}\frac{f^{(n)}(y)(\alpha \eta)^n}{n!}$$In that expression, the function ##f## and its nth derivatives are completely unambiguous.

The confusion is created when you want to replace ##f^{(n)}(y)## with a derivative in the Leibnitz notation, which demands a dummy variable.


It makes no difference what you use for a dummy variable and argument over whether it should be ##y## or ##y + \alpha \eta## is meaningless. So, for example:
$$\frac {\partial f}{\partial y} =\frac{\partial f}{\partial(y+\alpha\eta)} = f'$$It's all the same function ##f## and the same nth derivatives.
I understand that if you have a function ##f## and you take its derivative with respect to whatever you want, you get ##f'##. If, however, you have the function ##f(x)## and you want to get ##f'(x)##, you have to take its derivative with respect to ##x##: ##\frac{df(x)}{dx}=f'(x)##. Derivatives with respect to other variables don't give ##f'(x)##: ##\frac{\partial f(x)}{\partial y}=0##.

In the case of ##f(y+\alpha\eta)##: If I have a function ##f(y)=y+\alpha\eta##, then ##\frac{\partial f(y)}{\partial y}=1##. But if my function is ##f(y+\alpha\eta)=whatever##, isn't technically ##\frac{\partial f(y+\alpha\eta)}{\partial y}=0##?
 
  • #14
I withdraw the last part of my last post. I guess technically it should be ##\frac{\partial f(y+\alpha\eta)}{\partial y}=\frac{\partial f(y+\alpha\eta)}{\partial (y+\alpha\eta)}\frac{\partial (y+\alpha\eta)}{\partial y}##
 
  • #15
Rick16 said:
I understand that if you have a function ##f## and you take its derivative with respect to whatever you want, you get ##f'##. If, however, you have the function ##f(x)## and you want to get ##f'(x)##, you have to take its derivative with respect to ##x##: ##\frac{df(x)}{dx}=f'(x)##. Derivatives with respect to other variables don't give ##f'(x)##: ##\frac{\partial f(x)}{\partial y}=0##.
Although the conclusion is somewhat correct, you are falling into the trap of taking the dummy variable ##x## as inherently part of the function. Strictly speaking ##f## is the function, and not ##f(x)##. I would make a subtle change to your notation and write:
$$\frac{\partial f}{\partial y} (x)$$That represents the partial derivative of the function with respect to ##y## (whatever that means), acting on a variable ##x##.

Then, if we define ##f(y) = \sin y##, we have ##\frac{df}{dy}(y) = \cos y## and, hence, ##\frac{df}{dy}(x) = \cos x##.

And this is relevant to the confusion you have over what Landau is doing with Taylor series.


Rick16 said:
In the case of ##f(y+\alpha\eta)##: If I have a function ##f(y)=y+\alpha\eta##, then ##\frac{\partial f(y)}{\partial y}=1##. But if my function is ##f(y+\alpha\eta)=whatever##, isn't technically ##\frac{\partial f(y+\alpha\eta)}{\partial y}=0##?
If you really want to make sense of this, then you need to define a function of three variables:
$$g(y, \alpha, \eta) = f(y+\alpha\eta)$$And now we see that:
$$\frac{\partial g}{\partial y}(y, \alpha, \eta) = f'(y+\alpha\eta) \equiv \frac{df}{dX}(y+\alpha\eta)$$And my point is that the ##X## stands for "whatever dummy variable you use to define the function ##f##". It could be ##y##, but as long as you are clear it shouldn't matter what you choose. There should be no confusion then about whether you should be using ##X \equiv y+\alpha\eta##. In this context, it makes no difference.

PS if ##f## were a multi-variable function, then we would need to make clear that, say.##X## is the first argument, ##Y## is the second argument etc. So, in Landau's example, we could use ##X = y, Y = y'##. Here ##y## and ##y'## represent the first and second arguments of the function.
 
  • #16
PeroK said:
Although the conclusion is somewhat correct, you are falling into the trap of taking the dummy variable x as inherently part of the function. Strictly speaking f is the function, and not f(x). I would make a subtle change to your notation and write:
∂f∂y(x)That represents the partial derivative of the function with respect to y (whatever that means), acting on a variable x.
I understand what you mean, and yet I wanted to check the validity of Taylor's result using the formal differentiation process with the given variables, i.e. the traditional way:

I first take the derivative of ##f## with respect to ##\alpha##:

##\frac{\partial f(y+\alpha\eta)}{\partial \alpha}=\frac{\partial f(y+\alpha\eta)}{\partial (y+\alpha\eta)}\frac{\partial (y+\alpha\eta)}{\partial \alpha}=\eta \frac{\partial f(y+\alpha\eta)}{\partial (y+\alpha\eta)}##

Then I take the derivative of ##f## with respect to ##y##:

##\frac{\partial f(y+\alpha\eta)}{\partial y}=\frac{\partial f(y+\alpha\eta)}{\partial (y+\alpha\eta)}\frac{\partial (y+\alpha\eta)}{\partial y}=\frac{\partial f(y+\alpha\eta)}{\partial (y+\alpha\eta)}##

Therefore ##\eta \frac{\partial f(y+\alpha\eta)}{\partial y}=\eta \frac{\partial f(y+\alpha\eta)}{\partial (y+\alpha\eta)}=\frac{\partial f(y+\alpha\eta)}{\partial \alpha}##

This is exactly Taylor's result: ##\frac{\partial f}{\partial \alpha}=\eta\frac{\partial f}{\partial y}##, but it was very unobvious to me. Now I finally see it.

The best way to be convinced is to convince oneself, and I am finally convinced. Thank you both for your help.
 
  • Like
Likes PeroK
  • #17
Rick16 said:
I understand what you mean, and yet I wanted to check the validity of Taylor's result using the formal differentiation process with the given variables, i.e. the traditional way:

I first take the derivative of ##f## with respect to ##\alpha##:

##\frac{\partial f(y+\alpha\eta)}{\partial \alpha}=\frac{\partial f(y+\alpha\eta)}{\partial (y+\alpha\eta)}\frac{\partial (y+\alpha\eta)}{\partial \alpha}=\eta \frac{\partial f(y+\alpha\eta)}{\partial (y+\alpha\eta)}##

Then I take the derivative of ##f## with respect to ##y##:

##\frac{\partial f(y+\alpha\eta)}{\partial y}=\frac{\partial f(y+\alpha\eta)}{\partial (y+\alpha\eta)}\frac{\partial (y+\alpha\eta)}{\partial y}=\frac{\partial f(y+\alpha\eta)}{\partial (y+\alpha\eta)}##

Therefore ##\eta \frac{\partial f(y+\alpha\eta)}{\partial y}=\eta \frac{\partial f(y+\alpha\eta)}{\partial (y+\alpha\eta)}=\frac{\partial f(y+\alpha\eta)}{\partial \alpha}##

This is exactly Taylor's result: ##\frac{\partial f}{\partial \alpha}=\eta\frac{\partial f}{\partial y}##, but it was very unobvious to me. Now I finally see it.

The best way to be convinced is to convince oneself, and I am finally convinced. Thank you both for your help.
It's probably a good time to move on. That's the imprecise "physicists" way of doing calculus. There are so many books that do it that way, so who am I to argue?
 

Similar threads

  • Calculus
Replies
1
Views
997
Replies
12
Views
1K
Replies
8
Views
1K
Replies
3
Views
1K
Replies
6
Views
1K
Replies
1
Views
1K
Replies
6
Views
4K
Replies
22
Views
539
  • Calculus and Beyond Homework Help
Replies
9
Views
633
Back
Top