Representing a Function

There are three possible ways to represent a function:

  • analytically (by formula);
  • numerically (by table of values);
  • visually (by graph).

Analytical representation of a function.

This is the most common way to represent a function. We define a formula that contains arithmetic operations on constant values and the variable x{x} that we need to perform to obtain the value of y{y}.

For example, y=11+x2{y}=\frac{{1}}{{{1}+{{x}}^{{2}}}}, y=3x25{y}={3}{{x}}^{{2}}-{5}, etc.

Now, from the function y=11+x2{y}=\frac{{1}}{{{1}+{{x}}^{{2}}}}, we can find that y(2)=11+22=15{y}{\left({2}\right)}=\frac{{1}}{{{1}+{{2}}^{{2}}}}=\frac{{1}}{{5}}.

However, this is not the only way to represent a function. We can represent it analytically without a formula.

For example, consider the function y=[x]{y}={\left[{x}\right]} (floor function). Clearly, [1]=1{\left[{1}\right]}={1}, [2.5]=2{\left[{2.5}\right]}={2}, [13]=3{\left[\sqrt{{{13}}}\right]}={3}, [π]=4{\left[-\pi\right]}=-{4}, etc., but there is no formula that expresses [x]{\left[{x}\right]}.

Another example is f(x)=x!=123x{f{{\left({x}\right)}}}={x}!={1}\cdot{2}\cdot{3}\cdot\ldots\cdot{x}. The domain of this function is a set of natural numbers, because x{x} can take only natural values. So, f(3)=3!=6{f{{\left({3}\right)}}}={3}!={6}, but again, there is no formula that expresses x!{x}!.

Now, let's talk about the domain of the function.domain and range

We can state the domain of the function explicitly, for example, f(x)=x2,3x5{f{{\left({x}\right)}}}={{x}}^{{2}},{3}\le{x}\le{5}. This means that x{x} can change only in the interval [3,5]{\left[{3},{5}\right]}.

But often, the domain is given implicitly, i.e. the domain is all values of x{x} where f(x){f{{\left({x}\right)}}} is defined.

For example, for the function f(x)=x2+1{f{{\left({x}\right)}}}={{x}}^{{2}}+{1}, the domain is a set of all real numbers, i.e. the interval (,){\left(-\infty,\infty\right)}, because the function is defined for any value of x{x}.

The domain of the function h(x)=1x2{h}{\left({x}\right)}=\frac{{1}}{{{x}-{2}}} is all real numbers except x=2{x}={2}, i.e. (,2)(2,){\left(-\infty,{2}\right)}\cup{\left({2},\infty\right)}. x=2{x}={2} is not in the domain, because h(2){h}{\left({2}\right)} is not defined (the denominator equals 0{0}).

The domain of the function y(x)=1x2{y}{\left({x}\right)}=\sqrt{{{1}-{{x}}^{{2}}}} is [1,1]{\left[-{1},{1}\right]}, because for these values the expression under the root is non-negative, and, thus, the function y(x){y}{\left({x}\right)} is defined.

Moreover, in a real-world application, we also need to make sure that the function makes sense. For example, consider the law of free fall s=12gt2{s}=\frac{{1}}{{2}}{{g{{t}}}}^{{2}}. This function is defined for all t{t} but it doesn't make sense when t<0{t}<{0} (time can't be negative). Therefore, the domain of the function in the given situation is (0,){\left({0},\infty\right)}.

Example 1. Suppose that the perimeter of a rectangle is 24 cm. Find its area as the function of one side. Find the domain of this function.

Let's suppose that one side is x{x} and the second side is u{u}. Then, 2x+2u=24{2}{x}+{2}{u}={24}, or u=12x{u}={12}-{x}.

Therefore, the area is A=xu=x(12x){A}={x}{u}={x}{\left({12}-{x}\right)}. Thus, A(x)=x(12x){A}{\left({x}\right)}={x}{\left({12}-{x}\right)}.

Since length should be positive, x>0{x}>{0}. Also, area should be positive; so, 12x>0{12}-{x}>{0}, or x<12{x}<{12}. Thus, the domain is the interval (0,12){\left({0},{12}\right)}.

Let's work another quick example.

Example 2. State the domain of f(x)=1x23x{f{{\left({x}\right)}}}=\frac{{1}}{{{{x}}^{{2}}-{3}{x}}}.

Since x23x=x(x3){{x}}^{{2}}-{3}{x}={x}{\left({x}-{3}\right)} and the denominator can't equal 0{0}, the domain of the function is all real numbers except x=0{x}={0} and x=3{x}={3}.

One more quick example for practice.

Example 3. Find the domain of the function f(t)=t+t3{f{{\left({t}\right)}}}=\sqrt{{{t}}}+{\sqrt[{{3}}]{{{t}}}}.

Since the square root should be non-negative, the domain of the function is t0{t}\ge{0}.

And let's do another short example before passing on.

Example 4. Find f(x+h){f{{\left({x}+{h}\right)}}}, if f(x)=xx2+3x+4{f{{\left({x}\right)}}}=\frac{\sqrt{{{x}}}}{{{{x}}^{{2}}+{3}{x}+{4}}}.

f(x+h)=x+h(x+h)2+3(x+h)+4{f{{\left({x}+{h}\right)}}}=\frac{\sqrt{{{x}+{h}}}}{{{{\left({x}+{h}\right)}}^{{2}}+{3}{\left({x}+{h}\right)}+{4}}}.

Numerical (tabular) representation of a function.

In real life, the dependence between variables is formed based on experiments or observations. For example, at any given time t{t}, we can calculate the world population N{N}. We say that N{N} is a function of t{t} but can't find an explicit formula to express this. All we have is a table of values as below:

t{t} (in years) 1970 1980 1990 2000 2010
N{N} (in millions of people) 3835 4100 4545 5600 7300

However, in further topics of calculus, we will be able to find a function that will approximate these values.

Graphical representation of a function.

Although in calculus functions are not defined graphically, graphical representation is very helpful in studying functions.

Suppose that we are given a function y=f(x){y}={f{{\left({x}\right)}}} with the domain X{X}. Imagine a plane with two function graphperpendicular axes: the x-axis and the y-axis. Consider a pair of corresponding values x{x} and y{y}, where x{x} is taken from set X{X} and y=f(x){y}={f{{\left({x}\right)}}}. The image of this pair is the point A(x,y){A}{\left({x},{y}\right)} with the x-coordinate x{x} and the y-coordinate y{y}. When the variable x{x} is changing within the interval X{X}, this point describes some curve. This curve is the graph of the function y=f(x){y}={f{{\left({x}\right)}}}.

So, to draw the graph of the function, take from the interval X{X} points that are close to each other: x1,x2,x3,xn{x}_{{1}},{x}_{{2}},{x}_{{3}},\ldots{x}_{{n}}. Now, find the corresponding y-values: y1=f(x1){y}_{{1}}={f{{\left({x}_{{1}}\right)}}}, y2=f(x2){y}_{{2}}={f{{\left({x}_{{2}}\right)}}},..., yn=f(xn){y}_{{n}}={f{{\left({x}_{{n}}\right)}}}.

Draw the points (x1,y1){\left({x}_{{1}},{y}_{{1}}\right)}, (x2,y2){\left({x}_{{2}},{y}_{{2}}\right)},..., (xn,yn){\left({x}_{{n}},{y}_{{n}}\right)}. Connect these points by a smooth curve. We've obtained the graph of the function. Note: the more points you take, the more accurate graph you will obtain.

Let's move on to practical examples.

Example 5. Draw the graph of the function y=x2{y}={{x}}^{{2}} on the interval [0,1]{\left[{0},{1}\right]}.

graph of the parabolaLet's take the following points: x1=0{x}_{{1}}={0}, x2=0.2{x}_{{2}}={0.2}, x3=0.4{x}_{{3}}={0.4}, x4=0.6{x}_{{4}}={0.6}, x5=0.8{x}_{{5}}={0.8}, x6=1{x}_{{6}}={1}.

Now, find the corresponding y-values: y1=(0)2=0{y}_{{1}}={{\left({0}\right)}}^{{2}}={0}, y2=(0.2)2=0.04{y}_{{2}}={{\left({0.2}\right)}}^{{2}}={0.04}, y3=(0.4)2=0.16{y}_{{3}}={{\left({0.4}\right)}}^{{2}}={0.16}, y4=(0.6)2=0.36{y}_{{4}}={{\left({0.6}\right)}}^{{2}}={0.36}, y5=(0.8)2=0.64{y}_{{5}}={{\left({0.8}\right)}}^{{2}}={0.64}, y6=(1)2=1{y}_{{6}}={{\left({1}\right)}}^{{2}}={1}.

Draw the points (0,0){\left({0},{0}\right)}, (0.2,0.04){\left({0.2},{0.04}\right)}, (0.4,0.16){\left({0.4},{0.16}\right)}, (0.6,0.36){\left({0.6},{0.36}\right)}, (0.8,0.64){\left({0.8},{0.64}\right)}, (1,1){\left({1},{1}\right)} on the xy-plane and connect them by a smooth curve.

And a bit more work to memorize it better.

Example 6. Consider the function whose graph is shown to the left. Find f(0){f{{\left({0}\right)}}}, f(2){f{{\left({2}\right)}}} and state the domain and the range of f{f{}}.

graph of functionWe take the point x=0{x}={0} and move up until the intersection of the curve. The intersection is at the point 3{3}; so, f(0)=3{f{{\left({0}\right)}}}={3}. Similarly, f(2)=1{f{{\left({2}\right)}}}={1}.

The function is defined when 1x3-{1}\le{x}\le{3}; therefore, the domain of the function is the interval [1,3]{\left[-{1},{3}\right]}, and the range is [1,5.5]{\left[{1},{5.5}\right]}.

The graph of the function is a curve in the xy-plane. But the question arises: which curves in the xy-plane are graphs of functions? This is answered by the following test.

Vertical line test. A curve in the xy-plane is the graph of a function of x{x} if and only if no vertical line intersects the curve more than once.

Graphical representation allows us to determine easily whether the curve is a function.

vertical line test

Consider the graph of the function y2+x2=4{{y}}^{{2}}+{{x}}^{{2}}={4}. It is a cirlcle with a radius of 2. Clearly, it is not a function.graph of circle

To see why it is so, express y{y} in terms of x{x}: y2=4x2{{y}}^{{2}}={4}-{{x}}^{{2}}, or y=±4x2{y}=\pm\sqrt{{{4}-{{x}}^{{2}}}}. Because of ±\pm, we have two values of y{y} for every value of x{x}. Also, as can be seen from the graph, the function fails the vertical line test.

Parametric representation of a function.

Parametric representation is a slightly changed form of representing a function by a formula.

When we define a function by a formula, we use the following record: y=f(x){y}={f{{\left({x}\right)}}}, where f{f{}} is some formula.

But often, it is more convenient to represent a function using two functions and a parameter.

If we define a function as x=u(t),y=v(t){x}={u}{\left({t}\right)},{y}={v}{\left({t}\right)}, by changing the value of t{t} (parameter), we can find the corresponding pairs of x{x} and y{y}.

In general, we set some restrictions on t{t}. If we require atb{a}\le{t}\le{b}, the point (u(a),v(a)){\left({u}{\left({a}\right)},{v}{\left({a}\right)}\right)} is called initial, and the point (u(b),v(b)){\left({u}{\left({b}\right)},{v}{\left({b}\right)}\right)} is called terminal.

In some cases (but not always), it is possible to eliminate the paremeter t{t} and obtain the standard representation of y{y} as a function of x{x} (or x{x} as a function of y{y}).

Also, note that parametric equations can generate curves that are not functions.

Example 7. Draw the graph of the function x=t3+1,y=t21{x}={{t}}^{{3}}+{1},{y}={{t}}^{{2}}-{1}, 2t2-{2}\le{t}\le{2}.

parametric equationLet's find a couple of points that correspond to different values of t{t}.

t{t} x{x} y{y}
2-{2} (2)3+1=7{{\left(-{2}\right)}}^{{3}}+{1}=-{7} (2)21=3{{\left(-{2}\right)}}^{{2}}-{1}={3}
1-{1} (1)3+1=0{{\left(-{1}\right)}}^{{3}}+{1}={0} (1)21=0{{\left(-{1}\right)}}^{{2}}-{1}={0}
0{0} 03+1=1{{0}}^{{3}}+{1}={1} 021=1{{0}}^{{2}}-{1}=-{1}
1{1} 13+1=2{{1}}^{{3}}+{1}={2} 121=0{{1}}^{{2}}-{1}={0}
2{2} 23+1=9{{2}}^{{3}}+{1}={9} 221=3{{2}}^{{2}}-{1}={3}

The graph of this function is shown to the right.

Note that in this case we can eliminate the parameter t{t}: from the first equation, t=(x1)13{t}={{\left({x}-{1}\right)}}^{{\frac{{1}}{{3}}}}; plugging this equation for t{t} into the second equation gives y=(x1)231{y}={{\left({x}-{1}\right)}}^{{\frac{{2}}{{3}}}}-{1}.

And one more final example.

Example 8. Draw the function x=t2+t,y=t3t2{x}={{t}}^{{2}}+{t},{y}={{t}}^{{3}}-{{t}}^{{2}}, 2t2-{2}\le{t}\le{2}.

parametric equationLet's find a couple of points that correspond to different values of t{t}.

t{t} x{x} y{y}
2-{2} (2)2+(2)=2{{\left(-{2}\right)}}^{{2}}+{\left(-{2}\right)}={2} (2)3(2)2=12{{\left(-{2}\right)}}^{{3}}-{{\left(-{2}\right)}}^{{2}}=-{12}
1-{1} (1)2+(1)=0{{\left(-{1}\right)}}^{{2}}+{\left(-{1}\right)}={0} (1)3(1)2=2{{\left(-{1}\right)}}^{{3}}-{{\left(-{1}\right)}}^{{2}}=-{2}
0{0} 02+0=0{{0}}^{{2}}+{0}={0} 0302=0{{0}}^{{3}}-{{0}}^{{2}}={0}
1{1} 12+1=2{{1}}^{{2}}+{1}={2} 1312=0{{1}}^{{3}}-{{1}}^{{2}}={0}
2{2} 22+2=6{{2}}^{{2}}+{2}={6} 2322=4{{2}}^{{3}}-{{2}}^{{2}}={4}

Note that this is not a function, because it fails the vertical line test. Also, it is very hard to eliminate the parameter t{t}.