How to write equations in the Graphzapp grapher

Intro

Define equations for x and y in terms of the variable t in order to draw a curve. Include the variable k to allow animation of the curve by sliding the k slider. Graphzapp has several built-in functions including logarithms and trigonometric functions.

Example: In the x= and y= boxes, write equations such as "cos(t + k)" or "log(2, t)"

Arithmetic

Use (+) for addition, (-) for subtraction, (*) for multiplication, (/) for division, and (^) for powers. Use parentheses to group parts of the expressions.

Example: Graph a parabola by typing "(1/2)*t^2 + 3*t - 1.5". We can also simply write "1/2t^2 + 3t - 1.5" to graph the same parabola.

Comparisons

Each comparison evaulates to 1 if true and 0 if false. The comparisons are (==) equal to, (!=) not equal to, (<) less than, (>) greater than, (<=) less than or equal to, and (>=) greater than or equal to.

Example: (7 != 6) has value 1. (5 < 4) has value 0. (t >= 0) has value 1 or 0, depending on the value of t.

Boolean Algebra

  • Logical AND (&) - returns 1 if both operands are true and 0 otherwise
  • Logical OR (|) - returns 1 if either operand is true and 0 otherwise
  • Logical NOT (!) - returns 1 when the operand is false and 0 when it is true

When evaluating, anything non-zero stands for true, and only 0 stands for false.

Example: (6 > 1 & 0 >= 4) has value 0. (1 == 0 | 5) has value 1. (1 == 0 | 0) has value 0.

Function Domains

Graphzapp will not graph any points where the x or y expression is undefined. The expression is undefined if it contains a division by 0, an indeterminate form, or an imaginary answer. Use divison by a boolean expression to limit the domain to only points where the expression is true.

Example: "t^0.5" will only graph where t is at least 0. "cos(t)/(-1 < t & t < 1)" will only graph where t is between -1 and 1.

Piecewise Functions

The (;) symbol lets the expression be definied piecewise. Each part is a value divided by a domain with semicolons (;) separating the parts. At each point, the grapher will draw the first of these parts which is defined when reading from the left, or draw nothing if all are undefined.

f(x) = {-1, x < -1 : 0, -1 <= x <= 1 : 1, x > 1}

Example: To graph the above piecewise function, we can type "-1/(t < -1); 0/(-1 <= t & t <= 1); 1/(t > 1)". An even simpler way would be writing "-1/(t < -1); 0/(t <= 1); 1".