Post Reply 
On the format of the output of fMax
06-27-2014, 12:32 AM (This post was last modified: 06-27-2014 04:29 PM by Alberto Candel.)
Post: #1
On the format of the output of fMax
In CAS, the input fMax(f(x),x=a..b) returns a sequence consisting of the numbers x between a and b where the function f attains a Max value. For example, fMax(x^2, x=-2..2) returns -2,2. However, if there is just one such value x, it returns seq[x], like fMax(x+1,x=-2..2) returning seq[2].
Why not just 2, or even better, {2} (or {-2,2} above)?

Some of my Adv Calc students have a Prime (because I suggested it to them) and at first could not understand the "seq[x]" thing.

(As Helge points out below, there was a typo. I have replaced fMax(x+1,x=-2,2) with fMax(x+1,x=-2..2).)
Find all posts by this user
Quote this message in a reply
06-27-2014, 01:50 PM
Post: #2
RE: On the format of the output of fMax
Not sure what you are meaning to say, and there must be a typo somewhere in the OP, because fMax(x+1,x=-2,2) is non-sensical and returns an error message for me "Bad argument value."

fMax(x+1,x=-2..2) returns 2 (correct). I don't get the seq[.] output at all.
Find all posts by this user
Quote this message in a reply
06-27-2014, 04:27 PM
Post: #3
RE: On the format of the output of fMax
The output of fMax is a sequence, that is a list of values without delimiters. Since you could not make the distinction between a sequence of one element and the element, the sequence is printed with seq[ ... ] if there is one element inside.
Find all posts by this user
Quote this message in a reply
06-27-2014, 04:30 PM (This post was last modified: 06-27-2014 04:31 PM by Alberto Candel.)
Post: #4
RE: On the format of the output of fMax
(06-27-2014 01:50 PM)Helge Gabert Wrote:  Not sure what you are meaning to say, and there must be a typo somewhere in the OP, because fMax(x+1,x=-2,2) is non-sensical and returns an error message for me "Bad argument value."

fMax(x+1,x=-2..2) returns 2 (correct). I don't get the seq[.] output at all.

Yes, there was a typo. Fixed it. Thanks!
But I do get seq[2]. Maybe we have different settings somewhere in the Prime system?
Find all posts by this user
Quote this message in a reply
06-27-2014, 05:26 PM
Post: #5
RE: On the format of the output of fMax
Yes, we must have different CAS settings.

I have angle measure: rad, number format: std, integers: dec, simplify: min, exact, use sqrt, principal, use i checked.

The second settings page probably doesn't matter.

[By the way, it would be neat, if at some point in the future fMin and fMax could be expanded to also find minima and maxima in two (or more) dimensions . . . just dreaming].
Find all posts by this user
Quote this message in a reply
06-27-2014, 07:53 PM
Post: #6
RE: On the format of the output of fMax
(06-27-2014 05:26 PM)Helge Gabert Wrote:  Yes, we must have different CAS settings.

I have angle measure: rad, number format: std, integers: dec, simplify: min, exact, use sqrt, principal, use i checked.

The second settings page probably doesn't matter.

[By the way, it would be neat, if at some point in the future fMin and fMax could be expanded to also find minima and maxima in two (or more) dimensions . . . just dreaming].

well, i have the same settings as you, but still get seq[.].
Find all posts by this user
Quote this message in a reply
06-27-2014, 08:51 PM
Post: #7
RE: On the format of the output of fMax
   


OK, here is the emulator screen (physical prime is the same).
Find all posts by this user
Quote this message in a reply
06-27-2014, 09:09 PM
Post: #8
RE: On the format of the output of fMax
After purge(x):

fMax(x+1,x=-2..2) results in seq[2]

At first the "error: Bad Argument" result was received because x had a previous value. I used purge to remove the x variable before this would work.

-Dale-
Find all posts by this user
Quote this message in a reply
06-28-2014, 04:53 AM
Post: #9
RE: On the format of the output of fMax
(06-27-2014 05:26 PM)Helge Gabert Wrote:  Yes, we must have different CAS settings.

I have angle measure: rad, number format: std, integers: dec, simplify: min, exact, use sqrt, principal, use i checked.

The second settings page probably doesn't matter.

[By the way, it would be neat, if at some point in the future fMin and fMax could be expanded to also find minima and maxima in two (or more) dimensions . . . just dreaming].

well, i have the same settings as you, but still get seq[.].
Find all posts by this user
Quote this message in a reply
06-28-2014, 06:11 AM
Post: #10
RE: On the format of the output of fMax
seq[...] is displayed if textbook display is not checked.
Find all posts by this user
Quote this message in a reply
06-28-2014, 02:36 PM
Post: #11
RE: On the format of the output of fMax
(06-28-2014 06:11 AM)parisse Wrote:  seq[...] is displayed if textbook display is not checked.

Yes! thank you! i forget that there is textbook display and textbook entry.
Find all posts by this user
Quote this message in a reply
Post Reply 




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