Math Template - what is this?
10-22-2020, 02:05 AM
Post: #1
 spiff72 Member Posts: 266 Joined: Oct 2020
Math Template - what is this?
Just messing around with the calculator after receiving it 2 days ago...

There is a template that I am not familiar with in the top row of the templates, third from left (between the exponent and derivative). It looks like a vertical bar with two entry items offset vertically. It's been almost 30 years since I took calculus classes, and this one struck me as unfamiliar.

Can someone tell me what this one is? I tried the help function but it just gave general info on the template button.
10-22-2020, 02:40 AM
Post: #2
 spiff72 Member Posts: 266 Joined: Oct 2020
RE: Math Template - what is this?
I may have answered my own question...

It appears to be the "with operator". So you can enter x*2 | x=12 and it evaluates to 24 (as a simple example).

I am not sure what the value of this is, as it would be easier to just enter 12*2, but maybe there is a programmatic application for this?
10-22-2020, 02:48 AM
Post: #3
 spiff72 Member Posts: 266 Joined: Oct 2020
RE: Math Template - what is this?
Hmm, I just tried the BITOR function in CAS, and tried it with the template, and I see that indeed they do the same thing BITOR(1,2) = 3 and 1 | 2 = 3

Initially I was trying the symbol (from the template) and couldn't get it to work in the Home screen (I was getting "Invalid Input" when I did it with just numbers. But it works in Home with the arguments I showed in the previous post.
10-22-2020, 05:41 AM
Post: #4
 pinkman Senior Member Posts: 434 Joined: Mar 2018
RE: Math Template - what is this?
It is the substitution operator, the built in help is located just after the last “z” entry.

It works the same way in Home and CAS, with lowercase var names.
X*e^X|X=2 -> 14.7781121979
x*e^x|x=2 -> 2*e^2

Thibault - not collector but in love with the few HP models I own - Also musician : http://walruspark.co
10-22-2020, 12:11 PM
Post: #5
 spiff72 Member Posts: 266 Joined: Oct 2020
RE: Math Template - what is this?
(10-22-2020 05:41 AM)pinkman Wrote:  It is the substitution operator, the built in help is located just after the last “z” entry.

It works the same way in Home and CAS, with lowercase var names.
X*e^X|X=2 -> 14.7781121979
x*e^x|x=2 -> 2*e^2

I am still struggling with finding this in the built in help. Where do you go to see this help (where are the "z" entries found?
10-22-2020, 12:43 PM
Post: #6
 Didier Lachieze Senior Member Posts: 1,648 Joined: Dec 2013
RE: Math Template - what is this?
(10-22-2020 12:11 PM)spiff72 Wrote:  I am still struggling with finding this in the built in help. Where do you go to see this help (where are the "z" entries found?

Press the Toolbox Key to open the Catalog, press the 2 key (Z) to go to the functions starting by z, then go down and after ztrans you have |, highlight it and press the Help key.
10-22-2020, 12:49 PM
Post: #7
 pinkman Senior Member Posts: 434 Joined: Mar 2018
RE: Math Template - what is this?
Thank you Didier, I might have been more precise!
My apologies to spiff72.

Thibault - not collector but in love with the few HP models I own - Also musician : http://walruspark.co
10-22-2020, 12:54 PM
Post: #8
 spiff72 Member Posts: 266 Joined: Oct 2020
RE: Math Template - what is this?
Got it now - thanks!
10-22-2020, 01:17 PM
Post: #9
 Arno K Senior Member Posts: 470 Joined: Mar 2015
RE: Math Template - what is this?
You select Toolbox, press z, scroll to | (where) , slowly perform a long press on it (select, but not copy to entry line) press Help and you will see.
Arno
10-22-2020, 01:39 PM (This post was last modified: 10-22-2020 01:40 PM by spiff72.)
Post: #10
 spiff72 Member Posts: 266 Joined: Oct 2020
RE: Math Template - what is this?
I did some more digging online about this operator, and I think I see the application of it for the calculator more clearly, as it lets you specify something like an integral, and you can then follow it with a with operator to specify that you want to constrain a variable (imagine evaluating it from -r to r), stating ... | r>0 for a situation where you want to restrict r to be only positive numbers (so you don't get "double negatives" if r happened to be negative).

I probably didn't explain that well, but it made sense to me :-)
10-24-2020, 05:52 AM
Post: #11
 Wes Loewer Senior Member Posts: 463 Joined: Jan 2014
RE: Math Template - what is this?
(10-22-2020 02:40 AM)spiff72 Wrote:  It appears to be the "with operator". So you can enter x*2 | x=12 and it evaluates to 24 (as a simple example).

I am not sure what the value of this is, as it would be easier to just enter 12*2, but maybe there is a programmatic application for this?

The operator can be a real time saver. For example, it's easier to type
SIN(X)/(X^2+X+1)|X=1.2345
than
SIN(1.2345)/(1.2345^2+1.2345+1)

Also, if you want to then evaluate the expression at some other X value, all you have to is edit just the one value. In fact you can evaluate at multiple values simultaneously.

SIN(X)/(X^2+X+1)|X={1,2,3}

It's especially useful for evaluating a derivative at a point.

∂(SIN(X)/(X^2+X+1),X)|(X=1)

You could do all this by either storing a value in X, or by defining a function, but | is more convenient.

Whenever I read this out loud, I usually say "at X=1" or "where X=1".
 « Next Oldest | Next Newest »