
Locus
Another exclusive Foundation RISCWorld application
Exercise 2. Domain and Ranges
We shall now try some trigonometric functions. Set 'auto-scaling' to 'on' and 'squaring up' to 'off', that is, the auto scaling button should be 'in' and squaring up 'out'.
Ensure that Locus is set to degrees mode. There are two buttons on the top row, one showing a full circle, representing degrees, and the other a broken circle, representing radian measure. Check that the degrees button is 'on', and if not click on it.
Check that the 'xmin' icon reads '-180' and the 'ymin' icon reads '180'. (If they do not contain these figures then click in the appropriate icon, press Ctrl U to clear the icon, and type in the correct values.)
There is a choice of two different methods for entering formulae. For the first you just type the required formula in the formula input icon (the method used in the previous exercise). The second method lets you select a formula from a menu.. Click on the 'menu' button to the right of the formula input icon and a long menu will appear containing the preset formulae. The first entry should be 'sinx'. Click on this and it will appear in the formula icon. Now press RETURN or click on the <Plot> button to plot the graph of 'y=sinx'.
If you look at the formula menu you will see that !Locus can recognise most standard algebraic forms of input. An exception is powers where the '^' symbol is used for powers greater than three. For a full list of the functions Locus will recognise see Appendix A at the end of the manual.
You could now return to Exercise 1 change the period of the graph by superimposing the graphs of y=sin2x and y=sin3x on top of y=sinx. Don't forget to turn off auto-scaling or the previous graphs will be erased before the new one is drawn.
We shall now consider 'domains' and 'ranges'. It is possible to use Locus without worrying about ranges, but you will have to understand domains. These are the values fed into a function. For instance, using the example 'y=sinx', the values which are given to the variable 'x' represent the domain of the function. In this example, all possible values of 'x' can be fed into the function, but there are functions such as 'y=1/(x+1)' where the value 'x=-1' has no meaning to the function. However you do not need to worry about this problem as Locus will deal with it automatically and draw an asymptote at the undefined point.
Look at the icons on the middle row. t-min and t-max are greyed out at the moment and do not concern us until we move on to polar and parametric graphs. Whatever the default settings you will need to change these manually at various times. Click with SELECT in the x-min icon and press Ctrl U which will clear the icon (as with all other RISC OS applications.) Now type in the new x-min value and press RETURN which will move the caret into the x-max icon where you can also change the value.
Example exercises
- Turn on auto-scaling
- Draw the graph of y=sinx as before
- Click in the x-min icon and Press Ctrl U to clear the icon
- Enter the value -360 and press RETURN to move the caret to the x-max icon
- Press Ctrl U to clear this icon and enter the value 360
- Press RETURN or click on the <Plot> button.
The graph of y=sinx will be redrawn using the domain -360 to 360 degrees. This has doubled the domain of x from the previous values of -180 to +180.
With this example a simpler method would be to use the negative zoom facility.
- Draw the graph of y=sinx using the domain -180<=x<=180
- Click on the button on the top row containing the picture of a magnifying glass and a minus sign.
As before the domain will double and, if auto-scaling is on, Locus will rescale the y axis appropriately. This could cause problems if xmin is greater than zero or xmax is less than zero as the graph would be drawn progressively further and further away from the origin.
In these situations the Move Graph icon can be used. This is the icon with blue arrows pointing out from the centre which will be found in the same group as the negative zoom icon. If you click on this the button will depress. Now move the pointer into the main window and you will find that you if you hold down the SELECT button you can drag the graph to a new position.
Foundation RISCWorld

|