I was reading this paper, Wavefunctions and Hamilton-Jacobi Equation by Sabrina Pasterski. The author started with the Hamiltonian formalism and then came up with a connection to the Schrodinger equation. There was a technical point in the calculation (equation 6) that I did not understand. Quoting from the paper:
Acting twice on $e^{i \frac{S}{\hbar}}$ with $\hat p_j=\frac{\hbar}{i}\partial_{q_j}$ introduces corrections of order $\mathcal O (\hbar)$ to the value of $p^2_j \cdot e^{i \frac{S}{\hbar}}$:
$$\hat p_j^2 e^{i \frac{S}{\hbar}}=(\frac{\hbar}{i}\partial_{q_j})^2 e^{i \frac{S}{\hbar}} = [(\frac{\partial S}{\partial q_j})^2 + \frac{\hbar}{i} \frac{\partial^2S}{\partial q_j^2}]e^{i \frac{S}{\hbar}}.$$
What I do not understand is, how does acting twice on $e^{i \frac{S}{\hbar}}$ with $\hat p_j=\frac{\hbar}{i}\partial_{q_j}$ introduces corrections of order $\mathcal O (\hbar)$ to the value of $p^2_j \cdot e^{i \frac{S}{\hbar}}$? That is, how do you get the last equality? Can someone please help me understand this?