numworks / epsilon

Modern graphing calculator operating system.
https://www.numworks.com/resources/engineering/software/
1.75k stars 467 forks source link

Solution not in the domain of the equation #2152

Open fbeleznay opened 9 months ago

fbeleznay commented 9 months ago

Describe the bug

Numworks finds a solution where the left hand side of the equation is not defined. I know, we should create separate reports for separate issues, but the following is I think related: When I graph the left hand side of the equation, the x-intercept is shown, where in fact it is not in the domain.

Screenshots

The equation: Screen Shot 2024-02-19 at 17 27 46 Setting xmin and xmax: Screen Shot 2024-02-19 at 17 28 13 The result: Screen Shot 2024-02-19 at 17 28 29 Note that for x=1 the left hand side is not defined. When I graph the left hand side, I get the following information, when I trace the curve to x=1: Screen Shot 2024-02-19 at 17 31 35 On the other hand, when I go to "Calculate" and then specify x=1, I get the correct "undefined" y-value. Screen Shot 2024-02-19 at 17 32 32

Expected behavior

I guess, Numworks uses numerical algorithms, and approximately, x=1 is indeed a solution, but it would be good if Numworks could recognize domain problems like this. In fact, as my last screenshot on the graph screen shows, it can. Is it possible, that algebraic manipulations are also used to simplify expressions? This would explain why x=1 is found as a solution, but if this is the case, then maybe the domain change of the expression is not handled carefully.

Environment

adri1numworks commented 6 months ago

Hi @fbeleznay , I'm sorry I missed your message. Thanks for reaching out ! This is indeed a bug and I've created a ticket internally to look into this issue. We'll also look into the topic you raised in ticket #2154