Here's the link to where I found the answer. Seemingly you create the angle psi using tan(psi) = x/a and then get rid of your tan by cancelling things. I can't read that formula stuff though because I don't know the language it's written in. Feel free to have a go yourself though.
EDIT: the link would help! http://www.physicsforums.com/archive...p/t-88325.html