# Solve misses positive solutions

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$$

• 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}} Jun 28, 2021 at 15:49
• Well $n\ge1$... Jun 28, 2021 at 17:25
• The condition/constraint n>=1 was not included in your Solve. If you do include it, neither Solve nor Reduce can solve the system. Jun 28, 2021 at 20:20
• 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? Jun 28, 2021 at 20:25
• @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. Jun 28, 2021 at 20:35

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.

• 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." Jul 1, 2021 at 1:16