sqrt question - Printable Version +- HP Forums ( https://www.hpmuseum.org/forum)+-- Forum: Not HP Calculators ( /forum-7.html)+--- Forum: Not remotely HP Calculators ( /forum-9.html)+--- Thread: sqrt question ( /thread-8126.html)Pages: 1 2 |

sqrt question - KeithB - 04-06-2017 03:25 PM
I just saw one of those "Do you think you know the answer" things. "What is the result of sqrt(-4)*sqrt(-9)" If you look at it one way there is no answer. If you combine the operations: sqrt(-4)*sqrt(-9) = sqrt(-4*-9) = sqrt(36) = 6 otherwise: sqrt(-4) = 2i, sqrt(-9) = 3i, 2i*3i = -6, since i*i = -1. Which do you think is the answer they wanted? RE: sqrt question - pier4r - 04-06-2017 04:01 PM
literally asking google (I guess they do not have enough input checks). After some more thinking, I guess google is quite right. I was fooled at first. \( \sqrt{-4} \cdot \sqrt{-9} = \sqrt{4 i^2 } \cdot \sqrt{9 i^2 } = \sqrt{36 i^4 } = 6i^2 = -6 \) refreshing the operators precedence: https://en.wikipedia.org/wiki/Order_of_operations . The root come firsts, so "6" is not possible (that is, taking away the minus sign because -1*-1 = 1 , if one does not consider it as iota squared). RE: sqrt question - Namir - 04-06-2017 04:02 PM
(04-06-2017 03:25 PM)KeithB Wrote: I just saw one of those "Do you think you know the answer" things. I guess whether you first combine the values in the square roots or not makes a difference! RE: sqrt question - KeithB - 04-06-2017 04:51 PM
pier4r: But we all know that sqrt(36) = sqrt(4*9) = sqrt(4) * sqrt(9), right? So the reverse is true: sqrt(-4) * sqrt(-9) = sqrt(-4*-9) = sqrt(36). This, of course, is the only way to do it in the real numbers and get an answer. RE: sqrt question - pier4r - 04-06-2017 05:15 PM
Hmm no? I mean if you want to keep the minus under square root you must use iota. Otherwise you must first compute the square roots (and again, iota) and then do the multiplication according to the order of operations. This, as always, according to the rules that you want to follow. For example it is known that 1=0.99999..... but if you consider the infinitesimal working, then it is not. There is a world of opinions, but once fixed the "rules" there is little to do. See for example here https://en.wikipedia.org/wiki/Wikipedia:Userboxes/Mathematics There are many templates about the 0.999... thing, some less acceptable than others according to the context used. edit: someone told me that 'i' is not pronounced iota. I'm sorry, in my mother tongue it was always called that way. My bad. RE: sqrt question - Han - 04-06-2017 05:46 PM
(04-06-2017 04:51 PM)KeithB Wrote: pier4r: You are mixing mathematical rules, and you are also ignoring order of operations. 1. \( \sqrt{a} \) is usually only defined for \( a \ge 0 \). The multiplicative property \( \sqrt{a}\cdot \sqrt{b} = \sqrt{a\cdot b} \) likewise only applies to non-negative values of \( a \) and \(b \). Another way of putting it is that this property is a result of the assumption that the domain of \( \sqrt{x} \) is the set of non-negative real numbers. 2. The order of operations dictate that exponents are evaluated first. So \( \sqrt{-4} \cdot \sqrt{-9} = -6 \) -- however this assumes that we are not using the \( \sqrt{x} \) function as described in #1. In fact, we have have implicitly assumed that the \( \sqrt{\quad } \) operator is defined for negative values, and that the evaluation is \( i\cdot \sqrt{|x|} \) RE: sqrt question - KeithB - 04-06-2017 06:03 PM
So to summarize, by assuming sqrt(-4) is a valid operation we are automatically going to interpret it as 2i. RE: sqrt question - Han - 04-06-2017 06:18 PM
(04-06-2017 06:03 PM)KeithB Wrote: So to summarize, by assuming sqrt(-4) is a valid operation we are automatically going to interpret it as 2i. No, the point was that in choosing to evaluate \( \sqrt{-4} \cdot \sqrt{-9} \) to be equal to -6 (by following the order of operations), we have implicitly made the assumption that \( \sqrt{ x } = i \sqrt{|x|} \) for \( x < 0 \). The conventional use of \( \sqrt{x} \) is that it is the positive square root of \( x \). There is no single convention, however, for \( \sqrt{x} \) if \( x < 0 \). EDIT: One could also argue that we may have actually implicitly assumed that \( \sqrt{x} = -i \sqrt{|x|} \) for \( x < 0 \). We still get -6, but all the more reason that there is no single convention for \( \sqrt{x} \) for negative values of \( x \). RE: sqrt question - Claudio L. - 04-07-2017 01:23 PM
Both answers are correct! Every power in the form a^(1/n) has 'n' answers in the complex plane. sqrt is the particular case n=2, so it has 2 answers: sqrt(-4) = +2i and -2i sqrt(-9) = +3i and -3i doing all 4 possible combinations for the product you arrive at the 2 possible answers: +6 and -6. sqrt( (-4)*(-9) ) = sqrt(36) = +6 and -6 By doing the operations in one order or the other, you are simply choosing (or accidentally falling into) one branch or the other, nothing wrong with that, but don't ever forget that there's 2 sides of that coin. RE: sqrt question - Han - 04-07-2017 04:48 PM
(04-07-2017 01:23 PM)Claudio L. Wrote: Both answers are correct! There are some nuances here that perhaps we are glossing over. Using the notation \( \sqrt{x} \) (which has a standard mathematical convention of meaning the positive root) to denote an extension into the complex plane means certain properties that were true only for non-negative real values of \(x \) no longer hold for more general \( x \). Ordinary \( \sqrt{x} \) is a function, whereas complex \( \sqrt{x} \) is a 1-to-2 map (not a function). So if we want the operation to behave as a function, there cannot be multiple answers. On the other hand, if this is not an issue, then both 6 and -6 are "correct" answers. Another question (regarding consistency) is why one would take \( \sqrt{-4} \) to be 2i and \( \sqrt{-9} \) to be -3i (i.e. one positive and the other negative, leading to inconsistency in the signs)? For functions, they should both be positive or both be negative. For more general maps, this is not a concern. RE: sqrt question - Claudio L. - 04-07-2017 09:15 PM
(04-07-2017 04:48 PM)Han Wrote: So if we want the operation to behave as a function, there cannot be multiple answers. On the other hand, if this is not an issue, then both 6 and -6 are "correct" answers. We visited this subject in the past (gave me a big headache!): http://www.hpmuseum.org/forum/thread-6165.html Assuming clear and consistent conventions (like always choosing the positive root for sqrt(), even if complex), the most trivial algebraic operations may switch you to the other branch (against your will): sqrt(x) = sqrt((-1)*(-1)*x) = sqrt( -x*i^2) = i*sqrt(-x) Not so equal! RE: sqrt question - Han - 04-07-2017 10:54 PM
(04-07-2017 09:15 PM)Claudio L. Wrote:(04-07-2017 04:48 PM)Han Wrote: So if we want the operation to behave as a function, there cannot be multiple answers. On the other hand, if this is not an issue, then both 6 and -6 are "correct" answers. Is this due to the sqrt() function, though? This seems like a consequence of assuming factorization properties of 1 and -1 that may not still hold true for complex numbers. RE: sqrt question - nsg - 04-07-2017 11:34 PM
(04-07-2017 09:15 PM)Claudio L. Wrote: Assuming clear and consistent conventions (like always choosing the positive root for sqrt(), even if complex), You cannot do this because there is no such thing as "negative" for complex numbers. "Greater than" and "less then" are only defined for reals (number line). So, if you stay in real land, then sqrt(-9)*sqrt(-4) is undefined and if you expand into complex plane then it is +-6. Square root in complex plane IS a multivalued function, there is simply no way around it. On a somewhat related note, i and -i are algebraically indistinguishable. C is extension field of R, extended by roots of irreducible polynomial x^2+1=0. It is second degree polynomial, has 2 roots, we pick one of them arbitrarily, call it "i" and continue. We might as well could have picked another one (it is equal to -i in our newly established convention) and have called THAT one "i" and would not notice any difference. This contrasts with 1 and -1, which are clearly algebraically distinct and whole bunch of equations will break if we replace 1 with -1 and -1 with 1. RE: sqrt question - Claudio L. - 04-09-2017 03:59 AM
(04-07-2017 10:54 PM)Han Wrote: Is this due to the sqrt() function, though? This seems like a consequence of assuming factorization properties of 1 and -1 that may not still hold true for complex numbers. The factorization properties hold true for complex numbers. The problem is more about the interaction between the sqrt() function and its argument because of mapping to the principal branch. For example: sqrt(1) = 1 sqrt( (-1)*(-1) ) = sqrt(-1)*sqrt(-1) = i*i = -1 What happened here? we replaced 1 (in polar coordinates, its argument is zero), with two numbers with an argument of 180 degrees. The multiplication of these 2 numbers (-1) would give you an argument of 360 degrees. The convention for sqrt is to halve the argument, so the result of sqrt(1*exp(i*2pi)) is 1*exp(i*pi) = -1 while sqrt(1*exp(i*0)) = 1*exp(i*0) = 1 Now the value 1*exp(i*2pi) should've been reduced to 1*exp(i*0) prior to performing the sqrt(). However, when you distribute the sqrt doing sqrt(-1)*sqrt(-1), you are not allowing that reduction to take place. Both arguments of 180 degree get halved, then added together by the multiplication resulting in 180 degree again (hence the negative result). So this is a consequence that 1 = (-1)*(-1), while mathematically true and correct, gets treated differently by the sqrt() when you split it. But there's nothing wrong, the result is correct, just that you've been pushed to the other solution. There's no way around it that I know of. RE: sqrt question - Vtile - 04-09-2017 10:41 AM
(04-07-2017 11:34 PM)nsg Wrote:Not partially true. In example in electrical engineering the -i and +i ( or -j & +j in reality ) do have a big difference. One models the capacitance and other do model the inductance (electric and magnetic fields). What the current mathematic convention is, I don't know, only thing I do know is the secondary school level "mathematic curriculum" atleast here do mistreat the complex calculus and forgets the real world importance of it.(04-07-2017 09:15 PM)Claudio L. Wrote: Assuming clear and consistent conventions (like always choosing the positive root for sqrt(), even if complex), -i = 1/i RE: sqrt question - nsg - 04-09-2017 05:26 PM
(04-09-2017 10:41 AM)Vtile Wrote: Not partially true. In example in electrical engineering the -i and +i ( or -j & +j in reality ) do have a big difference. I did not mean that i and -i are the same. Clearly, -i and +i are different numbers, what I tried to say is you just cannot meaningfully tell which one is which. We can fix one of them and call that one i and another -i, but we could also have picked another one and call THAT one i and the original -i and it would make no difference. You cannot do this with 1 and -1. If you call -1 "1" (this also turns 1 into "-1"), then all hell breaks loose. If, on the other hand, you have example of some i/-i asymmetry, please bring it on. RE: sqrt question - Vtile - 04-09-2017 11:07 PM
(04-09-2017 05:26 PM)nsg Wrote:If you make substitution 1=-1 that would mean that whole number line is substituted so 2 turns to -2 and so forth. With only means that the calculus is also mirrored.(04-09-2017 10:41 AM)Vtile Wrote: Not partially true. In example in electrical engineering the -i and +i ( or -j & +j in reality ) do have a big difference. How the calculus would go idk (I assume 1*1=-1 and -1*1=1 etc.) at this time of night I need to draw a picture in the morning with fresh eyes. What I mean with this is that isn't there a symmetry even there. Not as obvious direction change as in i+- case, but still. That said I'm not too deep in tjeory and might just make fool at myself here. RE: sqrt question - nsg - 04-10-2017 01:44 AM
(04-09-2017 11:07 PM)Vtile Wrote: If you make substitution 1=-1 that would mean that whole number line is substituted so 2 turns to -2 and so forth. With only means that the calculus is also mirrored. Here, you said it yourself. If you replace 1 with -1 you will get 1*1=-1 and -1*1=1 which is obvious nonsense. Or at least it is not what you have in "usual" algebra. If you replace i with -i, there will be no difference in available identities. Everything that was true in "old" algebra is true in "new" algebra and everything that wasn't, isn't. RE: sqrt question - David Hayden - 04-24-2017 09:36 PM
(04-09-2017 03:59 AM)Claudio L. Wrote: sqrt(1) = 1Isn't it: sqrt(1) = 1 or -1. sqrt( (-1)*(-1) ) = sqrt(-1)*sqrt(-1) = (+/-i)*(+/-i) = -1 or 1 The fact that we usually mean "the positive answer" when we say "sqrt(x)" doesn't negate the fact that there is also a negative answer. RE: sqrt question - Vtile - 04-25-2017 11:38 PM
(04-10-2017 01:44 AM)nsg Wrote:(04-09-2017 11:07 PM)Vtile Wrote: If you make substitution 1=-1 that would mean that whole number line is substituted so 2 turns to -2 and so forth. With only means that the calculus is also mirrored. Well the nonsense is also in the real number line, but were are just so accustomed to it that I doubt hardly none will notice. Ie. when we go to negative numbers the plus operation turns to substaction (both numbers negative) and if we go between 0..1 the division is actually a multiplication (the 1/primes are fascinating, not that I understand those a one thing) and I'm sure there is other rather amusing quirks I can not pull out offhand atm. /offtopic |