Why does $|x^2| = x^2$, only if $x$ is positive? (according to Wolfram Alpha)

249 Views Asked by At

I don't understand why Wolfram says $|x^2|$ is equal to $x^2$, but only when $x$ is positive. Since we're squaring the value of $x$, the input to $abs$ will always be positive, and the result will be identical to the input. Here's my proof:

Lets take two possible values of $x$: $k$, and $-k$, and compare their equations: $|k^2|$ and $|(-k)^2|$

It's trivial that $(-k)^2$ = $k^2$, since $(-k)^2$ = $(-1)^2 \cdot k^2$ = $1 \cdot k^2$ = $k^2$.

So $|(-k)^2|$ = $|(-1)^2 \cdot k^2|$ = $|1 \cdot k^2|$ = $|k^2$|.

So it then follows that since $|k^2| = k^2$ when $k$ is positive, $|k^2| = k^2$ for all values $k$.

Where am I going wrong?

1

There are 1 best solutions below

1
On BEST ANSWER

Assuming that we're looking at the page linked by The Chaz 2.0:

wolfram alpha page]

I read this as telling the truth but not the whole truth. In other words, if $x$ is positive then $|x^2| = x^2$. Wolfram Alpha is not saying that if $x^2 = |x^2|$ then $x$ is positive. That would be false, as you point out.

I am not sure why Wolfram Alpha provides this incomplete information. It does try to be general and not assume that variables have strictly real values. Notice that $|i^2| \neq i^2$. As for why it doesn't say “Alternate form assuming $x$ is real,” who knows.