I want to solve the derivative $\frac{d^{2}\psi}{dx^{2}}$ for $\psi(x) = Ae^{iu(x)}$. Here, A is a constant, $u = u(x)$ and $i$ is the complex number.
The answer for this has been given as: $i \frac{d^{2}u(x)}{dx^{2}} \psi(x) - (\frac{du(x)}{dx})^{2}\psi(x)$.
However, I keep getting something like this:
$$2i\frac{du(x)}{dx}(\frac{d^{2}u(x)}{dx^{2}})\psi(x) - (\frac{du(x)}{dx})^{4}\psi(x).$$
I used the chain rule and then the product rule to get this.
Could someone start me off on the right path with this?
Using the chain rule, we have $$\frac{dψ}{dx} = Ai\left(\frac{du}{dx}\right)e^{iu(x)} = i\left(\frac{du}{dx}\right)ψ(x).$$ Then, using the product rule and the above, $$\frac{d^2ψ}{dx^2} = i\left(\frac{d^2u}{dx^2}\right)ψ(x) + i\left(\frac{du}{dx}\right)\frac{dψ}{dx}.$$ Now with $i^2 = -1$ we conclude $$\frac{d^2ψ}{dx^2} = i\left(\frac{d^2u}{dx^2}\right)ψ(x) + i\left(\frac{du}{dx}\right)\cdot i\left(\frac{du}{dx}\right)ψ(x) = i\left(\frac{d^2u}{dx^2}\right)ψ(x) - \left(\frac{du}{dx}\right)^2 ψ(x).$$