I'm not that good with math, but somehow ended up solving for $ \int { \ln { (\cosh x) } } \cdot dx $. This has led me to the answer described here. In my case, I need a solution for x > 1, consequently ending up with a negative input for the spence function.
I was going to use this npm package, but the docs explicitly state that the Spence's function is not defined on negative input. However, I found a peculiar identity described in the wikipedia article and here (eqn 1.8):
$$ Li_2(z) + Li_2(-z) = \dfrac {1} {2} Li_2(z^2) $$
My question is, if we have this identity above, wouldn't we able to define dilogarithm function on negative numbers? I have tried a rough plot on desmos with the summation definition: $ \sum_n^{50} {\dfrac {x^n} {n^2}} $, though not perfect it was usable as a good approximation. Is something wrong here, or can the dilogarithm function be defined for negative numbers as well?