# Question on deriving the functional derivative

When I taylor expand as the author says, I get

$$\int_{}^{} \delta x\frac{\partial f}{\partial x} +\delta \dot{x}\frac{\partial f}{\partial \dot{x} } + \frac{1}{2}\left(\delta x^{2}\frac{\partial ^{2}f}{\partial x^{2 }}+2\delta x\delta \dot{x} \frac{\partial ^{2}f}{\partial x \partial \dot{x}} +(\delta \dot{x})^{2}\frac{\partial ^{2}f}{\partial \dot{x}^{2}} \right)+ \dots - f(x,\dot{x},t )dt.$$ I do not understand how the author gets the $$O(\delta ^2)$$ term.

Question: How does the author get the $$O (\delta ^2)$$ term?

The key thing to resolving this is that you should write $$\delta{\dot{x}}$$ instead of your $$\delta{y}$$, and then relate $$\delta{\dot{x}}$$ to $$\delta{x}$$ via an integration by parts. This is because your functional depends only on $$x$$, hence a variation of $$x$$ induces a variation in $$\dot{x}$$; so their variations are not independent. Ill work with the cross term and leave the other parts to you.

So you have $$\int...+\bigg(\delta{x}\delta{\dot{x}} \dfrac{\partial^2 f}{\partial x \partial \dot{x}}\bigg)+...$$

This is the correct way to write the cross term; for some reason you also have an extra $$\partial$$ sitting there; be sure to check this is the correct way to write this; again this is just taylor expansion (at least if you are working in a physics setting; it needs a bit more mathematical care if you're doing it fully rigorously).

The above can be rewritten as:

$$\int...+\bigg(\delta{x} \dfrac{d(\delta{x})}{dt} \dfrac{\partial^2 f}{\partial x \partial \dot{x}}\bigg)+...$$

$$=\int...+\bigg(\dfrac{1}{2} \dfrac{d((\delta{x})^2)}{dt} \dfrac{\partial^2 f}{\partial x \partial \dot{x}}\bigg)+...$$

Hence if you integrate by parts:

$$=\int...+\bigg(-\dfrac{1}{2} \delta{x}^2 \dfrac{d}{dt} \Big(\dfrac{\partial^2 f}{\partial x \partial \dot{x}}\Big)\bigg)+...$$

Which is the desired $$O(\delta{x}^2)$$ term.

• Hi, apologies for the typos in the post. Do you know how we deal with the $(\delta \dot x ^2)$ term? Aug 17, 2022 at 13:31
• @MathsWizzard: Here is a much easier way to see all this. When physicists write something like $\delta x$ they actually mean that to be $\epsilon \eta$ for some real parameter $\epsilon$ and $\eta$ an arbitrary well behaved test function. Hence $\delta x=\epsilon \eta$ and $\delta \dot{x}=\epsilon \dot{\eta}$. Now it's easy to see that whenever you have two such terms (whether they are cross terms or not), they are of order $\epsilon^2$ which is what the author means. Aug 17, 2022 at 14:02
• Hi, thanks for the comment. Could you elaborate what you mean by well behaved function? Is it that we are requiring differentiable or do we need more? Aug 17, 2022 at 22:12
• @MathsWizzard: Since the integrand depends only on $x$ and its first derivative; it suffices for $\eta$ to be $C^1$ i.e, continuously differentiable. Aug 17, 2022 at 23:10
• Hi, thanks for the response. Just to make sure I am understanding this correctly, is it only in this context that we can consider infinitesimal changes as such functions or do we also consider this when dealing derivatives with the standard sense? Aug 18, 2022 at 9:09