3
$\begingroup$

I have the following expression that I need to series expand, around t=0

(PolyLog[3, 1 + Tanh[J t]] - PolyLog[3, 1 - Tanh[J t]])Tanh[J t]

The amount of time to calculate one extra term is kind of just blowing up exponentially. I need at least 30 terms but for 20 terms only my time exceeded more than 30mins. To further speed up the process, I tried to use Assumptions command, with t>0, but it didn't help either. Infact I further tried to simply and do the series expansion of following expression around t=0

(PolyLog[3, 1 + t] - PolyLog[3, 1 - t])

and found that it is time taking too. I want to know if it is possible to simplify somehow the expression that I have in order to speed up the process? Or if there is some other way to find the Series expansion faster and efficiently?

Edit: I found with a little bit of experimentation that, the expansion of the Polylog is fast. In case instead of PolyLog[3, 1 + Tanh[J t]] if I had PolyLog[3, Tanh[J t]] then the series expansion around t=0 is pretty quick even up to 50 terms.

$\endgroup$
5
  • 4
    $\begingroup$ Series expansion of what parameter t or J ? About what point ? Give details ? I don't have time to guess. $\endgroup$ Aug 29, 2022 at 9:45
  • $\begingroup$ I have edited and specified around t=0. I was also wondering if doing it on a different version of Mathematica will change things. I tried it and found that it is bit faster in Mathematica 12 $\endgroup$
    – Erosannin
    Aug 29, 2022 at 10:56
  • $\begingroup$ I would do the expansion with J=1 first and substitute t->J t afterwards $\endgroup$
    – mikado
    Aug 29, 2022 at 11:05
  • $\begingroup$ I'm interested in why you need such a high order expansion. Might numerical interpolation give a better result? $\endgroup$
    – mikado
    Aug 29, 2022 at 11:46
  • $\begingroup$ I need such a high-order expansion as the expansion coefficients are "moments", and there are specific "differences"(in comparison with other results that I have) I will get in these moments, which are enhanced when I take the higher-order ones. At low order, these "differences" are not so prominent. So one or the other way I need to calculate those "coefficients"! $\endgroup$
    – Erosannin
    Aug 29, 2022 at 13:13

1 Answer 1

5
$\begingroup$

Not a full answer. Some hints.

Since function is symmetric, treat even and odd SeriesCoefficients differently.

f[t_, J_] = (PolyLog[3, 1 + Tanh[J t]] - 
     PolyLog[3, 1 - Tanh[J t]]) Tanh[J t];

f[x, J] == f[-x, J] // Simplify      (*   True   *)

(tab = Table[{2 n, 
      SeriesCoefficient[f[t, J], {t, 0, 2 n}, 
       Assumptions -> t > 0 && J > 0]}, {n, 1, 7}] // 
    Expand) // TableForm

(tab = Table[{2 n - 1, 
      SeriesCoefficient[f[t, J], {t, 0, 2 n - 1}, 
       Assumptions -> t > 0 && J > 0]}, {n, 1, 7}] // 
    Expand) // TableForm

Leave it to you to find a systematic dependence on 2 n and 2 n-1. This is only valid for t>0 && J>0.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.