All features
Two ways to ask:
- a math command, such as
solve(x^2=4) - a sentence in plain language, such as “solve x^2=4”
Numerical calculation
Operations, percentages and averages
Just type the expression: calc is the default command. You can also ask for operations, percentages and averages in your own words. When the result has an approximate value, it is given too.
- 4*8 → 32
- calculate 25% of 200 → 50
- calculate average of 4, 8 and 12 → 8
Fractions
Addition, simplification and common denominators
Add, multiply or simplify numerical or algebraic fractions. addfrac puts terms over a common denominator; simplify cancels common factors. The original denominators must remain nonzero. Mixed numbers such as 22 1/5 or 22 and 1 fifth are understood, and the result is given as a mixed number too.
- calculate 1/4+1/2 → 3/4
- 22 1/5 - 9 8/9 → 12 14/45
- addfrac(x+1/x) → (x² + 1)/x, for x ≠ 0
- simplify((1+x)^3/(1+x)) → (x + 1)², for x ≠ −1
Algebraic expressions
Simplification, expansion and algebraic identities
simplify simplifies without expanding and expand expands products and powers. You can also ask to simplify or expand in your own words.
- simplify(2x+3x) → 5x
- expand((1+x)^3) → x³ + 3x² + 3x + 1
- expand (2x-3)(2x+3) → 4x² − 9
Powers and roots
Exponents, square roots and nth roots
Use ^ for a power, sqrt for a square root and root(x, n) for an nth root. EMA simplifies expressions and keeps exact values; for real x, sqrt(x^2) equals |x|.
- calculate 2^10 → 1,024
- simplify sqrt(50) → 5√2
- simplify root(32,5) → 2
- simplify sqrt(x^2) → |x|
Exponentials and logarithms
Exponential, natural logarithm and logarithms with an explicit base
exp(x) denotes the exponential e^x, ln the natural logarithm and log the base-10 logarithm. For another base, write log(2, 8) or log2(8). Over the reals, the argument must be positive and the base positive and different from 1.
- calculate exp(ln(5)) → 5
- simplify ln(e^x) → x
- calculate log(100) → 2
- log(2, 8) → 3
- calculate log2(8) → 3
- (1+e)^2 → e² + 2e + 1 ≈ 13.8256
Arithmetic
GCD, LCM, prime numbers, factorials, Euclidean division
gcd and lcm take two or more numbers, factor breaks an integer into prime factors and div performs the Euclidean division of two integers or two polynomials, or decomposes a rational fraction.
The notation n! computes a factorial.
- gcd(24, 36) → 12
- lcm(4, 6) → 12
- factor(27880) → 2³ × 5 × 17 × 41
- div(12, 5) → 12 = 5 × 2 + 2
- div(x^4+x^2-1, x^2+1) → x² − 1/(x² + 1)
- 7! → 5,040
Differentiation and integration
Derivatives, antiderivatives, integrals, differential equations, Laplace transforms
diff differentiates with respect to x, or to the given variable, and integ gives an antiderivative, or the integral between two bounds, even infinite ones. Partial derivatives, differential equations and Laplace transforms can also be asked in your own words.
- diff(4x+cos(x)) → 4 − sin(x)
- diff(x^2*y, y) → x²
- integ(4x+8) → 2x(x + 4) + C
- integ(x^2, x, [0, 1]) → 1/3
- integ(exp(-x), x, [0, +inf]) → 1
Solving and factoring
Equations, inequalities, systems, factorizations
solve solves an equation, an inequality or a system in braces, over ℝ by default or over ℂ on request, and factor factors an expression.
- solve(4x^2=8) → x = { −√2, √2 }
- solve(2x>3, x) → x > 3/2
- solve({a+b=4, a-2b=1}) → { a = 3, b = 1 }
- solve x^2+4=0 in C → x = { −2i, 2i }
- factor(x^2-x-6) → (x + 2)(x − 3)
Limits and sums
Limits, from the left and from the right, finite and infinite sums
lim computes a limit, from the left or from the right with "left" or "right", resolving indeterminate forms step by step. sum computes a finite or infinite sum.
- lim(3-4/n, n->+inf) → 3
- lim(1/x, x->0, "right") → +∞
- sum(2^k, k=1, n) → 2ⁿ⁺¹ − 2
- sum(1/n^2, n=1, +inf) → π²/6
Function analysis
Domain, parity, asymptotes, extrema, inverse, tangent
dom gives the domain. For the rest, ask in your own words: parity, asymptotes, range, extrema, inverse, tangent, or the full analysis with “study”.
- dom(ln(x-1)) → x > 1
- parity of 1/(x^2+3) → even
- asymptotes of (x^2+1)/(x-1) → x = 1 and y = x + 1
- study f(x)=x^2-3x → domain, parity, derivative, variations and graph
Trigonometry
Exact values, radians and degrees, inverse functions
cos, sin, tan and their inverses acos, asin and atan work in radians, or in degrees with the ° sign. Special values stay exact.
The secant sec(x) is 1/cos(x), the cotangent cot(x) is cos(x)/sin(x) and the cosecant csc(x) is 1/sin(x), wherever the denominator is nonzero.
- cos(pi/4) → √2/2
- cos(45°) → √2/2
- acos(sqrt(2)/2) → π/4
- acos°(sqrt(2)/2) → 45
- calculate sec(60°) → 2
- calculate cot(pi/4) → 1
- calculate csc(30°) → 2
Complex numbers
Modulus, argument, exponential and polar forms
The imaginary unit is written i. mod gives the modulus, arg the argument and polar the exponential form.
- (1+i)^2 → 2i
- mod(3+4i) → 5
- arg(3+4i) → arctan(4/3) ≈ 0.9273
- polar(2+2i) → 2√2 · e^(iπ/4)
- sqrt(-4) → 2i
Geometry
Points, vectors, distances, midpoints, lines and slopes
coord defines a point or a vector: you can add them, compute their dot product, and norm gives their norm. Distances, midpoints, lines and slopes can be asked in your own words.
- coord(1,2)+coord(3,4) → coord(4, 6)
- coord(1,2)*coord(3,4) → 11
- norm(coord(3,4)) → 5
- distance (-1,8),(4,-2) → 5√5
- midpoint (1,2) and (3,4) → (2, 3)
Plotting
Graphs of one or several functions
draw plots a function over an interval of x, and up to nine curves together in braces. A second, optional interval sets the bounds of the y axis.
- draw(4x+5, x, [-10,10]) → the line y = 4x + 5
- draw({x^2, x^3}, x, [-10,10]) → both curves together
- draw(1/x, x, [-5,5], [-10,10]) → the y axis limited to [-10, 10]
- draw({sin(x), cos(x)}, x, [-pi,pi], [-2,2]) → two curves, the y axis limited to [-2, 2]
- plot sin(x) and cos(x) for x between -pi and pi
Definitions
Functions, sequences and variables to reuse
A definition with = is kept for the following calculations: function, sequence or variable. The last result is in res and its numeric value in num; listdef lists the definitions and cleardef clears them.
Explanations
Understand why a calculation gives its result
Add “explain” or “why” before a calculation to see the rules applied. Every answer also has its “More explanations” button, which unfolds all the details.
More examplesMiscellaneous
Decimals, scientific notation, word problems, checks
Precision you want, rank of a decimal, scientific notation, checking an equality, percentage or proportionality problems: ask the question in your own words.
- calculate pi with 20 decimals → 3.14159265358979323846
- the 67th decimal of sqrt(7) → 0
- 12*8 in scientific notation → 9.6 × 10¹
- show that (x+1)^2-(x-1)^2=4x → verified