Post Reply 
Unable to evaluate the following limit
06-02-2020, 04:23 AM
Post: #1
Unable to evaluate the following limit
I want to find the limit of the piece-wise function as follows:

[Image: cap4.png]

And here are the limit to find out

[Image: cap5.png]

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.

could you please help fix this issue.
Find all posts by this user
Quote this message in a reply
06-02-2020, 02:03 PM
Post: #2
RE: Unable to evaluate the following limit
Can you give the input as a commandline? Pictures are nice but can not be copied/pasted.
Find all posts by this user
Quote this message in a reply
06-02-2020, 02:57 PM (This post was last modified: 06-02-2020 02:59 PM by pinkman.)
Post: #3
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)
Find all posts by this user
Quote this message in a reply
06-02-2020, 04:19 PM
Post: #4
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

-road
Find all posts by this user
Quote this message in a reply
06-02-2020, 05:35 PM (This post was last modified: 06-02-2020 05:37 PM by victorvbc.)
Post: #5
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

-road

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.
Find all posts by this user
Quote this message in a reply
06-02-2020, 06:08 PM
Post: #6
RE: Unable to evaluate the following limit
Thanks, this is now fixed in the source code.
Find all posts by this user
Quote this message in a reply
06-02-2020, 06:59 PM
Post: #7
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.
Find all posts by this user
Quote this message in a reply
06-02-2020, 10:33 PM
Post: #8
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

-road

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?
Find all posts by this user
Quote this message in a reply
06-02-2020, 10:50 PM
Post: #9
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
Find all posts by this user
Quote this message in a reply
06-03-2020, 06:20 PM
Post: #10
RE: Unable to evaluate the following limit
Thank you parisse for fixing this. Thank you all for your help. Wink
Find all posts by this user
Quote this message in a reply
06-03-2020, 07:59 PM (This post was last modified: 06-03-2020 07:59 PM by pinkman.)
Post: #11
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?
Find all posts by this user
Quote this message in a reply
06-03-2020, 08:14 PM (This post was last modified: 06-04-2020 01:06 PM by victorvbc.)
Post: #12
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.
Find all posts by this user
Quote this message in a reply
06-03-2020, 09:00 PM
Post: #13
RE: Unable to evaluate the following limit
Thanks, I didn’t get it, now I do!
Find all posts by this user
Quote this message in a reply
Post Reply 




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