Interpretation of Variation Notes I would like an explanation to how this Lagragian partial derivative was taken (eq. 3). This probably is more suited for the math Stack Exchange, however this is for a physics course which is why I am posting here. Based on the definition of a Taylor expansion:

I don't understand how or why it is only the partial is wrt $q_i$ and not all the other variables for the second term, along with why it's only wrt $\dot{q}_i$ in the third term. Moreover, it seems that there are no constants that are being multiplied against each function nor whatever the $(x-a)$ term could be. The full derivative is defined in eq. 5 but it doesn't match up with what the full derivatives in eq. 3 should be:

A full breakdown of the math would be appreciated, or at least a general, formulaic explanation.
 A: Your definition of the Taylor series in one variable to first-order derivatives is
$$
f(x) = f(a) + \frac{\partial f}{\partial x}(a)(x-a)
$$
Notice we neglect higher-order terms. In two variables this would look like
$$
f(x_1,x_2) = f(a_1,a_2) + \frac{\partial f}{\partial x_1}(a_1,a_2)(x_1-a_1)+ \frac{\partial f}{\partial x_2}(a_1,a_2)(x_2-a_2)
$$
Let us change notation so that $\delta x = (x-a)$, which represents an infinitesimal shift in the parameters. The above Taylor series is
$$
f(x_1,x_2) = f(a_1,a_2) + \frac{\partial f}{\partial x_1}(a_1,a_2)\delta x_1+ \frac{\partial f}{\partial x_2}(a_1,a_2)\delta x_2
$$
Now, what happens if we had lots of variables? We can modify the above expression to
$$
f(\vec x) = f(\vec a) + \sum_i\frac{\partial f(\vec a)}{\partial x_i}\delta x_i
$$
Now, what happens if half of the variables are naturally grouped together (all the positions and all the velocities too), why don't we write this for each dimension $i$, specifically pulling out both variable types!
$$
f(x_1, \dots,x_n,y_1,\dots ,y_n) = f(\vec a) + \sum_i\frac{\partial f}{\partial x_i}(\vec a)\delta x_i+ \sum_i\frac{\partial f}{\partial y_i}(\vec a)\delta y_i
$$
but, given the Einstein summation notation, we know that the summation is implied so we could drop the summation signs if we liked.
The action is defined by
$$
S = \int L(q_1,\dots ,q_n,v_1,\dots ,v_n,t)dt 
$$
where $q_i$ and $v_i$ are the position and velocity in each dimension. A variation in the action is the first order Taylor series in the positions and velocities minus the un-peturbed action.
$$
\delta S = \int dt\bigg\{L(q_1,\dots ,q_n,v_1,\dots ,v_n,t) + \sum_i\frac{\partial L}{\partial q_i}\delta q_i+ \sum_i\frac{\partial L}{\partial v_i}\delta v_i\bigg\} - \int L(q_1,\dots ,q_n,v_1,\dots ,v_n,t)dt 
$$
Which simplifies to
$$
\delta S = \int dt\bigg\{ \sum_i\frac{\partial L}{\partial q_i}\delta q_i+ \sum_i\frac{\partial L}{\partial v_i}\delta v_i\bigg\}
$$
Which is your final result. To arrive at the Euler-Lagrange equations, we can then set $v_i=\dot q_i$ (i.e. only when the velocity is the time derivative of the position is the solution an extremal path of the action, but that's just details).
$$
\delta S = \int dt\bigg\{ \sum_i\frac{\partial L}{\partial q_i}\delta q_i+ \sum_i\frac{\partial L}{\partial \dot q_i}\delta \dot q_i\bigg\}
$$
In order to proceed with this expression, it is useful to collect the variations in each dimension so we can pull them out of the equation together. This can be achieved since $\dot q_i = d_tq_i$ and hence the final term can be integrated by parts to yield
$$
\delta S = \int dt\bigg\{ \sum_i\frac{\partial L}{\partial q_i}-\sum_i\frac{d}{dt} \frac{\partial L}{\partial \dot q_i}\bigg\}\delta q_i + \delta q_i\frac{\partial L}{\partial \dot q_i}\bigg|^2_1
$$
The final term is a boundary term and this vanishes due to the imposition that the variation vanishes at this point i.e. $\delta q=0$. You result in the Euler-Lagrange equation after imposing only extremal solutions $\delta S=0$.
