If you want to know how the equations are derived, check out the video where I explain it: