# Square root of $x^2$ is rational expression or not? [duplicate]

Square root of $x^2$ equal to $|x|.$ Does $|x|$ qualify as rational expression?

Why |x| is not a polynomial?

• The question can be interpreted in two ways: 1) can $|x|$ be expressed as a rational function ? 2) is $|x|$ allowed in the definition of rational functions ? Which are you thinking of ? – Yves Daoust Aug 5 '17 at 8:20

Following the definition on this site, no, $|x|$ is not a rational expression.

The rational function $f$ it's $f(x)=\frac{p(x)}{g(x)}$, where $p$ and $q$ are polynomials and $q\neq0$.

Thus, $g(x)=|x|$ is not rational function.

Indeed, $g'(x)=1$ for all $x>0$ and $g'(x)=-1$ for all $x<0$, which is impossible for $f$.

For example, if $g$ is a polynomial then since $g$ is an even function, we obtain: $$|x|=a_0x^{2n}+a_1x^{2(n-1)}+...+a_n.$$

Hence, $$2na_0x^{2n-1}+...+2a_{n-1}x=1$$ for all $x>0$, which is impossible.

$|x|$ is piecewise polynomial (and rational).

It does not qualify as polynomial because it does not enjoy useful properties of polynomials such as differentiability or shifting (i.e. $P(x+a)$ is also a polynomial $Q(x)$, while $|x+a|$ cannot be expressed in terms of $|x|$). That would break too many theorems.