Guide to Graph Plotting Programme written by J Calder _____________________________________________________________________________ Purpose to help you learn about graphs of equations by giving you a computerised way of trying out lots of equations in a graph space It is especially useful for looking at families of equations like "straight lines" and "parabolas" and seeing what happens as we change the numbers. Access from "Active Maths" startup screen choose "Graph Plotting" While in the graph space, you can call this guide on to the screen anytime by pressing F4 Save typing When you are studying a family of equations which are all similar, you don't need to type equations again and again. F9 key the F9 key will COPY your previous equation and you only need to change the detail you are studying. or open edit You can even arrow into a previous equation and change it, Equations the programme types y = and you finish it off. FOR EXAMPLE - STRAIGHT LINES start with y = x then try equations where you add or subtract numbers to the x y = x + 1 y = x + 4 y = x - 3 and so on multiply you can then clear your graph space with the F5 key and try out x with multiplications and divisions note / NOTE use of / for "divide" with this system start with y = x then y = 2x y = 4x look for what is happening y = 6x as the number gets greater... y = 0.5x ...and smaller y = x/3 is "y = x divided by 3" y = x/5 "y = a half times x" looks like y = 1/2 * x which has the same meaning as y = x/2 Try them both out. 2 ideas Try 2 of these ideas together. You may learn better if together you keep one number constant (means "the same") for a while, like 3 or 4 equations, and change the other. y = 2x + 1 keeping the "2" constant y = 2x + 4 y = 2x - 3 y = 2x - 1 Clear the graph space with F5 if it's getting too full to see clearly what's happening, and make up your own families of equations. Look for ways of making sense of the patterns. e.g y = x + 4 y = 2x + 4 y = 3x + 4 y = x/2 + 4 Be sure to try these and your own equations like them: y = -x y = -2x y = -5x y = -1/2 * x Parabolas Begin your look at parabolas with the simplest equation: y = xý "y = x to the power of 2" You can see what multiplication by different numbers does to the shape: y = 2xý y = 3xý y = 4xý and so on also y = xý / 2 y = xý / 3 and so on Going back to your basic parabola, use these equations to work out how you can control the shifting of the vertex in both x and y directions: Remember to clear the graph space first with the F5 key.. y = xý y = xý + 3 y = xý + 5 y = xý - 2 and so on. Get the idea? y = (x+2)ý y = (x+3)ý y = (x+5)ý These last 3 equations should be shifting the vertex to the left. From them, work out the equations needed to get a shift the other way, to the right. Try them out. 2 ideas Now try these equations which put the 2 shift ideas together together: You will probably need another Clear first! y = (x+3)ý - 4 y = (x-3)ý - 4 y = (x-7)ý + 3 Challenge : make up and enter the equations which shift the vertex to: ( 8,-4) (-5, 2) (-1,-2) And another new idea for you.. try this one! y = -xý What will happen when you enter the above equations again but with - signs on them? Try it out! Other equations in the parabola family look like this: y = (x + 4)(x - 2) y = (x + 3)(x - 5) Check them out and see how the numbers show up on the graph. Other curves You can easily look at the "hyperbolas" which start with the equation y = 1/x And the ideas you have been using here to move the centre work on this one too. Here is going up and down: y = 1/x + 2 y = 1/x + 5 y = 1/x - 1 y = 1/x - 3 And of course, sideways shifting works by putting x in a bracket with a number: y = 1/(x + 4) y = 1/(x + 7) y = 1/(x - 3) y = 1/(x - 5) Higher powers I have been able to make the computer read "power of 2" for you from the F2 key as " ý " but you'll need the " ^ " mark to do other powers. I've programmed this mark on to the F6 key. It is normally [Shift] + [6] So to type "x to the power of 3" on this system you need to go with x^3 Some interesting higher power examples: note that these lines are usually very steep and it is easier to get a good look at their shapes by mutiplying them by small numbers like 0.2 y = x^3 power of 3 curve y = 0.2 x^3 y = x^3 + 4 y = x^3 - 2 y = (x + 4)^3 that sideways shift y = (x - 4)^3 again! then clear with F5 and try these 2 y = 0.2x^3 - xý + 3 y =-0.2x^3 + xý - 3 and looking at the powers as a family: y = 0.1 xý y = 0.1 x^3 y = 0.1 x^4 y = 0.1 x^5 y = 0.1 x^6 y = 0.1 x^7 notice how the odd and even powers compare. Note for CGA The older CGA graphics system does not have a ý for "power of 2" but the F2 key will still put the ^2 in for you. Advanced Ideas for teachers and advanced students There are some built-in functions in our computer system These include: (note the use of brackets) y = sqr(x) square root y = sin(x) y = cos(x) y = tan(x) also: exp, log, atn (inverse tangent) abs - "absolute value" can be useful cint - "round off to nearest integer" does some interesting things when thrown into your equations Circles The standard equation xý + yý = 1 for radius = 1 needs re-arranging to y = sqr(1 - xý) Even then, you will only get the top half of a circle because this system can only handle "functions" as in only one y value for each x value. The trick is to enter the equation again with a -ve sign on it. Shifting follows the same pattern as for anything else: eg with r = 3 y = sqr(9 - xý) and shift it y = sqr(9 - (x-5)ý ) + 4 along 5 up 4 That is: to go along 5, replace 'x' with a bracket '(x-5)' to go up 4 , add '+4' to the equation. Trig Works in radians in its present raw form. I am working on a higher level programme that will offer an alternative graph space for trig equations. In the meantime, here is a re-scaling which makes good use of the space for demo purposes: y = 4 sin(0.79x) y = 4 cos(0.79x) y = 4 tan(0.79x) The x-axis becomes: 1 -> 45 , 2 -> 90 ... Simultaneous A honey with this graph space; I've set it up for Equations multiple function display partly with these in mind. Non-linear simultaneous equations are no problem! You need to rearrange your equations into the form y = x expression then enter the 2 rearranged equations, and the solution set is the x and y co-ordinates of where the lines cross. HELP Some of the advice in this worksheet pops up on screen as a HELP window when you press the F1 key The F4 key brings this whole document on to the screen. Error with If the input equation does not follow the system rules input the present form of the programme will usually do nothing and ask for the next equation. You may also see a line plotted along the x-axis. A common error is to use \ instead of / for division. The effect can be quite interesting and a good learning opportunity if you want to experiment with it. \ is "integer division" with rounding off of all values involved. Improvements are possible! What I'm now working on are: * alternative set of axes for TRIG with a choice of working in degrees or radians * (further ahead) workspace for exploring transformation of shapes, including use of transformation matrices * re-scaling of axes, set your own range and domain All suggestions are welcome, and I hope it's useful! Contact me John Calder, Box 41-076, Auckland 3, ph 8282612