Intro
Thank you for reading.
This question extends past physics, but the video on Lagrangian Dynamics (linked at end) is what motivated it.
(Even if you are not comfortable with the physics, I don't think its really necessary to understand my question...ignore the parts you don't understand, and read on till the end!!!)
Part I Understand:
Say we have some function, $U(x)$, where $x=\bar{x}$ is a specific input. We want to compute... $$U(\bar{x}+\eta)$$
...where $\eta$ is a small change in $\bar{x}$ that takes us to $x$. Using a Taylor series, we can rewrite the above as:
$$U(\bar{x})+U'(\bar{x})\eta+\frac{U''(\bar{x})}{2}\eta^2+...+\mathcal{O}(\eta^3)$$
So long as $\eta$ is small, the above will approximate the function well at $x$. I'm comfortable with this idea.
Part I don't Understand
In the video, there is some potential energy function $U(x(t))$ and some kinetic energy function $T(x(t))$. Each of them takes in a path $x(t)$. The former and spits out the potential energy at each point along that path, while the latter spits out the kinetic energy at each point along the path.
The ultimate goal of the video (not necessary to understand, but just for context) is to minimize this integral, by choosing some path:
$$\int_0^t{T(x(t))-U(x(t))}dt$$
An arbitrary path $x(t)$ can be written as the sum of a specific $\bar{x}(t)$ and another path $\eta(t)$.
$$x(t)=\bar{x}(t)+\eta(t)$$
So, computing $U(x(t))$ is the same thing as computing $U(\bar{x}(t)+\eta(t))$.
And...here is where I get lost. In the video, he says that we can expand out $U(\bar{x}(t)+\eta(t))$ into...
$$U(\bar{x})+U'(\bar{x})\eta+\frac{U''(\bar{x})}{2}\eta^2+...+\mathcal{O}(\eta^3)$$
...and so long as $\eta$ is small, this will be a good approximation of $U(x)$, and if we plug in this series approximation into the functions in the integral, we can minimize it instead of minimizing the actual function.
However, the difference between this Taylor series and the one mentioned at the beginning is that this one is expanding out a function that takes in other functions, while the original is expanding out a function that takes in a free variable. I have never seen Taylor series used in this way.
Can someone explain/justify why we can expand out functions which take in functions using Taylor Series?
Thanks again.
Mentioned Video:
https://www.youtube.com/watch?v=PsougOgaBy0&list=PLTAnYeruJqLeW0sK3Gzwh2VxAPEhI8RWc&index=3