# Which roots of a negative number can be done?

I'm an Android programmer and am working on a graphing calculator. I have been looking for the limits on which roots can be done. I have a decent understanding of mathematics but can not seem to find these limits. Any help would be great, thanks.

-
I don't understand the question. – Qiaochu Yuan Mar 2 '12 at 1:32
What are the limits on which numbers of y get a real value when x<0 and one gets the yth root of x. – jersam515 Mar 2 '12 at 1:34
The word limit has a specific meaning in mathematics. Are you using the word limit to denote shortcomings? Are you asking what is the domain of the function $\sqrt \ : \mathbb{R} \to \mathbb{R}$? – user2468 Mar 2 '12 at 1:36
A limit as in the limit on x+1>0 is that x>-1. Yes, the domain of the function where the result is real. – jersam515 Mar 2 '12 at 1:38
Ok. Help me out here. As far as I understand $y \in \mathbb{R}$, $x < 0$ and you want to calculate the $y$th root of $x$. That is, compute $$r = x^{\frac{1}{y}}.$$ What is you question then? – user2468 Mar 2 '12 at 1:41

Let $x < 0$ and $y \in \mathbb{R}$. Note that $\text{Arg } x = \pi$.

By the definition of the complex logarithm we have $$x^{1/y} = e^{(\log x)/y} = e^{[\log|x| + i(\pi+2\pi\ell)]/y} = e^{(\log |x|)/y} e^{i\pi(1+2\ell)/y}$$ where $\ell$ is any integer. Thus $x^{1/y}$ has a real value if and only if $(1+2\ell)/y$ is an integer for some $\ell$. This happens exactly when $y = (1+2m)/n$ for some integers $m$ and $n$ with $n \neq 0$.

-
..which also means that $y$ has to be a rational number. – user2468 Mar 2 '12 at 12:13
@J.D.: Not all rationals will work, like $y= 2$. – Antonio Vargas Mar 2 '12 at 14:49
Oh. Sorry. I meant $y$ at least has to be rational, in the fashion of necessary but not sufficient condition. – user2468 Mar 2 '12 at 18:21
@J.d.: Ah, yeah, definitely. – Antonio Vargas Mar 2 '12 at 21:18

Given a real number $x < 0$ and an integer $y \in \mathbb{Z}$. The $y$th root of $x$, given by: $$r = x^{\frac{1}{y}}$$ is a real number if and only if $y$ is an odd number.

-
How's that work if y is a decimal, as per wikipedia decimal values are neither odd nor even? – jersam515 Mar 2 '12 at 1:57
In that case, the answer still applies. If $x$ is a negative real number and $y$ is a real number that is not an integer, then $y$ is not odd, and $x^{\frac1y}$ is not a real number. – Tanner Swett Mar 2 '12 at 2:01
I feel there is something fundamentally wrong with what I said. Write $x = k e^{i \pi}$. Then $$r = x^{\frac{1}{y}} = k^{\frac{1}{y}} e^{i \pi/y + 2\pi n}.$$ For $r \in \mathbb{R}$ we have: $$\pi/y + 2\pi n \equiv \pi m$$ where both $m,n \in \mathbb{Z}.$ Which does not infer the condition on $y$ being odd. – user2468 Mar 2 '12 at 2:20
@J.D.: $x = ke^{i\pi+2\pi n} \Rightarrow r = k^{1/y} e^{i\pi \frac{1+2n}{y}} \Rightarrow y = (1+2n)/k$ where $n$ and $k$ are integers and $k \neq 0$ if you want $r$ to be real. – Antonio Vargas Mar 2 '12 at 2:38
In my above comment I didn't mean to use $k$ twice... instead take $y = (1+2n)/m$. – Antonio Vargas Mar 2 '12 at 5:22