[proofplan]
We prove the continuity equation by differentiating the density $\rho=|\psi|^2$ in time and using the Schrödinger equation, together with its complex conjugate, to replace the time derivatives. The real-valuedness of $V$ makes the potential terms cancel exactly. The remaining second-derivative expression is then identified as the negative spatial derivative of the current. For a stationary state, the density is time-independent and the current reduces to $j_\phi$, so the continuity equation forces $j_\phi$ to have zero derivative.
[/proofplan]
[step:Differentiate the probability density and substitute the Schrödinger equation]
Fix $(x,t)\in\mathbb R\times\mathbb R$. Since $\psi$ and $\partial_t\psi$ are continuous, the product rule gives
\begin{align*}
\partial_t\rho(x,t)=\partial_t\overline{\psi(x,t)}\,\psi(x,t)+\overline{\psi(x,t)}\,\partial_t\psi(x,t).
\end{align*}
Solving the Schrödinger equation for $\partial_t\psi(x,t)$ gives
\begin{align*}
\partial_t\psi(x,t)=\frac{i\hbar}{2m}\partial_x^2\psi(x,t)-\frac{i}{\hbar}V(x)\psi(x,t).
\end{align*}
Because $V(x)\in\mathbb R$, conjugating this identity gives
\begin{align*}
\partial_t\overline{\psi(x,t)}=-\frac{i\hbar}{2m}\partial_x^2\overline{\psi(x,t)}+\frac{i}{\hbar}V(x)\overline{\psi(x,t)}.
\end{align*}
Substituting these two identities into the formula for $\partial_t\rho(x,t)$, the two potential terms cancel:
\begin{align*}
\partial_t\rho(x,t)=\frac{i\hbar}{2m}\left(\overline{\psi(x,t)}\,\partial_x^2\psi(x,t)-\psi(x,t)\,\partial_x^2\overline{\psi(x,t)}\right).
\end{align*}
[guided]
Fix a point $(x,t)\in\mathbb R\times\mathbb R$. The density is the product
\begin{align*}
\rho(x,t)=\overline{\psi(x,t)}\,\psi(x,t).
\end{align*}
Since $\psi$ is continuously differentiable in $t$, its complex conjugate is also continuously differentiable in $t$, and the product rule applies:
\begin{align*}
\partial_t\rho(x,t)=\partial_t\overline{\psi(x,t)}\,\psi(x,t)+\overline{\psi(x,t)}\,\partial_t\psi(x,t).
\end{align*}
The Schrödinger equation gives the time derivative of $\psi$. Dividing
\begin{align*}
i\hbar \partial_t\psi(x,t)=-\frac{\hbar^2}{2m}\partial_x^2\psi(x,t)+V(x)\psi(x,t)
\end{align*}
by $i\hbar$ yields
\begin{align*}
\partial_t\psi(x,t)=\frac{i\hbar}{2m}\partial_x^2\psi(x,t)-\frac{i}{\hbar}V(x)\psi(x,t).
\end{align*}
We also need the time derivative of $\overline{\psi}$. Taking complex conjugates is legitimate pointwise, and the hypothesis $V:\mathbb R\to\mathbb R$ is used here: $\overline{V(x)}=V(x)$. Therefore
\begin{align*}
\partial_t\overline{\psi(x,t)}=-\frac{i\hbar}{2m}\partial_x^2\overline{\psi(x,t)}+\frac{i}{\hbar}V(x)\overline{\psi(x,t)}.
\end{align*}
Now substitute both expressions into the product-rule formula:
\begin{align*}
\partial_t\rho(x,t)=\left(-\frac{i\hbar}{2m}\partial_x^2\overline{\psi(x,t)}+\frac{i}{\hbar}V(x)\overline{\psi(x,t)}\right)\psi(x,t)+\overline{\psi(x,t)}\left(\frac{i\hbar}{2m}\partial_x^2\psi(x,t)-\frac{i}{\hbar}V(x)\psi(x,t)\right).
\end{align*}
The potential contribution is
\begin{align*}
\frac{i}{\hbar}V(x)\overline{\psi(x,t)}\psi(x,t)-\frac{i}{\hbar}V(x)\overline{\psi(x,t)}\psi(x,t)=0.
\end{align*}
This cancellation is exactly where the real-valuedness of the potential enters. What remains is
\begin{align*}
\partial_t\rho(x,t)=\frac{i\hbar}{2m}\left(\overline{\psi(x,t)}\,\partial_x^2\psi(x,t)-\psi(x,t)\,\partial_x^2\overline{\psi(x,t)}\right).
\end{align*}
[/guided]
[/step]
[step:Define the current and identify its derivative with the remaining term]
Define the probability current $j_\psi:\mathbb R\times\mathbb R\to\mathbb R$ by
\begin{align*}
j_\psi(x,t)=\frac{\hbar}{m}\operatorname{Im}\!\left(\overline{\psi(x,t)}\,\partial_x\psi(x,t)\right).
\end{align*}
Define the complex-valued function $A:\mathbb R\times\mathbb R\to\mathbb C$ by
\begin{align*}
A(x,t)=\overline{\psi(x,t)}\,\partial_x^2\psi(x,t).
\end{align*}
Then $\psi(x,t)\,\partial_x^2\overline{\psi(x,t)}=\overline{A(x,t)}$, so
\begin{align*}
\partial_t\rho(x,t)=\frac{i\hbar}{2m}\left(A(x,t)-\overline{A(x,t)}\right)=-\frac{\hbar}{m}\operatorname{Im}A(x,t).
\end{align*}
Because $\psi$ is $C^2$ in $x$, the product rule applies to $\overline{\psi}\,\partial_x\psi$. Differentiating the current in $x$ gives
\begin{align*}
\partial_x j_\psi(x,t)=\frac{\hbar}{m}\operatorname{Im}\!\left(\partial_x\overline{\psi(x,t)}\,\partial_x\psi(x,t)+\overline{\psi(x,t)}\,\partial_x^2\psi(x,t)\right).
\end{align*}
The first term satisfies
\begin{align*}
\partial_x\overline{\psi(x,t)}\,\partial_x\psi(x,t)=|\partial_x\psi(x,t)|^2\in\mathbb R,
\end{align*}
so it has zero imaginary part. Hence
\begin{align*}
\partial_x j_\psi(x,t)=\frac{\hbar}{m}\operatorname{Im}A(x,t).
\end{align*}
Combining the two displayed identities gives
\begin{align*}
\partial_t\rho(x,t)+\partial_x j_\psi(x,t)=0.
\end{align*}
Since $(x,t)$ was arbitrary, the continuity equation holds on $\mathbb R\times\mathbb R$.
[guided]
The previous step reduced the time derivative of the density to the imaginary part of one second-derivative expression. We now define the current as the quantity whose spatial derivative produces the same expression with the opposite sign. Define $j_\psi:\mathbb R\times\mathbb R\to\mathbb R$ by
\begin{align*}
j_\psi(x,t)=\frac{\hbar}{m}\operatorname{Im}\!\left(\overline{\psi(x,t)}\,\partial_x\psi(x,t)\right).
\end{align*}
This is a real-valued function because the imaginary-part operator has values in $\mathbb R$.
Define $A:\mathbb R\times\mathbb R\to\mathbb C$ by
\begin{align*}
A(x,t)=\overline{\psi(x,t)}\,\partial_x^2\psi(x,t).
\end{align*}
Since conjugation commutes with the $x$-derivatives under the assumed $C^2$ regularity in $x$, we have
\begin{align*}
\psi(x,t)\,\partial_x^2\overline{\psi(x,t)}=\overline{A(x,t)}.
\end{align*}
Thus the identity obtained in the first step becomes
\begin{align*}
\partial_t\rho(x,t)=\frac{i\hbar}{2m}\left(A(x,t)-\overline{A(x,t)}\right).
\end{align*}
For any complex number $z$, $z-\overline z=2i\operatorname{Im}z$. Applying this with $z=A(x,t)$ gives
\begin{align*}
\partial_t\rho(x,t)=-\frac{\hbar}{m}\operatorname{Im}A(x,t).
\end{align*}
Now compute the spatial derivative of the current. The product rule is valid because $\psi$ is $C^2$ in $x$, so $\overline{\psi}$ is $C^2$ in $x$ and $\partial_x\psi$ is $C^1$ in $x$. Therefore
\begin{align*}
\partial_x j_\psi(x,t)=\frac{\hbar}{m}\operatorname{Im}\!\left(\partial_x\overline{\psi(x,t)}\,\partial_x\psi(x,t)+\overline{\psi(x,t)}\,\partial_x^2\psi(x,t)\right).
\end{align*}
The first product is real because
\begin{align*}
\partial_x\overline{\psi(x,t)}\,\partial_x\psi(x,t)=\overline{\partial_x\psi(x,t)}\,\partial_x\psi(x,t)=|\partial_x\psi(x,t)|^2\in\mathbb R.
\end{align*}
Its imaginary part is therefore zero, and the remaining term is exactly $A(x,t)$. Hence
\begin{align*}
\partial_x j_\psi(x,t)=\frac{\hbar}{m}\operatorname{Im}A(x,t).
\end{align*}
The two formulas have opposite signs, so
\begin{align*}
\partial_t\rho(x,t)+\partial_x j_\psi(x,t)=0.
\end{align*}
Since the point $(x,t)$ was arbitrary, this pointwise identity holds on all of $\mathbb R\times\mathbb R$.
[/guided]
[/step]
[step:Apply the continuity equation to a stationary state]
Assume now that $E\in\mathbb R$, that $\phi:\mathbb R\to\mathbb C$ is $C^2$, and that $\phi$ satisfies the stationary Schrödinger equation
\begin{align*}
-\frac{\hbar^2}{2m}\phi''(x)+V(x)\phi(x)=E\phi(x)
\end{align*}
for every $x\in\mathbb R$. Define $\psi:\mathbb R\times\mathbb R\to\mathbb C$ by
\begin{align*}
\psi(x,t)=e^{-iEt/\hbar}\phi(x).
\end{align*}
This $\psi$ satisfies the hypotheses of the time-dependent part and solves the time-dependent Schrödinger equation, because
\begin{align*}
i\hbar\partial_t\psi(x,t)=E e^{-iEt/\hbar}\phi(x)
\end{align*}
and
\begin{align*}
-\frac{\hbar^2}{2m}\partial_x^2\psi(x,t)+V(x)\psi(x,t)=e^{-iEt/\hbar}\left(-\frac{\hbar^2}{2m}\phi''(x)+V(x)\phi(x)\right)=E e^{-iEt/\hbar}\phi(x).
\end{align*}
Moreover
\begin{align*}
\rho(x,t)=|e^{-iEt/\hbar}\phi(x)|^2=|\phi(x)|^2,
\end{align*}
so $\partial_t\rho(x,t)=0$. Define $j_\phi:\mathbb R\to\mathbb R$ by
\begin{align*}
j_\phi(x)=\frac{\hbar}{m}\operatorname{Im}\!\left(\overline{\phi(x)}\,\phi'(x)\right).
\end{align*}
The current associated to $\psi$ is
\begin{align*}
j_\psi(x,t)=\frac{\hbar}{m}\operatorname{Im}\!\left(\overline{e^{-iEt/\hbar}\phi(x)}\,e^{-iEt/\hbar}\phi'(x)\right)=\frac{\hbar}{m}\operatorname{Im}\!\left(\overline{\phi(x)}\,\phi'(x)\right)=j_\phi(x).
\end{align*}
Applying the continuity equation already proved gives
\begin{align*}
0=\partial_t\rho(x,t)+\partial_x j_\psi(x,t)=\partial_x j_\phi(x).
\end{align*}
Thus $j_\phi'(x)=0$ for every $x\in\mathbb R$. Since $\mathbb R$ is connected and $j_\phi$ is differentiable with zero derivative everywhere, $j_\phi$ is independent of $x$.
[guided]
We now specialize the identity just proved to the separated form of a stationary state. Assume $E\in\mathbb R$, let $\phi:\mathbb R\to\mathbb C$ be $C^2$, and assume that $\phi$ solves the stationary equation
\begin{align*}
-\frac{\hbar^2}{2m}\phi''(x)+V(x)\phi(x)=E\phi(x)
\end{align*}
for every $x\in\mathbb R$. Define $\psi:\mathbb R\times\mathbb R\to\mathbb C$ by
\begin{align*}
\psi(x,t)=e^{-iEt/\hbar}\phi(x).
\end{align*}
Because the exponential factor is smooth in $t$ and independent of $x$, while $\phi$ is $C^2$ in $x$, this $\psi$ has the regularity required in the first part.
We verify the time-dependent equation directly. Differentiating in $t$ gives
\begin{align*}
i\hbar\partial_t\psi(x,t)=E e^{-iEt/\hbar}\phi(x).
\end{align*}
Differentiating twice in $x$ gives $\partial_x^2\psi(x,t)=e^{-iEt/\hbar}\phi''(x)$. Therefore
\begin{align*}
-\frac{\hbar^2}{2m}\partial_x^2\psi(x,t)+V(x)\psi(x,t)=e^{-iEt/\hbar}\left(-\frac{\hbar^2}{2m}\phi''(x)+V(x)\phi(x)\right).
\end{align*}
Using the stationary equation, the right-hand side becomes
\begin{align*}
E e^{-iEt/\hbar}\phi(x),
\end{align*}
which equals $i\hbar\partial_t\psi(x,t)$. Thus the continuity equation applies to this $\psi$.
The density is independent of time because the phase has modulus one:
\begin{align*}
\rho(x,t)=|e^{-iEt/\hbar}\phi(x)|^2=|\phi(x)|^2.
\end{align*}
Hence $\partial_t\rho(x,t)=0$. Define $j_\phi:\mathbb R\to\mathbb R$ by
\begin{align*}
j_\phi(x)=\frac{\hbar}{m}\operatorname{Im}\!\left(\overline{\phi(x)}\,\phi'(x)\right).
\end{align*}
The current for $\psi$ reduces to this function because the conjugate phase and the phase cancel:
\begin{align*}
j_\psi(x,t)=\frac{\hbar}{m}\operatorname{Im}\!\left(\overline{e^{-iEt/\hbar}\phi(x)}\,e^{-iEt/\hbar}\phi'(x)\right)=j_\phi(x).
\end{align*}
Substituting $\partial_t\rho(x,t)=0$ and $j_\psi(x,t)=j_\phi(x)$ into the continuity equation gives
\begin{align*}
0=\partial_t\rho(x,t)+\partial_x j_\psi(x,t)=\partial_x j_\phi(x).
\end{align*}
Therefore $j_\phi'(x)=0$ for every $x\in\mathbb R$. Since $\mathbb R$ is connected and $j_\phi$ is differentiable with zero derivative everywhere, $j_\phi$ is constant on $\mathbb R$, so it is independent of $x$.
[/guided]
[/step]