# Why is NSolve finding different # of roots for algebraic function?

Consider roots of $$f(u)=u^{-1/4}-2/15 u-1/6$$ which can be written as $$u^{-1/4}e^{-1/4 (2n \pi i)}-2/15 u-1/6=0$$ where $$u^{-1/4}$$ is taken as principal-value. Or as a GroebenerBasis:

$$f(u)=-810000 + 625 u + 2000 u^2 + 2400 u^3 + 1280 u^4 + 256 u^5=0$$ which has five solutions. I was wondering if someone could explain to me why when I use NSolve to solve $$u^{-1/4}e^{-1/4 (2n \pi i)}-2/15 u-1/6=0$$, it returns two solutions for n=2 but only one solution for n=0,1,3?

theK[n_] := Exp[-1/4 2 n Pi I];
theUVals = (u /.
NSolve[u^(-1/4) theK[#] - 2/15 u - 1/6 == 0, u] & /@ {0, 1, 2, 3})

{{4.04009},
{0.554451 -4.74207 I},
{-5.0745-2.93375 I,-5.0745+2.93375 I},
{0.554451 +4.74207 I}}


Update as per comment below:

I can back-substitute the five solutions into the original equation but must use the branch form $$u^{-1/4}=u^{-1/4}e^{-1/4(2 n\pi i)}$$ to do so as Mathematica I believe, will interpret the naked $$u^{-1/4}$$ expression as principal-value:

MapThread[(#1^(-1/4) theK[#2] - 2/15 #1 -
1/6) &, {theUVals, {0, 1, 2, 3}}]

{{8.32667*10^-17},
{2.77556*10^-17+2.22045*10^-16 I},
{-6.93889*10^-16+1.55431*10^-15 I,-6.93889*10^-16-1.55431*10^-15 I},
{2.77556*10^-17-2.22045*10^-16 I}}

• Have you tried substituting your five solutions back into your original equation? Feb 8, 2021 at 17:16
• Yes. Updated post above. Feb 8, 2021 at 17:36
• Mathematica cannot read your mind. If you want to solve an equation involving a multivalued function, you must ask for the solution for each value. Or, in some special cases like this one, use VerifySolutions->False. Feb 8, 2021 at 17:43
• Ok. My main question though is why is NSolve returning two solutions for a single branch $u^{-1/4(4 \pi i)}$ and single solutions for the other branches? Feb 8, 2021 at 17:45
• Why do both solutions satisfy the equation in that case? Feb 8, 2021 at 17:50

Suppressing solution verification, using Solve and RootReduce to get true zeros, and substituting the results back into the equation, I get:
u^(-1/4) theK - 2/15 u - 1/6 /. Solve[u^(-1/4) theK - 2/15 u - 1/6 == 0, u,

for case 2. So, in that case, only two of the five roots you get from using the inverse of the fourth root to make a polynomial actually solve the original equation. For other cases, only one solution works. The default for VerifySolutions is rejecting the others.
• But my back-substitution for all five solutions above satisfies the original branch expression (numerically) using the factor $e^{-1/4(2n\pi i)}$. Bit confusing to me. Feb 8, 2021 at 17:39