I need to find the partial derivative of the action $S$ with respect to the generalized coordinate $q(t_f)$ and according to my textbook, it should equal the generalized momentum $p(t_f)$.
I have a solution but I'm not sure if it is valid.
Equations are:
$$S = \int_{t_i}^{t_f} L \, dt$$
and
$$q_i = 0 \, .$$
I took the partial derivative of both sides with respect to the generalized coordinate $q$ to get
$$\frac{\partial S}{\partial q}= \int_{t_i}^{t_f} \frac{\partial L}{\partial q} \, dt = \int_{t_i}^{t_f} \dot{p} \, dt = p(t_f) - p(t_i) \, .$$
Since $q_i = 0$ then $p(t_i) = 0$ and therefore $(\partial S / \partial q)(t_f) = p(tf)$.
Is this a possible solution?