Thanks to @OscarBenjamin, I learned that the SymPy function expand_trig()
(but not method, which I tried) does the job: indeed,
from sympy import S,expand_trig
tanh,artanh = S("tanh, artanh")
def f(n):
n=S(n)
return expand_trig(tanh(sum(artanh(k/n) for k in range(1,n))))
f(3) # does return 9/11 !