Let's start from the general formula You can find in any 'Manual of Math' valid for ...

(1)

Now we define...

(2)

... and compute...

(3)

From (3) and (1), setting and we obtain...

(4)

... from which we derive ...

(5)

... and finally, setting in (5), we obtain...

(6)

At first it seems that the result (6) is not correct ... but using the fact that...

... You find that (6) is equivalent to the expression given by chiph588 ...

Kind regards