The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Absolute value: sometimes CAS is very clever, sometimes not!
09-06-2018, 06:14 PM
Post: #1
Absolute value: sometimes CAS is very clever, sometimes not!
For simplifications, CAS is generally very impressive and it helps a lot to get simplified results. But sometimes, obvious simplifications are missed, and it is very difficult to overcome the difficulty.

For example:
|a| - a ---> |a| - a
It makes sense because the result depends on the sign of a. No simplification is possible. Now if we assume a>0 and make the same expression, we get:
assume(a>0) ---> a
|a| - a ---> 0
This is very nice because in that case |a| = a and the result is actually zero. Great! This sophisticated simplification can be combined:
|a+1| - a ---> 1
This is still very good. But now, if we consider another positive variable, suddenly, CAS becomes stupid. For example if we continue:
assume(b>0) ---> b
|a+b| - a - b ---> |a+b| - a - b
This is not very clever because in fact we can simplify: |a+b| - a - b = 0 if both a and b are positive. The "simplify" command does not change anything.

I know that any CAS cannot be perfect. This is not a bug, but the fact that HP prime CAS cannot see this simplification is practically very annoying. In my field (I am a professor of physical-chemistry in a French university), I would like students to be able to use HP prime or Xcas for simple cases in order to show them how CAS can help to solve problems in physics and chemistry. It sometimes works, but when it doesn't work, most often it's simply because HP prime cannot simplify the absolute value of the sum of positive variables: |a+b| = a+b when a and b are positive.

As a result, HP prime (and Xcas) do not seem to be very useful in solving many physics and chemistry problems. On the other hand, I checked that Mathematica and Maple can do the simplication without any problems.

This problem (the fact that HP prime cannot simplify |a+b|=a+b if both a and b are positive) occurs in many science questions because in physics and chemistry, second-order equations are often solved together with Taylor expansions, which results in this type of simplification. I saw this absolute value problem which strongly limits the interest of HP prime (and Xcas) in science many times e.g. in electrostatics, kinetics, electrochemistry...

Does anyone know if we can overcome this difficulty? I know that there are specific simplification commands in the CAS. Maybe one of them allows us to do that?

With many thanks!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Absolute value: sometimes CAS is very clever, sometimes not! - jfdHP - 09-06-2018 06:14 PM



User(s) browsing this thread: 1 Guest(s)