SQRT(X^2)
|
06-25-2015, 12:48 PM
(This post was last modified: 06-25-2015 01:16 PM by Marcelo Vanti.)
Post: #1
|
|||
|
|||
SQRT(X^2)
Hello ,
I knew SQRT (X ^ 2) = ABS ( X) , and this result is what I got with the HP 50G calculator CAS. With PRIME, however, I have X as a result, which does not seem right . Does anyone know why this happens ? May I be using a wrong setup? still , I found a nice thread about of this topic here. http://math.stackexchange.com/questions/...lute-value Marcelo Marcelo |
|||
06-25-2015, 03:03 PM
Post: #2
|
|||
|
|||
RE: SQRT(X^2)
In the latest release (2015.06.17 r8151) I type in √(x^2) and press ENTER in the cas screen and get abs(x).
You up to date? Or doing some other procedure? TW Although I work for HP, the views and opinions I post here are my own. |
|||
06-25-2015, 03:28 PM
(This post was last modified: 06-25-2015 03:29 PM by Maro.)
Post: #3
|
|||
|
|||
RE: SQRT(X^2) | |||
06-25-2015, 04:03 PM
Post: #4
|
|||
|
|||
RE: SQRT(X^2)
Tim , thank you.
I redid the same procedure on the emulator ( I should have tried before) and got the right result - abs ( x ) . Then I checked CAS settings on the calculator. I had " use i" set. This caused the apparent error, but I don't now why. I still need to learn a lot about the CAS operation. Marcelo |
|||
06-25-2015, 04:12 PM
Post: #5
|
|||
|
|||
RE: SQRT(X^2)
This is not an error. sqrt(x^2) is different from abs(x) if x is complex non real. This is the reason why the system chooses the x branch.
|
|||
06-25-2015, 04:42 PM
Post: #6
|
|||
|
|||
RE: SQRT(X^2)
(06-25-2015 04:12 PM)parisse Wrote: This is not an error. sqrt(x^2) is different from abs(x) if x is complex non real. This is the reason why the system chooses the x branch. Thanks for the explanation. Now it becomes clear to me. Marcelo |
|||
06-25-2015, 07:30 PM
Post: #7
|
|||
|
|||
RE: SQRT(X^2)
While the 50g doesn't simplify to x when Complex is ticked.
I think I finally understood why there is this "rigorous" flag. |
|||
11-19-2015, 08:13 AM
Post: #8
|
|||
|
|||
RE: SQRT(X^2)
One more reason not to take away the "Use i " feature !!
|
|||
11-19-2015, 04:02 PM
Post: #9
|
|||
|
|||
RE: SQRT(X^2)
(11-19-2015 08:13 AM)retoa Wrote: One more reason not to take away the "Use i " feature !! Actually, argument for it. Too many people keep turning it on an have no clue what it does, and it "screws up" all sorts of calculations in an unexpected way. TW Although I work for HP, the views and opinions I post here are my own. |
|||
11-19-2015, 07:17 PM
Post: #10
|
|||
|
|||
RE: SQRT(X^2)
My opinion is remove it from the settings, but keep the command for advanced users:
complex_mode:=1 complex_mode:=0 |
|||
11-19-2015, 11:48 PM
Post: #11
|
|||
|
|||
RE: SQRT(X^2)
I just want to caution that "complex_mode" and "use i" are not the same with rev. 8151.
complex_mode:=0 factor (x^2+4,x) returns (x+2*i)*(x-2*i) "use i" check off factor (x^2+4,x) returns x^2+4 Looks like "complex_mode" is not implemented. |
|||
11-20-2015, 08:11 AM
Post: #12
|
|||
|
|||
RE: SQRT(X^2)
The setting that gives me more trouble is the CAS "Complex" setting (the one above "Use i" to be clear). The help says "Include complex results in variables" but I do not fully understand what it does.
Can someone post an example of a result/solution that will be different if "Complex" is checked or not? |
|||
11-20-2015, 09:11 AM
Post: #13
|
|||
|
|||
RE: SQRT(X^2)
complex_mode:=0 or 1 is available in Xcas, it could be available on the Prime, instead of beging in CAS Settings.
|
|||
11-20-2015, 11:06 AM
(This post was last modified: 11-20-2015 11:07 AM by hpfx.)
Post: #14
|
|||
|
|||
RE: SQRT(X^2)
(11-20-2015 09:11 AM)parisse Wrote: complex_mode:=0 or 1 is available in Xcas, it could be available on the Prime, instead of beging in CAS Settings. Will it be displayed on top of the screen ? yes, because having a CAS settings also showed us in which mode we are. if you remove it, please at least add "i" indicator next to "CAS" one, on top of the screen ! |
|||
11-21-2015, 07:56 PM
Post: #15
|
|||
|
|||
RE: SQRT(X^2)
(11-20-2015 08:11 AM)retoa Wrote: The setting that gives me more trouble is the CAS "Complex" setting (the one above "Use i" to be clear). The help says "Include complex results in variables" but I do not fully understand what it does. Well, I tried (with "Complex" on and off to evaluate sqrt(sqrt(x*i+y)) to see if there were any differences, but, unfortunately, the Prime hangs (Emulator, too). |
|||
11-22-2015, 07:43 AM
Post: #16
|
|||
|
|||
RE: SQRT(X^2)
Indeed, you have found a bug inside giac (access to a null pointer). I'm fixing it, and I will also add a test to avoid rewriting the sqrt as real part/imaginary part in this case, because otherwise it returns a very complicated answer : not surprising for an advanced user, you are working with 2 variables and taking twice a sqrt of a complex number, but probably to easy to run for a normal user.
|
|||
11-22-2015, 06:10 PM
(This post was last modified: 11-22-2015 06:13 PM by Helge Gabert.)
Post: #17
|
|||
|
|||
RE: SQRT(X^2)
Thank you for checking into that.
But to get back to the above question (difference between "complex" flag on/off), this example works 1. 4root (x+i*y) 2. Ans^2 3. simplify() |
|||
11-22-2015, 06:48 PM
Post: #18
|
|||
|
|||
RE: SQRT(X^2) | |||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)