# What are some examples of mathematical errors in computer algebra systems (CAS)?

Computer algebra software is easily and freely available for students nowadays but they still have mathematical errors. For instance, ask them to solve the simple equation $$a x - b = 0$$ for $$x$$. The answer given is typically $$b/a$$, but that is wrong if $$a = 0$$, for instance. I am collecting other mathematical errors in CAS systems. Any examples or references are welcome, the simpler, the better.

• I don't think this is a math ed question Dec 4, 2022 at 0:28
• Also, I don't think your example is an error per se (there's some missing context). Dec 4, 2022 at 2:36
• Graph pretty much any high degree polynomial or rational function, and you will get nonsense from a computer. But this somehow doesn't prevent students from copying it down onto their paper. Dec 4, 2022 at 18:08
• @ GUEST, IT'S A MATHEMATICAL EDUCATION QUESTION BECAUSE CAS IS A TOOL FOR MATH WDUCATION WITH THEI ADVANTAGES AND PROBLEMS. Dec 9, 2022 at 12:51
• See Computer algebra errors AND What are well-known weaknesses of CAS/math software? Also, Dave Rusin kept a running list of such examples in sci.math and on his web pages back in the 1990s and early 2000s (beginning in 29 Aug 1995), the latest version of which I can find is here. Dec 25, 2022 at 15:36

I find it very helpful in my classes to include examples of calculators giving obviously wrong answers to answer the constant question "why do I need to learn this if my calculator can do it?"

You can find some examples in Patrick Honner's talk "When Technology Fails": https://www.youtube.com/watch?v=tRT3QIt7w20

Some examples I've collected in Desmos: https://www.desmos.com/calculator/yjw4awkdej https://www.desmos.com/calculator/h1ctokasxm

Here is an example using Wolfram|Alpha. Note that $$1/\lfloor x \rfloor < 2/x$$ for all $$x > 1$$. However, Wolfram|Alpha seems to think otherwise.

Input:

Solve 1/floor(x) < 2/x for x > 1


Output:

##### Solution over the reals

$$\displaystyle x = \frac{99}{5} \approx 19.8000$$

A different solution appears if the terms are rearranged.

Input:

Solve x < 2 floor(x) for x > 1


Output:

##### Solution over the reals

$$\displaystyle x = \frac{759}{10} = 75.9000$$

One can try changing the range of $$x$$ (such as $$x > 20$$, or $$x > 76$$, to avoid the previous solutions) to get some other values as the answer.

I don't know how Wolfram|Alpha internally defines the floor function, but it clearly has trouble handling some inequalities that use it.

• This is very interesting. I'd be happy to know why this happens. Dec 27, 2022 at 3:06

"solve the simple equation ax−b=0 for x. The answer given is typically b/a, but that is wrong if a=0"

But is it truly wrong?

One gets the same result manually.

Taken as a limit where a ⇒ 0 it's correct.

Granted it's undefined at that exact value and that has to be taught, but the question implicitly brings Numerical Methods into play as it involves computers. When dealing with floating point numbers, i.e. non-integers, the very concept of equality is a mistake.

In the computer language APL, it defines 0/0 = 1. Ironically APL was created specifically for math. In the mathematical abstract it's undefined, but in numerical methods it often makes more sense than what most languages do, which is to crash, because more often than not the computation is approaching zero in the denominator when it ran out of bits.

• Interesting. In APL the expression $$f(\theta) = \frac{\sin(3\theta)}{\sin(2\theta)}$$is defined for all $\theta$ and $f(0) = 1$ ?? Dec 24, 2022 at 21:35
• @Gerald Edgar - l'hopital is not amused! It's a great counter example. Dec 24, 2022 at 21:42