Questions? Problems? Please contact me at support@graphmatica.com for additional help or to report bugs.
Graphmatica supports the following operators, functions, and variables in your equations and user-defined functions. You can use the Special Characters tool window (Special Characters in the Edit menu) to enter characters that don't appear on your keyboard.
Operator | Meaning |
= | equals sign |
< > | strict inequality |
<= (≤), >= (≥) | less than or equal, greater than or equal |
+ | addition |
- | subtraction |
*, ×, · | multiplication |
/, ÷ | division |
% or mod | modulo (remainder after integer division) |
^ or ** or ⁰¹²³⁴⁵⁶⁷⁸⁹ | Exponentiation |
| | | Absolute value of expression between "|" characters |
[( )] | Parentheses1 |
; (semicolon) | Separate halves of a parametric equation or clauses in a piecewise-defined function |
' (single quote) | Make rest of the equation a comment |
{m, n} | Specify domain2 |
{(m, n]} | Specify domain exclusive of m and inclusive of n |
1 parentheses may be nested to any extent, and you can alternate between ( and [ to aid you in balancing your expressions, but the parser will not differentiate between ( and [.
2 m
is the start of the domain and n
is the end. Either end may be left open by omitting an operand.
Function | Meaning |
abs | absolute value (same as | | operator) |
acos, asec | arc cosine (inverse cosine), arc secant |
asin, acsc | arc sine, arc cosecant |
atan, acot | arc tangent, arc cotangent |
ceiling | least integer greater than the argument |
cos | cosine |
cosh | hyperbolic cosine |
cot | cotangent (1/tan x) |
csc | cosecant (1/sin x) |
cubert, ∛ | cube root |
exp | Euler's number to the given power |
fourthrt, ∜ | fourth root |
floor | synonym for int (greatest integer less than or equal to the argument) |
gamma, Γ | The statistical function Γ, defined by the recurrence relation Γ(x+1) = x Γ(x) |
gammaln, Γln | The natural logarithm of the gamma function. This may be used to prevent overflow when the desired expression is actually something like gamma(x)/e^x. |
int | greatest integer ([x] notation not supported) |
ln, log | natural logarithm, logarithm base 10 |
max(a,b) | maximum (greater of the two arguments) |
min(a,b) | minimum (lesser of the two arguments) |
rand | pseudo-random (time-based) number between 0 and arg |
sin | sine |
sinh | hyperbolic sine |
sec | secant (1/cos x) |
sign | -1 for x < 0, 0 for x = 0, 1 for x > 0 |
sqrt (sqr, √) | square root |
step | Heaviside step function: step(x) = 0, for x < 0, 1/2 for x = 0, 1 for x > 0 |
sum, Σ | Perform summation of a sequence or convergent infinite series. Detailed description and examples. |
tan | tangent |
tanh | hyperbolic tangent |
truncate | truncate towards zero (ceiling for x < 0, floor for x >= 0) |
Note that you may also define your own single-variable functions or constants using the Functions and Constants item in the Tools menu. You may reference these functions and constants in the same way as the built-in ones.
Variables | Usage |
x, y | rectangular coordinates |
r, t (θ) | r and θ in polar coordinates |
x, y, t | x and y as functions of t in parametric form |
t, x, dx | dif-eq mode, solves first order ODE* |
x, y, dy | (alternate notation) |
d2x, d3x ... | or higher order ODEs** |
t,x,y,z,w,dx ...dw | systems of ODEs |
t,x1 ...x4,dx1 ...dx4 | (alternate notation) |
t,x₁ ...x₄,dx₁ ...dx₄ | (using proper subscripts) |
a, b, c, j, k | user-settable free variables |
*dx is actually dx/dt in dx/dt = f(x,t)
**d2x is d²x/dt²
Constant | Value |
d, ° | converts degrees to radians = π/180 |
e | Euler's number = 2.718... |
pi (or p ) | π = 3.14159... |
Note: by default, all trig functions work in radians, not degrees. You can convert using the degrees symbol or the constant d:
sin (45°)
= sin (π/4)cos (x*d)
= cosine of x, in degreesYou will need to change the range of x to 0 to 360 to get the full graph.