### Welcome to our community

#### bergausstein

##### Active member
can you tell me if there's a necessity to use the definition:

$\displaystyle \sqrt{x^2}=|x|$

to this,

$\displaystyle \sqrt{(x+y)^2}$

if yes, why? if not why?

and how it is different to

$\displaystyle \left(\sqrt{(x+y)}\right)^2$

thanks!

Last edited:

#### caffeinemachine

##### Well-known member
MHB Math Scholar
can you tell me if there's a necessity to use the definition:

$\displaystyle \sqrt{x^2}=|x|$

to this,

$\displaystyle \sqrt{(x+y)^2}$

if yes, why? if not why?

and how it is different to

$\displaystyle \left(\sqrt{(x+y)}\right)^2$

thanks!
You already know that any positive real number has two distinct square roots. One is positive and one is negative. Now suppose you want a machine (a function to be more precise) which takes a positive real number as the input and returns you the positive square root of the inputted number. Call this machine $M$.

It is then easy to see that $M(x^2)=|x|$.

It so happens that the standard notation for $M$ is actually $\sqrt{(\,)}$. It is as simple at that.

You can similarly have a machine $N$ which returns the negative square root of a given number.

It is again easy to see that $N(x^2)=-|x|$.

You can show further that $N\equiv-\sqrt{(\,)}$.

Tell me if you have any more questions.

To answer your question about how $\sqrt{(x+y)^2}$ is different from $x+y$, note that $\sqrt{(x+y)^2}$ is $|x+y|$.
Can you think of numbers $x$ and $y$ where $|x+y|\neq x+y$?

#### bergausstein

##### Active member
To answer your question about how $\sqrt{(x+y)^2}$ is different from $x+y$, note that $\sqrt{(x+y)^2}$ is $|x+y|$.
Can you think of numbers $x$ and $y$ where $|x+y|\neq x+y$?
when x and y are negative numbers. am I right? can you show me some examples.

i thought that

$\sqrt{(x+y)^2}$ is the same as $\left(\sqrt{(x+y)}\right)^2$

#### HallsofIvy

##### Well-known member
MHB Math Helper
when x and y are negative numbers. am I right? can you show me some examples.

i thought that

$\sqrt{(x+y)^2}$ is the same as $\left(\sqrt{(x+y)}\right)^2$
First, the fact that this is a sum is irrelevant. It is simply a matter of $$\sqrt{a}= |a|$$ where a= x+ y. Yes, if x and y are both negative, then x+ y is negative so $$\sqrt{(x+ y)^2}= |x+ y|= -(x+ y)$$. But they don't have to both be negative, just that x+ y be negative.

For example, it x= -30 and y= 5, then x+ y= -25 so that $$(x+ y)^2= (-25)^2= 625$$ and then $$\sqrt{(x+ y)^2}= \sqrt{625}= 25= -(x+ y)$$.

Yes, it is still true that $$\sqrt{(x+ y)^2}= \left(\sqrt{x+ y}\right)^2$$ as long as $$x+ y\ge 0$$. If x+ y< 0 then $$\sqrt{x+ y}$$ does not even exist (as a real number). If we extend to the complex numbers, the square root function is no longer singly valued so $$\sqrt{a^2}= |a|$$ is no longer true.

#### Deveno

##### Well-known member
MHB Math Scholar
Imagine you have an elite calculator that can understand verbal instructions, and give verbal answers to certain mathematical questions.

So, if you tell this calculator: "tell me the square root of 9", it replies, "Three".

Now let's give this super-duper android some stuff to do.

Our idea is simple: first we'll give it a number, then ask it's square, then ask for the square root of the square. In diagram form:

$a \to a^2 \to \sqrt{a^2}$

Then, we'll do the steps in the reverse order (because our android is just THAT good):

$a \to \sqrt{a} \to (\sqrt{a})^2$.

We'll ask our cyborg friend to tell us what the "current state" is, after each step. Ok, ready? Let's go!

"Android, the input $a$ is $9$."

Our android does the first routine:

"9....calculating....81....calculating....9"

Next he (she? who knows?) does the second routine:

"9...calculating....3....calculating.....9".

Well, both methods seem to give the same answer. Huh.

Let's try a different number:

"Android, the input $a$ is $-4$.

Androidess whirrs:

"-4...calculating...16....calculating....4".

Now for the second routine:

"-4...calculating....calculating.....calc....ERROR! ERROR! routine undefined...a34eeee00x1...coredmp."hello.world"/daisy....dai....(bleeeeeeep)"

What went wrong? Android got confused when computing $\sqrt{-4}$.

Now we could get around this with $hotfixpatch/complex.numbers$, in which case Android might respond (with perhaps a bit less bravado):

"-4...calculating....(switch to patch mode)....calculating....$2i$.....calculating...-4".

Now our two routines give different answers. So there must be something different about:

$\sqrt{a^2}$, and:

$(\sqrt{a})^2$

having to do with whether or not $a < 0$.

You see, squaring is "sneaky", it always spits out a positive number, even if we start with a negative one. So when we "unsquare" (take the square root), we might not get out what we started with:

$2 \to 4 \to 2$ (OK!)
$-2 \to 4 \to 2$ (what the....?)

Trying to "unsquare" a negative number leads to a peculiar problem: we feel that for $k > 0$ that $\sqrt{-k}$ ought to be "the same size" as $\sqrt{k}$, but neither $\sqrt{k}$ nor $-\sqrt{k}$ seems to do the trick. So whatever $\sqrt{-k}$ is, it's NOT on the normal "number line", it's off in some other direction.