Graphing a Circle
You can express a unit circle centered at origin in many ways:
-
Implicit relation
x^2 + y^2 = 1
-
Polar equation
r = 1
-
Combinations of explicit relations
y = sqrt(1 − x^2) ∨ y = −sqrt(1 − x^2)
x = sqrt(1 − y^2) ∨ x = −sqrt(1 − y^2)
-
Parametric equation
x = cos(t) ∧ y = sin(t)
-
Complex function
x + i y = exp(i t)
In Graphest, each of the above formulae is called a relation.
Entering a Relation
-
A relation must contain at least one of
=
,<
,≤
,>
, or≥
, as iny = sin(x)
orsin(x) < cos(y)
.-
It can also be a compound formula, such as
y = sin(x) ∨ y = cos(x)
.
-
-
Enter the product of
x
andy
asx y
, instead ofxy
.-
You don’t need a space around parentheses or in a expression like
2x
.
-
-
Enter the sine of \(x\) as
sin(x)
, instead ofsinx
orsin x
. -
Use parentheses
(
)
to group a part of a relation, as in1 / (x + 3)
.-
Other kinds of brackets such as
[
]
or{
}
cannot be used for this purpose.
-
-
You can use
x
,y
,r
andθ
as coordinate variables.-
Each point in Cartesian coordinates has infinitely many counterparts in polar coordinates. For example, \((x, y) = (1, 0)\) is identical to \((r, θ) = (1, 0), (1, ±2π), (1, ±4π), …; (−1, ±π), (−1, ±3π), …\)
-
You can restrict the range of
r
orθ
, as inr = θ ∧ 0 ≤ θ < 2π
.
-
-
You can use
t
as a real parameter. Example:x = t cos(t) ∧ y = t sin(t) ∧ 0 ≤ t < 2π
-
You can use
m
andn
as independent integer parameters. Example:(x − 0.3m)^2 + (y − 0.3n)^2 < 0.1^2 ∧ |n| ≤ 5 ∧ mod(m + n, 3) = 0
Reading a Graph
Each pixel of a graph is painted based on whether it contains a solution of the relation or not.
Pixel Color | Meaning |
---|---|
Opaque |
The pixel contains a solution. |
Translucent |
The pixel may or may not contain a solution. |
Transparent |
The pixel does not contain a solution. |
Built-in Definitions
Constants
Input | Interpreted as | Notes | Links |
---|---|---|---|
Real Numbers |
|||
|
123 |
||
|
\(e ≈ 2.71828\) |
The base of natural logarithms. |
|
|
\(π ≈ 3.14159\) |
||
|
\(γ ≈ 0.577216\) |
||
Complex Numbers |
|||
|
\(i = \sqrt{−1}\) |
The imaginary unit. |
Variables
Input | Interpreted as | Notes |
---|---|---|
Cartesian Coordinate System |
||
|
\(x\) |
The horizontal coordinate. |
|
\(y\) |
The vertical coordinate. |
Polar Coordinate System |
||
|
\(r\) |
The radial coordinate. |
|
\(θ\) |
The angular coordinate. |
Integer Parameters |
||
|
\(m\) |
A parameter that spans all integers. |
|
\(n\) |
A parameter that spans all integers. |
Real Parameter |
||
|
\(t\) |
A parameter that spans all real numbers. |
A relation \(R\) that contains parameters is interpreted as \(∃m, n ∈ ℤ, ∃t ∈ ℝ : R\).
Real Functions
Arithmetic
Input | Interpreted as | Notes |
---|---|---|
|
\(−x\) |
|
|
\(x + y\) |
|
|
\(x − y\) |
|
|
\(xy = x ⋅ y\) |
|
|
\(\dfrac{x}{y}\) |
Undefined for \(y = 0\). |
Number Parts
Input | Interpreted as | Notes | Links |
---|---|---|---|
|
\(|x|\) |
The absolute value of \(x\). |
|
|
\(\sgn x = \begin{cases} -1 & \if x < 0, \\ 0 & \if x = 0, \\ 1 & \if x > 0 \end{cases}\) |
The sign function. |
Exponentiation and Logarithm
Input | Interpreted as | Notes | Links |
---|---|---|---|
|
\(\sqrt{x} = x^{1/2}\) |
Undefined for \(x < 0\). |
|
|
\(x^y\) |
|
|
|
\(x^y\) with some extension |
The cube root of \(x\) can be entered as |
|
|
\(\exp x = e^x\) |
||
|
\(\ln x = \log_e x\) |
Undefined for \(x ≤ 0\). |
|
|
\(\log_b x = \dfrac{\ln x}{\ln b}\) |
Undefined for \(x ≤ 0\), \(b ≤ 0\), and \(b = 1\). |
Comparison of x^y
and x^^y
For \(x ≥ 0\), both x^y
and x^^y
gives the same value, \(x^y\). For \(x < 0\), x^y
is only defined for integer exponents, while x^^y
is also defined for rational number exponents with odd denominators. The exact definition of these operators are as follows.
-
For an integer \(n\), both
x^n
andx^^n
gives:\(x^n = \begin{cases} \overbrace{x × ⋯ × x}^{(n \text{ copies})} & \if n > 0, \\ 1 & \if n = 0 ∧ x ≠ 0, \\ 1 / x^{-n} & \if n < 0. \end{cases}\)
\(0^0\) is left undefined.
-
For a non-integer \(y\), they can give different results:
-
x^y
gives the principal value of \(e^{y \ln x}\) or its limit as \(x → 0\):\(x^y = \begin{cases} 0 & \if x = 0 ∧ y > 0, \\ e^{y \ln x} & \otherwise. \end{cases}\)
-
If \(y\) is a rational number \(p/q\) with odd \(q\), assuming \(p\) and \(q\) \((> 0)\) be coprime integers,
x^^y
gives \((\sqrt[q]{x})^p\), where \(\sqrt[q]{x}\) is the real-valued \(q\)th root of \(x\). -
Otherwise,
x^^y
gives the same result asx^y
described above.
-
Trigonometry
Input | Interpreted as | Notes | Links |
---|---|---|---|
Trigonometric Functions |
|||
|
\(\sin x\) |
||
|
\(\cos x\) |
||
|
\(\tan x\) |
||
Inverse Trigonometric Functions |
|||
|
\(\sin^{−1} x\) |
The range is \([−π/2, π/2]\). |
|
|
\(\cos^{−1} x\) |
The range is \([0, π]\). |
|
|
\(\tan^{−1} x\) |
The range is \((−π/2, π/2)\). |
|
|
The two-argument arctangent. |
||
Hyperbolic Functions |
|||
|
\(\sinh x\) |
||
|
\(\cosh x\) |
||
|
\(\tanh x\) |
||
Inverse Hyperbolic Functions |
|||
|
\(\sinh^{−1} x\) |
||
|
\(\cosh^{−1} x\) |
||
|
\(\tanh^{−1} x\) |
Divisibility
Input | Interpreted as | Notes | Links |
---|---|---|---|
|
\(x \bmod y = x - y \left⌊ \dfrac{x}{y} \right⌋\) |
The remainder of \(x/y\) (modulo operation). |
|
|
\(\gcd \set{x_1, …, x_n}\) |
The greatest common divisor of the numbers in the set \(\set{x_1, …, x_n}\). |
|
|
\(\lcm \set{x_1, …, x_n}\) |
The least common multiple of the numbers in the set \(\set{x_1, …, x_n}\). |
Ordering
Input | Interpreted as | Notes | Links |
---|---|---|---|
|
\(\max \set{x_1, …, x_n}\) |
The largest and the smallest elements of the set \(\set{x_1, …, x_n}\), respectively. |
|
|
The \(k\)th largest and the \(k\)th smallest elements of the list \(\list{x_1, …, x_n}\), respectively. |
Rounding
Input | Interpreted as | Notes | Links |
---|---|---|---|
|
\(⌊x⌋\) |
The floor function. |
|
|
\(⌈x⌉\) |
The ceiling function. |
Complex Functions
To use a complex function when all arguments are real, add a dummy imaginary part to one of them as x + 0i
.
Arithmetic
Input | Interpreted as | Notes |
---|---|---|
|
\(−z\) |
|
|
\(z + w\) |
|
|
\(z − w\) |
|
|
\(zw = z ⋅ w\) |
|
|
\(\dfrac{z}{w}\) |
Undefined for \(w = 0\). |
Number Parts
Input | Interpreted as | Notes | Links |
---|---|---|---|
Real-Valued |
|||
|
\(\Re z\) |
The real part of \(z\). |
|
|
\(\Im z\) |
The imaginary part of \(z\). |
|
|
\(|z|\) |
The absolute value of \(z\). |
|
|
\(\arg z\) |
The argument of \(z\). |
|
Complex-Valued |
|||
|
\(\bar z\) |
The complex conjugate of \(z\). |
|
|
\(\sgn z = \begin{cases} 0 & \if z = 0, \\ \dfrac{z}{|z|} & \if z ≠ 0 \end{cases}\) |
The complex sign of \(z\). |
Exponentiation and Logarithm
Input | Interpreted as | Notes | Links |
---|---|---|---|
|
\(\sqrt{z} = z^{1/2}\) |
Branch cuts: \((−∞, 0)\), continuous from above. |
|
|
\(z^w = \begin{cases} 0 & \if z = 0 ∧ \Re w > 0, \\ e^{w \ln z} & \if z ≠ 0 \end{cases}\) |
Undefined for \((z, w)\) if \(z = 0 ∧ \Re w ≤ 0\). |
|
|
\(\exp z = e^z\) |
||
|
\(\ln z = \log_e z\) |
Undefined for \(z = 0\). |
|
|
\(\log_b z = \dfrac{\ln z}{\ln b}\) |
Undefined for \(z = 0\), \(b = 0\), and \(b = 1\). |
Trigonometry
Input | Interpreted as | Notes | Links |
---|---|---|---|
Trigonometric Functions |
|||
|
\(\sin z\) |
||
|
\(\cos z\) |
||
|
\(\tan z\) |
||
Inverse Trigonometric Functions |
|||
|
\(\sin^{−1} z\) |
Branch cuts: \((−∞, −1)\), continuous from above; \((1, ∞)\), continuous from below. |
|
|
\(\cos^{−1} z\) |
Branch cuts: \((−∞, −1)\), continuous from above; \((1, ∞)\), continuous from below. |
|
|
\(\tan^{−1} z\) |
Branch cuts: \((−i∞, −i)\), continuous from the left; \((i, i∞)\), continuous from the right. |
|
Hyperbolic Functions |
|||
|
\(\sinh z\) |
||
|
\(\cosh z\) |
||
|
\(\tanh z\) |
||
Inverse Hyperbolic Functions |
|||
|
\(\sinh^{−1} z\) |
Branch cuts: \((−i∞, −i)\), continuous from the left; \((i, i∞)\), continuous from the right. |
|
|
\(\cosh^{−1} z\) |
Branch cuts: \((−∞, 1)\), continuous from above. |
|
|
\(\tanh^{−1} z\) |
Branch cuts: \((−∞, −1)\), continuous from above; \((1, ∞)\), continuous from below. |
Formulae
Equations and Inequalities
Input | Interpreted as | Notes |
---|---|---|
|
\(x = y\) |
\(x\) and/or \(y\) can be either real or complex. |
|
\(x < y\) |
\(x\) and \(y\) must be real. |
|
\(x ≤ y\) |
\(x\) and \(y\) must be real. |
|
\(x > y\) |
\(x\) and \(y\) must be real. |
|
\(x ≥ y\) |
\(x\) and \(y\) must be real. |
These operators can be chained. For example, 0 ≤ θ < 2π
is equivalent to 0 ≤ θ ∧ θ < 2π
.
Logical Connectives
Input | Interpreted as | Notes |
---|---|---|
|
\(P ∧ Q\) |
Logical conjunction (logical AND). |
|
\(P ∨ Q\) |
Logical disjunction (logical OR). |
|
\(¬P\) |
Negation (logical NOT). |
\(P\) and \(Q\) must be formulae.
Conditional Expressions
Input | Interpreted as | Notes |
---|---|---|
|
\(\begin{cases} x & \if P, \\ y & \otherwise \end{cases}\) |
\(P\) must be a formula. |
Special Functions
All functions accept only real inputs at the moment.
Input | Interpreted as | Notes | Links |
---|---|---|---|
|
\(W(x) = W_0(x)\) |
The Lambert W function. |
|
|
\(Γ(x)\) |
The gamma function. |
|
|
\(Γ(a, x)\) |
The upper incomplete gamma function. |
|
|
\(\ln Γ(x)\) |
The log-gamma function. |
|
|
\(ψ(x)\) |
The digamma function. |
|
|
\(\operatorname{erf}(x)\) |
The error function. |
|
|
\(\operatorname{erfc}(x)\) |
The complementary error function. |
|
|
\(\operatorname{erfi}(x)\) |
The imaginary error function. |
|
|
\(\operatorname{erf}^{-1}(x)\) |
The inverse error function. |
|
|
\(\operatorname{erfc}^{-1}(x)\) |
The inverse complementary error function. |
|
|
\(\operatorname{Ei}(x)\) |
The exponential integral. |
|
|
\(\operatorname{li}(x)\) |
The logarithmic integral. |
|
|
\(\operatorname{Si}(x)\) |
The sine integral. |
|
|
\(\operatorname{Ci}(x)\) |
The cosine integral. |
|
|
\(\operatorname{Shi}(x)\) |
The hyperbolic sine integral. |
|
|
\(\operatorname{Chi}(x)\) |
The hyperbolic cosine integral. |
|
|
\(S(x)\) |
The Fresnel integrals. |
|
|
\(J_n(x)\) |
The Bessel functions. |
|
|
\(I_n(x)\) |
The modified Bessel functions. |
|
|
\(\operatorname{Ai}(x)\) |
The Airy functions and their derivatives. |
|
|
\(\operatorname{sinc}(x) = \begin{cases} 1 & \if x = 0, \\ \dfrac{\sin x}{x} & \if x ≠ 0 \end{cases}\) |
The (unnormalized) sinc function. |
|
|
\(K(m)\) |
||
|
\(E(m)\) |
||
|
\(ζ(s)\) |