4
$\begingroup$

Trying to answer this question, I made the following input

FullSimplify[SeriesCoefficient[ArcTanh[x]/(1 + x^2), {x, 0, n}]]

I shall not type the results but,

  • not only they seems to be wrong (the first one is given as $\frac {8+\pi}8$ instead of $1$)

  • they cannot evaluate (Indeterminate)

What could be happening ?

$\endgroup$
12
  • 1
    $\begingroup$ yes, it is a bug. $\endgroup$
    – Nasser
    Jul 26, 2023 at 8:35
  • $\begingroup$ MMA version 13.3 Windows. For n=1 I get: 1 $\endgroup$ Jul 26, 2023 at 8:44
  • $\begingroup$ I forgot to precise that I am using version 13.1.0.0 $\endgroup$ Jul 26, 2023 at 8:46
  • 2
    $\begingroup$ MMA Version 13.3 Mac I get the incorrect result. $\endgroup$
    – 1729taxi
    Jul 26, 2023 at 8:47
  • 1
    $\begingroup$ Here's a workaround, strangely without the bug: an = D[ArcTanh[x]/(1 + x^2), {x, n}]/n!. Can check explicit terms with FullSimplify@Table[an /. x -> 0, {n, 0, 10}]. $\endgroup$
    – Michael E2
    Jul 26, 2023 at 16:28

1 Answer 1

4
$\begingroup$
$Version

(* "13.3.0 for Mac OS X ARM (64-bit) (June 3, 2023)" *)

Clear["Global`*"]

f[x_] = ArcTanh[x]/(1 + x^2);

m = 13;

seq = {#, SeriesCoefficient[f[x], {x, 0, #}]} & /@ Range[m]

(* {{1, 1}, {2, 0}, {3, -(2/3)}, {4, 0}, {5, 13/15}, {6, 0}, {7, -(76/105)}, {8, 
  0}, {9, 263/315}, {10, 0}, {11, -(2578/3465)}, {12, 0}, {13, 36979/45045}} *)

coef[n_?EvenQ] := 0

coef[n_?OddQ] = Evaluate@Assuming[Mod[n, 2] == 1,
   FindSequenceFunction[seq[[1 ;; ;; 2]], n] // FullSimplify]

(* 1/4 (2 LerchPhi[-1, 1, 1 + n/2] + π Sin[(n π)/2]) *)

Comparing with the original sequence,

seq === ({#, coef[#]} & /@ Range[m] // Simplify)

(* True *)

Checking some numeric values,

f[#] == NSum[(DownValues[coef][[2, -1]] /. n -> 2 n - 1 // 
       Simplify)*#^(2 n - 1),
    {n, 1, Infinity}, NSumTerms -> 50, WorkingPrecision -> 15] & /@
 RandomReal[1, 10, WorkingPrecision -> 15]

(* {True, True, True, True, True, True, True, True, True, True} *)
$\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.