supposed I have a function which is $q_2f_2(δq_1+q_2)$
I want to know the second derivative of the function w.r.t $q_2$ Firstly, I took the first derivative w.r.t to $q_2$ and I got the result as follow $$q_2\frac{d(δq_1+q_2)}{dq_2}\frac{df_2(δq_1+q_2)}{d(δq_1+q_2)}+f_2(δq_1+q_2)$$
I tried to take second derivative and I got the following result. $$q_2\frac{d}{dq_2}{(\frac{df_2(δq_1+q_2)}{d(δq_1+q_2)})}+\frac{df_2(δq_1+q_2)}{d(δq_1+q_2)}+\frac{d(δq_1+q_2)}{dq_2}\frac{df_2(δq_1+q_2)}{d(δq_1+q_2)}$$ I have a problem to solve the following part $$ \frac{d}{dq_2}{(\frac{d f_2(δq_1+q_2)}{d(δq_1+q_2)})} $$ Any help would be appreciated Thanks
$$\frac{\partial}{\partial q_2}\Bigg(q_2f_2(\delta q_1 + q_2)\Bigg) = f_2(\delta q_1 + q_2) + q_2f_2'(\delta q_1 + q_2)\dot \ 1$$
Now for the second derivative
$$\frac{\partial}{\partial q_2}\Bigg(f_2(\delta q_1 + q_2) + q_2f_2'(\delta q_1 + q_2)\Bigg)$$
and again use the product and chain rule.