What general shape do we expect for the potential? I get a potential that is zero most of the time, then rises sharply to 1 near x=1. Solving analytically does not give me a physical solution however, making me think that I'm doing something wrong.
RESOLVED (I think) ---- For those who run into this same issue, be aware of the indices you are passing to your epsilon function when constructing the tridiagonal matrix
Yes, that would do it. By the way, if you do find an analytic solution and it looks strange, it's likely because it involves an arctan and you're hitting some branch cuts at x=1/4; x=1/2; and x=3/4.