Eigenvalue Problem of Hamiltonian of Single Cooper Pair Box

I am facing problem to determine the eigenvalue (energy) from the Hamiltonian of Cooper pair box,
H ?=4Ec (-i?/??-n)^2 ?(?)-Ej cos(?) ?(?)=Ek ?(?).

I have used ‘DSolve’ in Mathematica to find eigenfunction as follow,

DSolve[4Ec(-?‘’[?]+2?n?'[?]+n^2?[?])-EjCos[?]?[?]==Ek?[?],?[?],?]

{{?[?]??^?n? C[1]MathieuC[Ek/Ec,-Ej/2Ec,?/2]+?^?n? C[2]MathieuS[Ek/Ec,-Ej/2Ec,?/2]}}

But I can’t find any particular procedure to get eigenvalue Ek in terms of n. In some paper it is given as

Ek(n)=Ec MathieuCharacteristicA [1+k-(1+k) mod 2 + 2 n (-1)^k,-2Ej/Ec]

I am a newly Mathematica user so if anyone has the procedure to determine eigenvalue of Hamiltonian, please let me know.

You need to find what values of the energy give wavefunctions that satisfy the boundary conditions.