Depends... if the particle is to be bounded in a 1-D infinite potential well then a linearly-varying potential gives rise to Airy function solutions and hence the eigenvalues are inherently numerical (I remember this distinctly from a recent Mathematica simulation of a stationary electric field perturbing an electron confined to a 1-D box). You can find a derivation in David Miller's Quantum book. If the walls are finite then the numerical solution is more difficult to find.