There is a good book by Koivo about robotic manipulators. I have derived the inverse kinematics equations only for a 5DOF, but solving for the equations for a 6DOF will not be far from how you solved for a 5DOF manipulator. Let me know if you want it.