since you already know the form of the solution it is just a matter of determining the constants from the boundary conditions.
Try solving by hand for different types of boundary conditions. Watch the mental process and the algebra you do to get the constant values. Write out a list of the steps in the process. From this list you can automate the process in software.
You can use the finite difference method to find the solution of Schrodinger's equation.
Anyway, Your question is not clearly since you have to know the potential type.
In addition to, you can use the Lapack++ package to solve the Schrodinger's equation.