First solution:
can be expressed as
So
Useful formulas:
Let
then
Note
can be written as
So