I have been trying to understand the formula
$$v_f^{2}=v_i^{2}+2V(V(1-cosβ)+v_i(cos(α-β)-cosα))$$
as it relates to Fig. 2 on page 5 of this exposition:
http://maths.dur.ac.uk/~dma0rcj/Psling/sling.pdf
The angles between the positive directions of $V$ and $(v_i,v_f)$ are denoted by $(α,α^{'})$, respectively. $β$ is the positive rotation angle of $v_i$ arrowed between the dashed lines.
I surmise that the law of cosines is at work, but I fail to see precisely how.
Can someone provide hints as to how the formula relates to Fig. 2?
(One way of answering my question is to partially/wholly derive the formula.)