11
$\begingroup$

If we plot the following, we can see there are seven roots

Plot[{x, 3 Pi (1 - Sin[x])}, {x, 0, 22}]

We can easily solve for these roots

Reduce[x == 3 Pi (1 - Sin[x]), x, Reals]

The results are

enter image description here

Why is Mathematica showing the $3 \pi$ root twice? It is not a double root!

Solve does the same thing.

This appears to be a bug and I thought those sorts of questions were welcome here.

$\endgroup$
11
  • 4
    $\begingroup$ Showing the multiplicity of a root is what Solve normally does, at least for algebraic equations. Like Solve[x^2 == 0, x]. Seems unlikely it's a double root, though. $\endgroup$
    – Goofy
    Commented Mar 12 at 13:21
  • 1
    $\begingroup$ The behavior is different in "12.0.0 for Mac OS X x86 (64-bit) (April 7, 2019)":Reduce doesn't return a 3*Pi as a double root. It's possible that this is a bug (or was a bug if that point is actually a double root). $\endgroup$
    – march
    Commented Mar 12 at 15:35
  • 1
    $\begingroup$ Indeed: The Taylor expansion of $3\pi(1-\sin(x)) - x$ about $x=3\pi$ is $(3\pi-1)(x-3\pi) -\frac{1}{2}\pi(x-3\pi)^3 +\cdots$, indicating that $3\pi$ is not a double root. So we might be able to characterize this as a bug, depending on the intention of Reduce and when it returns multiple of the same answers. $\endgroup$
    – march
    Commented Mar 12 at 15:40
  • 3
    $\begingroup$ This has been reported as a bug. $\endgroup$ Commented Mar 12 at 20:02
  • 4
    $\begingroup$ As for the questionj of whether this post is appropriate for MSE, I would think the Reduce result is sufficiently confusing as to make it a reasonable query. It's not entirely obvious, at least at a glance, that it is "just" a bug. $\endgroup$ Commented Mar 12 at 20:04

1 Answer 1

13
$\begingroup$

This is a bug. A subdivision method happens to subdivide very close to a root, and the same root gets found in both branches (due to numerical tolerance). The code was not checking for that, it will in the next version.

$\endgroup$
2
  • $\begingroup$ Thank you! ${}{}$ $\endgroup$
    – Moo
    Commented Mar 12 at 18:21
  • 2
    $\begingroup$ Where? In Solve or Reduce? $\endgroup$ Commented Mar 12 at 18:29

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.