I came across this function to solve for x (answers are -27, 0, 1)
x^(5/3)+2*x^(4/3)-3*x;
I went out to Desmos and Geogebra to graph it and the graph shows the curve correctly from x=-30 to x=30.
For fun, I converted it to postfix notation
x 5 3 / ^ 2 x 4 3 / ^ * + 3 x * -
and wrote a java program to calculate values in the above range.
However, when running it, I get Not-a-number for negative values of x.
Calculating -1^(4/3) reports NAN in Excel and other online exponential calculators. In Java,
double x = Math.pow(-1.0, 5.0/4);
returns NAN.
I understand complex numbers so my question is, how is it that these graphing programs manage to avoid the occurrence of NAN's and are able to draw the graph?
yourExpression == 0
for values of x. If that's true, then note that the only roots are 0 and 1; -27 is not a root. $\endgroup$ReImPlot[]
. $\endgroup$