4
$\begingroup$

Why Solve returns only negative solutions?

Let $n \in \mathbb{Z}^{+}$. I want to find geometric position of roots of polynomial $p(x)=(x-1)^{2 n}+(x+1)^{2 n}$ in complex plane.

Solve[(x + 1)^(2 n) + (x - 1)^(2 n) == 0, x]

$\left\{\left\{x\to \frac{1+e^{\frac{i \pi }{2 n}}}{-1+e^{\frac{i \pi }{2 n}}}\right\}\right\}=-i\cot\left(\dfrac{\pi}{4n}\right)$

But we know conjugates are also a solution i.e.

$\left\{\left\{x\to -\frac{1+e^{\frac{i \pi }{2 n}}}{-1+e^{\frac{i \pi }{2 n}}}\right\}\right\}$

are also solutions.

We see that

With[{n = 1}, Solve[(x + 1)^(2 n) + (x - 1)^(2 n) == 0, x]]

returns

$\{\{x\to -i\},\{x\to i\}\}$

and $ \left\{\left\{x\to \frac{1+e^{\frac{i \pi }{2 n}}}{-1+e^{\frac{i \pi }{2 n}}}\right\}\right\} /. n -> 1$

returns

$i$

enter image description here

$\endgroup$
10
  • 1
    $\begingroup$ The conjugates are given by negative values of n, e.g., sol = Solve[(x + 1)^(2 n) + (x - 1)^(2 n) == 0, x][[1]]; sol /. {{n -> 1}, {n -> -1}} evaluates to {{x -> -I}, {x -> I}} $\endgroup$
    – Bob Hanlon
    Jun 28, 2021 at 15:49
  • $\begingroup$ Well $n\ge1$... $\endgroup$ Jun 28, 2021 at 17:25
  • 1
    $\begingroup$ The condition/constraint n>=1 was not included in your Solve. If you do include it, neither Solve nor Reduce can solve the system. $\endgroup$
    – Bob Hanlon
    Jun 28, 2021 at 20:20
  • 1
    $\begingroup$ There is also no error message that some solutions might have been missed, which is a little disconcerting. Feeding it Method -> Reduce, where only equivalent transformations are used, makes Solve unable to solve this equation, suggesting that inequivalent transformations were used and thus that an error message should have been issued, as per the docs—unless something else is going on here? $\endgroup$
    – thorimur
    Jun 28, 2021 at 20:25
  • 1
    $\begingroup$ @BobHanlon but that doesn't make sense, I don't think—n is supposed to be treated as a constant here specified in the original equation, not something that ranges over all numbers. If it was supposed to be arbitrary, that would be given as C[1], right? After all, consider Solve[a x + 1 == 0, x]. This has the unique solution of -1/a. It doesn't mean that all a are admissible/included in the solution. as another ex, if i evaluate Solve[x^2 == a^2, x], I get {{x -> a}, {x -> -a}}. I wouldn't expect to get just{{x -> a}} and say that I could then replace a -> -a to get the other. $\endgroup$
    – thorimur
    Jun 28, 2021 at 20:35

1 Answer 1

1
$\begingroup$

Solve really should throw a warning that some answers might be missed and to use Reduce for complete information. Doing Reduce first followed by Solve works

red = Reduce[(x + 1)^(2 n) + (x - 1)^(2 n) == 0, {x, n}]
sol = Solve[Last@red, x]
sol /. n -> 1 /. C[1] -> Range[2]

gives

C[1] \[Element] Integers && 1 + x != 0 && -1 + x != 0 && Log[-1 + x] - Log[1 + x] != 0 && 
 n == -((I π + 2 I π C[1])/(2 (Log[-1 + x] - Log[1 + x])))
{{x -> (1 + E^((I π)/(2 n) + (I π C[1])/n))/(-1 + E^((I π)/(2 n) + (I π C[1])/n))}}
{{x -> {I, -I}}}

as desired. This is a bit of an ugly hack, and still relies on the sketchy Solve. But in general Solve is not guaranteed to give full information like Reduce is.

$\endgroup$
1
  • 1
    $\begingroup$ While Solve giving the answer it does is not a bug, I think the lack of error messages you mention might be one (or at least be unintended behavior): from the docs, "Solve may use non-equivalent transformations to find solutions of transcendental equations and hence it may not find some solutions and may not establish exact conditions on the validity of the solutions found. If this happens, an error message is issued." $\endgroup$
    – thorimur
    Jul 1, 2021 at 1:16

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.