Polish notation. First exercice



In this exercice, we want to define a simple function :

Pasted Graphic 4

First method : using direct polish notation the entire way (which you had to up do version 2.1 of touchplot) :

You'll recognize I hope that the expression to enter (not the left-hand side of the equality, which will have been defined for you) is a quotient, so the first button you have to press (or rather touch...) is the divide button :

divide

Then you have to enter the numerator, which is obviously the sinus of x, so you have to press :

sinx

Then you want to enter the denominator, which is a sum :

plus

Left operand of the sum is a 1 :

1

Then the right member is x elevated to the power 2, which you get by pressing :

powerx2

Second method : with touchplot >= 2.3, you can make it a bit different, and probably a bit easier, but understanding the basic rules of direct polish notation is still helpful.

You can well begin with the numerator, forgetting for a moment the expression to enter is a division :

sinx

you get a valid formula at this point, the OK key is activated, which means you can either decide it is finished, or complete the formula by hitting :

divide

(the action of the divide button is the same as what one would have had writing a / symbol at the right end of the formula. If we added instead a constant or a function, it would have been multiplied at the right of the formula.)

At this point, get a quotient, with sin(x) as a numerator, and you have to enter the denominator.

With TouchPlot <= 3.1, one has to use polish notation for that, with :

plus1powerx2

or even :

plus1xpower2

With TouchPlot 3.2, you can do this a new way, by selecting first the denominator, which will subsequently lock editing in the said denominator. So from the beginning, if we do :

sinxdivideleftSelect

Then the formula display shows :

tut11

as the left selection here selected the last item of the formula, which is this blank on the denominator. By pressing the left and right selection arrow, one can select another part of the formula.

Now let's enter the denominator, beginning with

1

and we get

tut12

and you notice the denominator appears in red, indicating editing is now locked in the denominator of the fraction. It means that entering now :

plusxpower2

will finish our work so that we get :

tut13

Of course, the lock is still there, but it does not prevent to validate the formula. We could exit the lock by pressing :

rightSelect