# When and where do matter waves reflect?

In a common demonstration in introductions to quantum mechanics, a particle hits a rectangular potential barrier from the left; that is, the potential begins at some minimum value (say $0$), rises sharply to a finite value, remains there for some distance and then drops back down sharply to $0$. In each of the three areas, the wavefunction can be written on the form

$$\psi =Ae^{ikx}+Be^{-ikx}$$ where $$k=\sqrt{\frac{2m(E-V(x))}{\hbar^2}}$$ and then the first term corresponds to rightward motion and the second, leftward. And if the potential barrier is "higher" than the energy of the particle, then $k$ becomes imaginary and the wavefunction no longer oscillates because $ik\in \mathbb{R}$. In one of my books, it is reasoned that for the area after (to the right of) the barrier, the second term is $0$ since, as there are no other barriers to the right for the particle to be reflected from, no particles can hit the barrier from the right

What I don't understand is where can a particle be split into a reflected and a transmitted part? In this demonstration, it seems implied that it occurs at the interfaces, but what if the potential changed continously (as I assume would be the case in a real system)?

Does it have a probability of reflecting at every point where the potential changes? If so, I assume I would have to write the pre-exponential factors for the variable-potential area as functions of $V(x)$ (and hence of $x$)? On the other hand, in illustrations of linearly changing potential in the same book, the wavenumber (frequency, wavelength etc.) changes but the amplitude stays constant, but if a little of the particle was reflected everywhere, one would expect the amplitude to decrease even if $E>V$, no? My ultimate objective is to calculate the transmission probability of an electron hitting a p-n junction.

Do let me know if anything I have said is unclear.

If we have a continuously varying potential $V(x)$, then this solution to the Schrodinger equation is no longer valid and so we need to go back and find the correct solution. If we have regions where the potential is $0$ and regions where it is varying continuously we can do boundary matching between the solutions in the two regions to work out the probability of reflection from the potential.