Unable to evaluate the following limit
06-02-2020, 04:23 AM
Post: #1
 teerasak Member Posts: 63 Joined: Jun 2019
Unable to evaluate the following limit
I want to find the limit of the piece-wise function as follows:

And here are the limit to find out

The expected answer is -1 and -1/3 respectively.

In the calculator with latest firmware (2020 01 21), it returns both limits to 0 which is not correct.

In the emulator (as in this picture), it provides error message for the first one, but provide the correct answer for the second one.

I verified this with TI Nspire, it provide the correct answer.

06-02-2020, 02:03 PM
Post: #2
 parisse Senior Member Posts: 1,305 Joined: Dec 2013
RE: Unable to evaluate the following limit
Can you give the input as a commandline? Pictures are nice but can not be copied/pasted.
06-02-2020, 02:57 PM (This post was last modified: 06-02-2020 02:59 PM by pinkman.)
Post: #3
 pinkman Senior Member Posts: 432 Joined: Mar 2018
RE: Unable to evaluate the following limit
Definition of f1:
f1(x):=PIECEWISE(x>1,x^2,(x>0) AND (x<=1),x-1,x<=0,0)

The first limit:
limit(f1(x^2),x,0,-1)

The second limit:
limit((f1(x-1))/(x+2),x,1,1)
06-02-2020, 04:19 PM
Post: #4
 roadrunner Senior Member Posts: 440 Joined: Jun 2015
RE: Unable to evaluate the following limit
In the simulator if you replace x^2 with x*x you get -1 for the first limit:

limit(f1(x*x),x,0,-1) --> -1

06-02-2020, 05:35 PM (This post was last modified: 06-02-2020 05:37 PM by victorvbc.)
Post: #5
 victorvbc Member Posts: 71 Joined: Jun 2019
RE: Unable to evaluate the following limit
(06-02-2020 04:19 PM)roadrunner Wrote:  In the simulator if you replace x^2 with x*x you get -1 for the first limit:

limit(f1(x*x),x,0,-1) --> -1

Apparently the expression x^2<=0 simplifies to false (??).

It works with x*x because the calculator doesn't automatically simplify that, so the limit takes the expression x*x<=0.
06-02-2020, 06:08 PM
Post: #6
 parisse Senior Member Posts: 1,305 Joined: Dec 2013
RE: Unable to evaluate the following limit
Thanks, this is now fixed in the source code.
06-02-2020, 06:59 PM
Post: #7
 Gene Moderator Posts: 1,362 Joined: Dec 2013
RE: Unable to evaluate the following limit
By the way, I'm not a big PRIME user, but let me say off-topic a thank you to Bernard for all his work on the CAS of multiple HP machines.
06-02-2020, 10:33 PM
Post: #8
 pinkman Senior Member Posts: 432 Joined: Mar 2018
RE: Unable to evaluate the following limit
(06-02-2020 05:35 PM)victorvbc Wrote:
(06-02-2020 04:19 PM)roadrunner Wrote:  In the simulator if you replace x^2 with x*x you get -1 for the first limit:

limit(f1(x*x),x,0,-1) --> -1

Apparently the expression x^2<=0 simplifies to false (??).

It works with x*x because the calculator doesn't automatically simplify that, so the limit takes the expression x*x<=0.

I don’t see it: how the 3rd condition could ever be true, even with x*x?
06-02-2020, 10:50 PM
Post: #9
 victorvbc Member Posts: 71 Joined: Jun 2019
RE: Unable to evaluate the following limit
(06-02-2020 10:33 PM)pinkman Wrote:  I don’t see it: how the 3rd condition could ever be true, even with x*x?

It's true if x=0
06-03-2020, 06:20 PM
Post: #10
 teerasak Member Posts: 63 Joined: Jun 2019
RE: Unable to evaluate the following limit
Thank you parisse for fixing this. Thank you all for your help.
06-03-2020, 07:59 PM (This post was last modified: 06-03-2020 07:59 PM by pinkman.)
Post: #11
 pinkman Senior Member Posts: 432 Joined: Mar 2018
RE: Unable to evaluate the following limit
(06-02-2020 10:50 PM)victorvbc Wrote:
(06-02-2020 10:33 PM)pinkman Wrote:  I don’t see it: how the 3rd condition could ever be true, even with x*x?

It's true if x=0

Yes I know that, but I don’t understand what you did understand:
Quote:Apparently the expression x^2<=0 simplifies to false (??).

It works with x*x because the calculator doesn't automatically simplify that, so the limit takes the expression x*x<=0.
What simplification could lead the algorithm to understand x*x is more <=0 than x^2?
06-03-2020, 08:14 PM (This post was last modified: 06-04-2020 01:06 PM by victorvbc.)
Post: #12
 victorvbc Member Posts: 71 Joined: Jun 2019
RE: Unable to evaluate the following limit
It's not about the expression itself, just that the calculator doesn't evaluate x*x<=0 to false, like it does with x^2<=0. Only if you simplify it.

Here's a screenshot to illustrate my point:

So my theory is the limit program doesn't have any problems with handling the inequality x*x<=0, but it can't handle the direct false from x^2<=0. That's why it throws the "Unable to handle when condition is false error".

Edit: The correct simplification, of course, should just be x^2<=0. Because if x is zero (or some imaginary number), the resulting expression is true.
06-03-2020, 09:00 PM
Post: #13
 pinkman Senior Member Posts: 432 Joined: Mar 2018
RE: Unable to evaluate the following limit
Thanks, I didn’t get it, now I do!
 « Next Oldest | Next Newest »

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