How to graph sin and cos function on grapher?
MacBook Pro, OS X Mountain Lion (10.8.2)
MacBook Pro, OS X Mountain Lion (10.8.2)
That's because you are graphing a y value of sin(6), which is about -0.27, for all values of x. That function has no independant variables. Instead, try the following options to see the differences:
y = sin(6x)
y = 6sin(x)
Exactly. In order to see anything other than a staright line on a graph, you must implicate both x and y in your sum. Just performing a sum on y all day will still get you a straight line.
yes.
Cool. Thanks a lot.
Bonjour,
To draw a graph 2D in Grapher.app you must use either cartesian coordinates x, y or polar coordinates r, theta, or a mixture of these four letters in an equation, e.g. f(x, y, r, theta) = g(x, y, r, theta)
x, y, r, theta can be only coordinates, nothing else.
So, your function f(theta) = 6sin(theta) is ambiguous for Grapher : what is theta ?
If the purpose is to define a function, don't use coordinates names, use any other letter as t, u, v , which is not a predefined constant or function name (Help > Show built-in Definitions).
A possible procedure is :
f(u) = 6sinu (define the function)
y = f(x) (to get the cartesian curve y = 6sinx)
or r = f(theta) (to get the polar curve r = 6sintheta)
I can't guess your idea about theta : simple variable in a function or the polar coordinate ?
A good 83 pages "Instructions for Use - Grapher" is available with various examples on
<http://y.barois.free.fr/grapher/>
Enjoy,
YB24
Extending the idea a bit, how would I animate a point over the curve ?
Here's how to animate a point along a graph. In this screenshot, we have the first function show the expected sine curve. The second function is a pair of values, defining x and y each as functions of "n" and then plotting the pair. Since x and y in this definition takes on one value at a time (and no range), you get a point. To animate the graph, you define "n" as a separate function (create a new function, delete the "y=" and replace with "n="). To make this a smooth evaluation of all points, click "n" to give it a value, and then press Option-Command-A to invoke "animation". You can then click the icon with checkmarks and two lines (to the far right seen here), and set the range for "n" along with subdivisions, or continuous values. You can then drag the slider to change the value for n, enter a specific value in the value box, or click the play button to animate back and forth.
Note that in this screen shot, to in part answer the original poster's question, I've defined "f(x)" as the function "sin(x)" and then to display the function, since grapher plots y as a function of x, I've set y=f(x) so this behavior can be drawn. Its redundant, but allows for the management of functions in some ways that might be useful. For instance, you could do a set of functions such as the following:
f(x)=x
g(x)=x^2
h(x)=x^3
...and then plot them all with y={f(x),g(x),h(x)}.
In this instance, since the graphs are all increased powers of x, you can follow this trend by plotting over a set of values:
set={1,2,3,4,5}
f(x)=x^set
This will plot x^1, x^2, x^3, x^4, x^5, etc...and you can also throw an "n" value in the set, then animate it, so some of the functions remain static while others are animated by the value of "n".
....the possibilities are vast. 🙂
Topher
Thanks for the response! I tried your solution, and grapher is throwing an error on the 2nd equation. It's complaining that a variable has not been set. Obviously that would be n. However when I set n to n= , it's still complaining. Can you do a screen cap and post the step by step? Or is that asking too much? I copied your equation exactly as written...but obviously something went askew.
Thanks
MIles
Here...
first delete the initial "y=" and enter "f(x)=sin(x)"
...then press Option-Command-N to enter a new equation, and then set it to "y=f(x)"
...then press Option-Command-N to enter a new equation, and then use the equation menu to the right to select a 2-dimensional parametric curve.
...Use the same menu to enter another set of brackets, and delete the "x" and "y" in them, and replace them with "n" and "sin(n)"
...finally, use Option-Command-N again and then set it to "n=2" or whatever value you want. With this one selected, you can then press Option-Command-A to "animate" it with a slider, and set the options for the slider values.
Topher,
Thanks! I actually had it the first time. I just didn't supply N = with a value! DUUUUUUH! Sorry to make you jump through hoops!
THank you thank you thank you good sir!
Miles.
How to graph sin and cos function on grapher?