CAS and exponents issues

09272018, 06:07 AM
(This post was last modified: 09292018 04:39 AM by sasa.)
Post: #1




CAS and exponents issues
While testing latest public beta, I have noticed some strange behaviour in CAS mode. Since I have no actual calculator with CAS abilities, this may be expected, still I do not believe any person will be comfortable with...
For instance: \(\sqrt{50}=\sqrt{2} \cdot 5\) \(50^{1/2} = 5 \cdot \sqrt{2}\) However: \(2^{100} \cdot 2^{200}=203703...\), instead simply \(2^{300}\) \(2^{21} \cdot 9^{1/5}=9^{1/5} \cdot 2097152\), instead simply \(2^{21} \cdot 3^{2/5}\) \(2^{1/3} \cdot 3^{1/3}=2^{1/3} \cdot 3^{1/3}\), instead simply \(6^{1/3}\) \(9^{1/5}=9^{1/5}\), instead simply \(3^{2/5}\) \(3^{2/5}=(3^{1/5})^2\)... And similar. I have found no CAS settings in beta Prime simulator regarding handling exponents more "naturally", regardless automatic simplicity level settings, or even using simplify() function. The most problematic is still displaying extremely large integers (similarly with negative exponents exactly the same reciprocal), which is quite problematic with more complex expressions. 

09272018, 09:38 AM
Post: #2




RE: CAS and exponents issues
You can use ifactor to change 203703..... back to \(2^{300}\). I suppose that the calculator cannot immediately know whether you want the full representation, or the answer expressed as a power.
Incidentally, does anyone know how to get the calculator to change \(({3^{1/5}})^2\) into \(3^{2/5}\)? Nigel (UK) 

09272018, 11:30 AM
(This post was last modified: 09272018 11:47 AM by sasa.)
Post: #3




RE: CAS and exponents issues
The CAS in theory should mimic human behavior in solving math problems, in this case expressions. In upper particular cases, that is not consistent.
For instance: \(2^{100} \cdot 2^{200} + 9^{1/5}=9^{1/5} + 203703...\) \(2^{100} \cdot 2^{200} \cdot 9^{1/5}=203703...\cdot 9^{1/5} \) WolframApha return results in the same manners, except it handles \(9^{1/5}\) correctly, which indicates that problem is in the CAS, or missing appropriate settings. Multiplication issue with the same exponent is specific to the Prime. The \(3^{2/5}=(3^{1/5})^2\) is also specific to the Prime. Etc... 

09272018, 11:53 AM
Post: #4




RE: CAS and exponents issues
(09272018 11:30 AM)sasa Wrote: WolframApha return results in the same manners, except it handles \(9^{1/5}\) correctly, which indicates that problem is in the CAS, or missing appropriate settings.The problem is not in the various CAS but in your expectations of what a CAS shoud do: "The CAS in theory should mimic human behavior in solving math problems". A CAS is a software that can solve some symbolic problems, but it does not necessarily handle and store objects like a human does. Integers and rationals are always stored as integers or irreducible fractions of integers in a CAS, and never as expressions. 

09272018, 12:04 PM
(This post was last modified: 09272018 12:04 PM by sasa.)
Post: #5




RE: CAS and exponents issues
(09272018 11:53 AM)parisse Wrote: The problem is not in the various CAS but in your expectations of what a CAS shoud do... Not at all. This is almost formal definition of CAS... In any event, as someone made CAS version for HP, please explain what is exact problem with multiplication with numbers have the same exponents on the Prime. 

09282018, 06:18 AM
Post: #6




RE: CAS and exponents issues
(09272018 12:04 PM)sasa Wrote: Not at all. This is almost formal definition of CAS...CAS means computer algebra system. I don't understand where you see that it should store data and compute like humans. I think one big problem is that some people who have never used a CAS expect they can use a CAS without learning a little bit how a CAS can store data and what it can compute. Quote:In any event, as someone made CAS version for HP, please explain what is exact problem with multiplication with numbers have the same exponents on the Prime.I don't understand your question. 

09282018, 06:48 AM
(This post was last modified: 09282018 08:57 AM by sasa.)
Post: #7




RE: CAS and exponents issues
If I do not mistake, you are mathematician Bernard Parisse, who have made several revisions of CAS for HP, including current for the Prime. If not, please sorry for identity confusion.
I have reported concrete expressions where Prime failed. This one aims to \(2^{1/3} \cdot 3^{1/3}=2^{1/3} \cdot 3^{1/3}\), instead simply \(6^{1/3}\) This is elementary example were CAS in Prime fails... As I'm one who made lite version of CAS three decades ago from ground for my own pleasure, I'm hardly novice. Nowadays CAS used in calculators and desktop computers are quite complex that even slightly change in code, step orders and settings in general may bring such inconsistence even with elementary expressions... And that is the whole point  I have reported noticed issues, nothing more and nothing less. 

09282018, 11:13 AM
Post: #8




RE: CAS and exponents issues
(09282018 06:48 AM)sasa Wrote: If I do not mistake, you are mathematician Bernard Parisse, who have made several revisions of CAS for HP, including current for the Prime. If not, please sorry for identity confusion.Why do you say it fails? The CAS is not using your prefered representation but there is nothing wrong. Please note that simplify(2^(1/3)*3^(1/3)6^(1/3)) returns 0, i.e. you will not accidentally divide by an expression that does not look like 0 but is 0, and that is what really matters when you run computations. If you simplify(2^(1/3)*3^(1/3)), it remains as is on the Prime because HP does not want to see rootofs, but in Xcas it will be rewritten as a rootof, i.e. as an element of an algebraic extension of Q that contains 2^(1/3) and 3^(1/3), that's the best way I know to make sure you don't miss 0 simplifications. Quote:As I'm one who made lite version of CAS three decades ago from ground for my own pleasure, I'm hardly novice. Nowadays CAS used in calculators and desktop computers are quite complex that even slightly change in code, step orders and settings in general may bring such inconsistence even with elementary expressions...Can we test your lite version of CAS somewhere? It is probably not implemented with the same philosophy as Xcas. Xcas was primarily implemented to run big computations that a human would never make by hand (i.e. mostly big integers and polynomials computations). 

09282018, 02:31 PM
(This post was last modified: 10012018 12:53 PM by Komanguy.)
Post: #9




RE: CAS and exponents issues
(09282018 11:13 AM)parisse Wrote: Please note that simplify(2^(1/3)*3^(1/3)6^(1/3)) returns 0, i.e. you will not accidentally divide by an expression that does not look like 0 but is 0, and that is what really matters when you run computations. If you simplify(2^(1/3)*3^(1/3)), it remains as is on the Prime because HP does not want to see rootofs, but in Xcas it will be rewritten as a rootof, i.e. as an element of an algebraic extension of Q that contains 2^(1/3) and 3^(1/3), that's the best way I know to make sure you don't miss 0 simplifications. (09282018 11:13 AM)parisse Wrote: Xcas was primarily implemented to run big computations that a human would never make by hand (i.e. mostly big integers and polynomials computations). Totally agree with that. I can also add, we can't demand a CAS to give a representation of a calculation exactly we'd like. Sometimes, we have to do manually some steps. That's why we have several functions to simplify, factor an expression or solve an equation. Guy R. KOMAN, hp 50G, hp Prime Rev. C 

09292018, 04:33 AM
(This post was last modified: 09292018 05:28 AM by sasa.)
Post: #10




RE: CAS and exponents issues
(09282018 11:13 AM)parisse Wrote: Can we test your lite version of CAS somewhere? Eventually yes, if I manage to find old particular backup CD. Quote:It is probably not implemented with the same philosophy as Xcas. Xcas was primarily implemented to run big computations that a human would never make by hand (i.e. mostly big integers and polynomials computations). IIRC, the main reason I started with was to spare time calculating higher order derivatives, which required enormous time and concentration for human and maximum simplification between steps. Another was to make 3D graph with users free formula input, making maximum simplification in order to make optimal path for execution, which again IIRC, was only between 50100% slower comparing hard coded maximally simplified formula (compiled machine code). It had several objects handled integers, fractions, exponents and rational numbers, constants, variables and functions. 

09292018, 08:12 AM
(This post was last modified: 09292018 08:15 AM by sasa.)
Post: #11




RE: CAS and exponents issues
(09282018 11:13 AM)parisse Wrote: Why do you say it fails? The CAS is not using your prefered representation but there is nothing wrong. Elementary simplification fail, in this case. As well, in this case, rootofs is not needed... However yes, I understand that approach and methodology is quite different. For instance, let take mentioned high order derivative, as example: diff(acos(x),x,6) On online Xcas/Giac it returns quite long expression without simplification which may indicate that there is no simplification between steps. With simplification and factoring it gives shorter expression, which is still bit more complex than wolfram alpha offer at once, even both appears to be essentially correct. All in all, I believe all is clear  different methodology made quite a difference in simplicity of the final result, while it essentially remain correct. 

09302018, 06:36 PM
Post: #12




RE: CAS and exponents issues
I agree that it would be nice to have some rewriting command to collect exponents 2^(1/3)*3^(1/3) as 6^(1/3) but this is not a simplification failure : as I said simplify will correctly detect that 2^(1/3)*3^(1/3)6^(1/3) is 0 and that is what is important.
As for diff(acos(x),x,6), there is intermediate rewrite between each derivative, otherwise diff(acos(x),x,30) would run forever, but there is no factorization, I don't think it accelerates computations for generic expressions (factorization may be costly, much more than rewriting an expression as an irreductible fraction). You are of course free to think differently, but implementing is much harder than speaking, that's why I was curious to see what your CAS was really capable to do. 

10032018, 08:34 AM
Post: #13




RE: CAS and exponents issues
It would be definitely nice touch for simplification and factorization on last step.
For instance: diff(((1+x^2)/2)*tan(x),x) On Prime and online Xcas/Giac, returns: (2*x/2)*tan(x)+((1+x^2)/2)*(1+tan(x)^2) I do not insist on any of this, simply point some issues may confuse users, especially low grade students. 

10032018, 01:11 PM
(This post was last modified: 10032018 01:34 PM by Albert Chan.)
Post: #14




RE: CAS and exponents issues
(10032018 08:34 AM)sasa Wrote: It would be definitely nice touch for simplification and factorization on last step. Your nonsimplified diff(...) result actually look pretty good to me. It clearly shown what is done to the expression (product rule). diff(((1+x^2)/2)*tan(x),x) => (2*x/2)*tan(x)+((1+x^2)/2)*(1+tan(x)^2) If factorization or simplification (whatever that meant) were needed, do it in separate step.  About what is simplified form, it is very subjective. Is 2^10 simpler than 1024 ? How about 2^20 vs 1048576 ? Is 6^(1/3) really simpler than factorized 2^(1/3)*3^(1/3) ? If true, why is 9^(1/5) not simpler than 3^(2/5) ? Assuming 3 "simpler" than 9, 1/5 "simpler" than 2/5, who win the simpler race ? 

10042018, 05:49 AM
Post: #15




RE: CAS and exponents issues
(10032018 08:34 AM)sasa Wrote: It would be definitely nice touch for simplification and factorization on last step. This is the choice made by TI, not mine. I am a teacher, I want students to learn something. 

« Next Oldest  Next Newest »

User(s) browsing this thread: