Question: How to integrate a trig function with parameter?

How to integrate this function (n::posint) :
f := (n, x) -> (1 - cos(n*x))/(1 - cos(x))

Maple is not returning a result. It seems unable to establish the connection with the Dirichlet kernel. Is there a solution that doesn't require forcing a decomposition into a sum of cosinus?

Thank you for your help.

Best regards.

Please Wait...