standarddeviationcalculator.net

Updated Free · runs in your browser

Math

Function calculator

Type a function f(x) to evaluate it at a point, tabulate it, find its domain and inverse, and compose it with a second function g(x). The graph shows f, its inverse and the mirror line y = x.

Powers with ^, roots with sqrt(), ln and log (base 10), sin, cos, tan, e and pi.

Optional. Leave blank to skip f(g(x)).

f(4) 11/3
f(x)(2x + 3)/(x − 1)
f(4)11/3 ≈ 3.66667
Domainx ≠ 1
f⁻¹(x)(x + 3)/(x − 2)
y-intercept f(0)−3
f(g(x))(2x² + 3)/(x² − 1)
g(f(x))((2x + 3)/(x − 1))²
f(g(4))7/3
-6-4-20246-6-4-20246 (4, 3.667) x y

━ f(x) = (2x + 3)/(x − 1)   ━ f⁻¹(x) = (x + 3)/(x − 2)   ┄ y = x

xf(x)g(x)f(g(x))
−33/4921/8
−21/3411/3
−1−1/21undefined
0−30−3
1undefined1undefined
27411/3
39/2921/8
Show the working, step by step
  1. Substitute x = 4 into f.

    f(4) = (2·4 + 3)/(4 − 1) = 11/3

  2. Find the domain: look for division by zero, even roots of negatives and logarithms of non-positive numbers.

    Division: x − 1 ≠ 0, so x ≠ 1

  3. Find the inverse: write y = f(x), undo each operation in reverse order to get x in terms of y, then swap the letters.

    f⁻¹(x) = (x + 3)/(x − 2) Check: f(f⁻¹(x)) = x at test points.

  4. Compose: replace every x in f with g(x), and the other way round.

    f(g(x)) = (2x² + 3)/(x² − 1) g(f(x)) = ((2x + 3)/(x − 1))²

Functions, briefly

f : x ↦ f(x) (f ∘ g)(x) = f(g(x)) f(f⁻¹(x)) = x

A function assigns exactly one output to each input in its domain. The notation f(4) means “the output when the input is 4”. Composition chains two functions, and an inverse undoes a function, which is only possible when no two inputs share an output (the function is one-to-one).

A worked example

The defaults are f(x) = (2x + 3)/(x − 1), g(x) = x² and x = 4.

  1. Evaluate: f(4) = (8 + 3)/(4 − 1) = 11/3 ≈ 3.66667.
  2. Domain: the denominator x − 1 is zero at x = 1, so the domain is every real x except 1.
  3. Inverse: solving y = (2x + 3)/(x − 1) for x gives f⁻¹(x) = (x + 3)/(x − 2). Check: f⁻¹(11/3) = (11/3 + 3)/(11/3 − 2) = (20/3)/(5/3) = 4.
  4. Composition: f(g(x)) = (2x² + 3)/(x² − 1), so f(g(4)) = 35/15 = 7/3.
  5. y-intercept: f(0) = 3/(−1) = −3.

The table of values

From x = −3 to 3 in steps of 1, the default gives:

xf(x)g(x)f(g(x))
−33/4921/8
−21/3411/3
−1−1/21undefined
0−30−3
1undefined1undefined
27411/3
39/2921/8

f(g(x)) is undefined at x = ±1 because g sends both to 1, the one input f cannot take. A composition's domain is the set of x in g's domain whose output g(x) is in f's domain.

Domain rules

FeatureConditionExample
Fractiondenominator ≠ 01/(x + 2): x ≠ −2
Square (even) rootradicand ≥ 0√(x − 2): x ≥ 2
Logarithmargument > 0ln(x² − 1): x < −1 or x > 1
tan xcos x ≠ 0x ≠ π/2 + kπ

Common mistakes

  • Reading f⁻¹(x) as 1/f(x). The inverse undoes f; the reciprocal divides 1 by it. For f(x) = 2x, f⁻¹(x) = x/2 but 1/f(x) = 1/(2x).
  • Composing in the wrong order. f(g(x)) applies g first.
  • Missing brackets when substituting. f(x) = x² at x = −3 is (−3)² = 9, not −9.
  • Inverting a function that is not one-to-one. Restrict the domain first, as with x² on x ≥ 0.

Common questions

How do I evaluate a function at a value?

Replace every x in the formula with the value, in brackets, and work it out. For f(x) = (2x + 3)/(x − 1) at x = 4: f(4) = (2·4 + 3)/(4 − 1) = 11/3 ≈ 3.667. Brackets matter with negative inputs: f(−3) = (2(−3) + 3)/(−3 − 1) = −3/−4 = 3/4.

How do you find the domain of a function?

Start with all real numbers and remove the values that break a rule: a denominator cannot be zero, an even root needs a non-negative radicand, and a logarithm needs a positive argument. For (2x + 3)/(x − 1) only x = 1 is excluded. For √(4 − x²) you need 4 − x² ≥ 0, so the domain is [−2, 2].

How do you find the inverse of a function?

Write y = f(x), solve for x, then swap x and y. From y = (2x + 3)/(x − 1): y(x − 1) = 2x + 3, so xy − 2x = y + 3, x(y − 2) = y + 3 and x = (y + 3)/(y − 2). The inverse is f⁻¹(x) = (x + 3)/(x − 2). Only one-to-one functions have an inverse; for x² the calculator gives √x and notes that it inverts the branch x ≥ 0.

What is function composition?

f(g(x)) means apply g first, then f to the result: substitute the whole of g(x) for x in f. With f(x) = (2x + 3)/(x − 1) and g(x) = x², f(g(x)) = (2x² + 3)/(x² − 1). Order matters: g(f(x)) = ((2x + 3)/(x − 1))², a different function.

Why does the graph of the inverse look like a reflection?

If (a, b) is on the graph of f then (b, a) is on the graph of f⁻¹, and swapping the coordinates of a point reflects it in the line y = x. The calculator draws f, its inverse and y = x together so the symmetry is visible.