Akshit03 wrote:
Hi,
I am facing this silly doubt which is bothering me in DS questions.
Is \(\sqrt{n}\) = n
or +n or -n?
To think of it \(\sqrt{81}\) , we can square 9 and -9 to get it.
But after reading many sources and watching youtube videos, they say it can only be positive.
Secondly, if it is only positive then following is contradictory
\(\sqrt{X^2}\) = |X|
Then X can take both positive and negative values, so this is contradictory.
I was solving a question and I struggled with this equation
\(p^2\)= \((q+1)^2\)
What would this give?
Thanks.
Yes, this can be a source of confusion. That is why we have a post on it on our blog here:
https://anaprep.com/algebra-squares-and-square-roots/It discusses the cases you have brought up and the 'why' behind each. Let me know if you still have doubts.
Now that you are familiar with principal square root concept.
\(\sqrt{X^2} = |X|\)
\(\sqrt{X^2}\) is the principal square root of X^2. So whatever you get after finding square root, it will be positive. But what if X is negative? To ensure that you still get a positive value, you take |X|. Let's look at an example.
\(\sqrt{5^2} = \sqrt{25} = |5| = 5\)
This is fine. What we get is a positive number. Since we are talking about principal square root, this is what is expected.
\(\sqrt{(-5)^2} = \sqrt{25}\)
Now what is the answer? It is still 5, right? Still the principal square root. But if I say that \(\sqrt{X^2} = X\), that gives me -5 as answer because X = -5.
But the principal square root cannot be negative.
So I say \(\sqrt{X^2} = |X|\)
\(p^2 = (q+1)^2\)
All you can say in this case is that their absolute values are the same.
|p| = |q + 1|
Why?
Taking square root both sides, you get
\(\sqrt{p^2} = \sqrt{(q+1)^2}\)
\(|p| = |q + 1|\)