9

Backslide introduced in 11.1, fixed in 11.2.


In Mathematica 11.0, the following limit,

Limit[Power[Sqrt[((1 - 4 n)/(3 n + 2))^(3 n)]^2, (n)^-1], n -> ∞]

gave me an answer of $e^{6 \operatorname{arctanh}(1/7)}$, which equals 64/27, but in Mathematica 11.1, it doesn't give an answer. Anyone else experience this problem?

Granted, with Mathematica 11.1.0, this does work:

Limit[Power[RealAbs[((1 - 4 n)/(3 n + 2))^(3 n)], (n)^-1], n -> ∞]

Giving a correct answer of 64/27.

Update: Due to Anjan Kumer's suggestion, I tried:

Limit[Power[Sqrt[((1 - 4 n)/(3 n + 2))^(3 n)]^2, (n)^-1], 
  n -> \[Infinity]] // PowerExpand

But it gave an incorrect answer of $-64/27$.

Update #2: I believe there has been some editing to my question. This question arises when we are using the Root Theorem in calculus, which requires that we investigate $$\lim_{n\to\infty}\sqrt[n]{|a_n|}$$ in order to determine if the series $\sum_{n=1}^{\infty}a_n$ converges. Due to difficulties with Mathematica's Abs command over the years, and the fact that $\sqrt{x^2}=|x|$, we frequently use this fact to avoid difficulties. Thus, using the Root Test to determine the convergence of the series $$\sum_{n=1}^{\infty}\left(\frac{1-4n}{3n+2}\right)^{3n}$$ requires that we evaluate the limit: $$\lim_{n\to\infty}\sqrt[n]{\left|\left(\frac{1-4n}{3n+2}\right)^{3n}\right|}$$ Now, I made a mistake and used the absolute value bars in the Writing Assistant in my input. Now, I note that the following works and gives the correct answer (I am copying and pasting an image of my input and output).

enter image description here

Now, notice what happens when I try to use the fact that $\sqrt{x^2}=|x|$ (Again, I am copying and pasting an image of my input and output).

enter image description here

See, the exponent 2 is inside the Sqrt brackets, not outside. However, again a different answer.

xzczd
  • 65,995
  • 9
  • 163
  • 468
David
  • 14,883
  • 4
  • 44
  • 117
  • Doesn't return any answer on MMA 11.1.0. You can get an answer by using PowerExpand. – Anjan Kumar Apr 06 '17 at 07:17
  • @AnjanKumar I tried PowerExpand, but it gave a wrong answer. See my update to my original post. – David Apr 06 '17 at 15:43
  • The function Power[Sqrt[((1 - 4 n)/(3 n + 2))^(3 n)]^2, (n)^-1] is complex-valued. Its limit as n approaches ComplexInfinity does not exist at all. – user64494 Apr 06 '17 at 18:38
  • 6
    This will be investigated. – Daniel Lichtblau Apr 07 '17 at 15:11
  • See also the discussion here: http://mathematica.stackexchange.com/questions/89054/why-doesnt-mathematica-evaluate-this-simple-limit?rq=1 – Dimitris Apr 08 '17 at 00:13
  • This reminds me very much of this problem, and I would suggest that my answer to that problem, or rather my series of cautionary statements regarding real vs. complex limits, applies (in spirit, if not in exact content) to this question as well: https://mathematica.stackexchange.com/questions/49167/why-is-this-infinite-series-wrongly-computed-by-mathematica/57023#57023 – Kellen Myers May 19 '18 at 11:38

4 Answers4

6

I'm struggling to see what the question is, other than "Anyone else experience this problem?", which I guess comes down to, "Can others confirm this is a backslide and that I haven't messed up something?" There is a certain amount of noise surrounding the question: the initial mis-coding of the absolute value and the abuse of PowerExpand in particular. This makes it unclear to me whether more is being sought.

Workarounds

The OP has already noted that coding the source problem (n-th root test) with the usual absolute value Abs works:

Limit[Power[Abs[((1 - 4 n)/(3 n + 2))^(3 n)], (n)^-1], n -> ∞]
(*  64/27  *)

Here is another workaround.

Limit[
 Series[Power[Sqrt[((1 - 4 n)/(3 n + 2))^(3 n)]^2, (n)^-1], {n, ∞, 1}],
 n -> Infinity]
(*  64/27  *)

And another, which perhaps is the best representation of the OP's intended computation bypassing Abs:

Limit[
 Power[Sqrt[(((1 - 4 n)/(3 n + 2))^(3 n))^2], (n)^-1], 
 n -> ∞,
 Assumptions -> n > 0 && n ∈ Integers]
(*  64/27  *)

Problem with PowerExpand

PowerExpand willy-nilly combines the exponents, effectively assuming the bases are positive. That hypothesis is not true in this case, so the result is bogus (due to user error, not an error in Mathematica). Both the incorrect Sqrt[x]^2 and the correct Sqrt[x^2] replacements for Abs[x] for real x expand to the same expression, which has a limit of -64/27 at infinity:

Power[Sqrt[((1 - 4 n)/(3 n + 2))^(3 n)]^2, (n)^-1] // PowerExpand     (* Sqrt[x]^2 *)
Power[Sqrt[(((1 - 4 n)/(3 n + 2))^(3 n))^2], (n)^-1] // PowerExpand   (* Sqrt[x^2] *)
(*  (1 - 4 n)^3/(2 + 3 n)^3  *)

When PowerExpand is applied to Limit, first the limit returns unevaluated, its arguments are expanded, and then the limit it reevaluated and returns the (correct) limit of -64/27 for the expanded function.

Note that because the power Power[z, (n)^-1] is the principal value, the correct and incorrect substitutions for Abs[x] converge to the same value as n -> Infinity.

Mathematica graphics

The fakeabs form Sqrt[x]^2 zigzags because x = ((1 - 4 n)/(3 n + 2))^(3 n) alternates sign and therefore Sqrt[x] alternates real/imaginary.

fakeabs = ReIm@N@Table[Power[Sqrt[((1 - 4 n)/(3 n + 2))^(3 n)]^2, (n)^-1], {n, 150}];
realabs = ReIm@N@Table[Power[Sqrt[(((1 - 4 n)/(3 n + 2))^(3 n))^2], (n)^-1], {n, 150}];
limit = {ReIm[64/27]};    
ListLinePlot[{fakeabs, realabs, limit}, PlotMarkers -> Automatic, 
 Frame -> True, PlotRangePadding -> Scaled[.05], PlotRange -> All, 
 PlotLegends -> {HoldForm@fakeabs, HoldForm@realabs, HoldForm@limit}]

I suppose it is clear that this appears to be a backslide.

Michael E2
  • 235,386
  • 17
  • 334
  • 747
  • Michael, thanks for the help. A lot of useful comments in your answer that were extremely helpful. Because of your answer, I will be able to edit my notebook that I have written to help my calculus students with the Root Test. – David Apr 08 '17 at 17:47
  • @David You're welcome. I use the Sqrt[x^2] trick a lot, too. I guess I should start trying out RealAbs to see if it's just as good. (However, Abs[x] // ComplexExpand still expands to Sqrt[x^2].) – Michael E2 Apr 08 '17 at 18:24
3

This has been fixed in 11.2:

Limit[Sqrt[(((1 - 4 n)/(3 n + 2))^(3 n))^2]^(1/n), n -> ∞]
   64/27

Limit[(Sqrt[((1 - 4 n)/(3 n + 2))^(3 n)]^2)^(1/n), n -> ∞]
   64/27

Limit[Abs[((1 - 4 n)/(3 n + 2))^(3 n)]^(1/n), n -> ∞]
   64/27
J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
2

Do ComplexExpand to get the right result (Using Version 8.0 )

   Limit[Power[Sqrt[((1 - 4 n)/(3 n + 2))^(3 n)]^2, (n)^-1] // 
            ComplexExpand, n -> Infinity]

    (*  64/27   *)
Akku14
  • 17,287
  • 14
  • 32
1

(Mathematica 10)

Numerically:

Needs["NumericalCalculus`"]

NLimit[Power[Sqrt[((1 - 4 n)/(3 n + 2))^(3 n)]^2, (n)^-1], 
   n -> ∞] // Chop // Rationalize[#, .000001] &
(* 64/27 *)

Symbolically

Limit[Power[Sqrt[((1 - 4 n)/(3 n + 2))^(3 n)]^2, (n)^-1], 
   n -> ∞] // FullSimplify // Timing
(* {10.405267, 64/27} *)

Note that there are is no need for adding other built-in functions such as ComplexExpand, PowerExpand and the like.

Dimitris
  • 4,794
  • 22
  • 50