Tutorials › Calculus III › Combining Tabulated and Formula-Based Values

Domains and Function Representations · Tutorial 221 of 999

Combining Tabulated and Formula-Based Values

Learn to assemble inputs from tables and formulas in the correct order, evaluate the scalar function, and check the result.

Beginner 10 min read

What You'll Learn

  • Identify which inputs come from a table and which come from a formula.
  • Read table headings and ordered input tuples consistently.
  • Evaluate each input before substituting into the scalar function.
  • Check whether a table contains the exact input required.
  • Verify the final value by reconstructing the ordered inputs.
  • Recognize and correct errors caused by swapping input positions.

Combining Two Kinds of Input

Some evaluations of a function of several variables use inputs obtained in different ways. One input may be read from a table, while another is calculated from a formula. The function itself may then be given by a formula or by a table. Accurate evaluation depends on keeping track of where each value comes from and which input position it belongs to.

This is a small but important bookkeeping task. A correct table value placed in the wrong position can produce an incorrect answer, even when every calculation is otherwise accurate. The reliable approach is to assemble the complete ordered input first, and only then evaluate the scalar function.

Key idea: Find each input value separately, keep the inputs in the order specified by the function, and then evaluate the function using that ordered input.

Inputs, Order, and Representations

A scalar function of two variables assigns one real number to each permitted ordered pair of real inputs. We write \(F(x,y)\) to show that the first input is \(x\) and the second is \(y\). In general, changing their positions can change the output: \(F(x,y)\) need not equal \(F(y,x)\).

An input value might be specified directly, calculated from a formula, or obtained by looking up the output of another function in a table. For example, if a table defines \(q\), then \(q(1)\) means the table entry whose input is \(1\), not the entry in the first row unless that row is actually labelled \(1\). A formula such as \(2t+1\) must be evaluated at the stated value of \(t\) before it can be used as an input to another function.

Definition: A combined-input evaluation is an evaluation in which one or more inputs to a scalar function are supplied by a table lookup and one or more other inputs are supplied by formulas or stated values. The inputs must be assembled in the order used by the scalar function.

When a function is represented by a table, use the row labels and column headings to identify the input and its position. A table with ordered pairs as inputs records values for specific pairs; an entry for \((a,b)\) does not automatically provide a value for \((b,a)\). Unless a rule for interpolation is stated, a table lookup gives only the listed values. If the required input is absent, the table alone does not determine the value.

As with any evaluation, the inputs also need to be permitted for the function being used. If a formula is given, its domain restrictions still apply. If a table gives the function, use the input information recorded in that table. The focus here is on combining representations without losing track of the inputs.

A Reliable Evaluation Procedure

It helps to delay evaluating the final scalar function until all its inputs have been found. The following sequence makes the bookkeeping visible.

1
Read the function's input order.
Write down which quantity belongs in each position, such as first input \(x\) and second input \(y\).
2
Find each input value.
Use the specified table entry for tabulated inputs, and evaluate each formula at the stated parameter values.
3
Assemble the ordered input.
Record the resulting values in the positions required by the function.
4
Evaluate and check.
Substitute the assembled inputs into the function and verify that each value came from the intended source and position.

Worked Evaluations

Worked Example: A Table Value and a Formula-Based Input

Suppose the table gives the following values of \(q\):

$$ \begin{array}{c|ccc} s & 0 & 1 & 2\\ \hline q(s) & 2 & 5 & -1 \end{array} $$

Let \(F(x,y)=x^2-y\). Find \(F(q(1),2t+1)\) when \(t=3\).

Step 1: Find the tabulated input. The table entry under \(s=1\) is \(q(1)=5\).

Step 2: Evaluate the formula-based input.

$$ 2t+1=2(3)+1=6+1=7. $$

Step 3: Assemble the inputs in order. The first input of \(F\) is \(q(1)=5\), and the second is \(2t+1=7\). Thus the ordered input is \((5,7)\).

Step 4: Evaluate.

$$ F(5,7)=5^2-7=25-7=18. $$

Check: Substituting the found inputs back into the original expression gives \(F(q(1),2t+1)=F(5,7)=18\), as calculated.

Worked Example: A Table with Two Input Positions

Suppose \(p(u,v)\) is given by this table:

$$ \begin{array}{c|c|c} u & v & p(u,v)\\ \hline 1 & 2 & 4\\ 2 & 0 & -3\\ 3 & 1 & 6 \end{array} $$

Let \(H(x,y,z)=2x+y-z\). Find \(H(p(u,v),u+2v,3w)\) for \(u=2\), \(v=0\), and \(w=1\).

Step 1: Read \(p(u,v)\) using its ordered pair. The required pair is \((u,v)=(2,0)\). The table entry for \((2,0)\) is \(p(2,0)=-3\).

Step 2: Evaluate the formula for the second input.

$$ u+2v=2+2(0)=2+0=2. $$

Step 3: Evaluate the formula for the third input.

$$ 3w=3(1)=3. $$

Step 4: Assemble and evaluate. In the order required by \(H(x,y,z)\), the inputs are \((-3,2,3)\). Therefore,

$$ H(-3,2,3)=2(-3)+2-3=-6+2-3=-7. $$

Check: The first input came from \(p(2,0)=-3\), the second from \(u+2v=2\), and the third from \(3w=3\). Placing these values back into \(H(p(u,v),u+2v,3w)\) gives \(2(-3)+2-3=-7\).

Worked Example: Using a Table Value as One Input to a Table Lookup

Let \(Q\) be given by \(Q(0)=2\) and \(Q(1)=-1\). Suppose a second function \(G(a,b)\) is given by:

$$ \begin{array}{c|c|c} a & b & G(a,b)\\ \hline 1 & 2 & 5\\ 3 & 2 & 11\\ 3 & -1 & 8 \end{array} $$

Find \(G(2s+1,Q(t))\) when \(s=1\) and \(t=0\).

Step 1: Calculate the formula-based first input.

$$ 2s+1=2(1)+1=3. $$

Step 2: Look up the table-based second input. Since \(t=0\), the given values of \(Q\) give \(Q(t)=Q(0)=2\).

Step 3: Assemble the ordered pair for \(G\). The first input is \(3\) and the second is \(2\), so the required pair is \((3,2)\). The table entry at that pair is \(G(3,2)=11\).

Check: Substituting the input values back into the expression gives \(G(2(1)+1,Q(0))=G(3,2)=11\). In particular, the table lookup uses the pair \((3,2)\), not a pair obtained by reversing its coordinates.

Why the Order Must Be Preserved

The rule follows directly from what a function evaluation means. A two-input function \(F\) takes an ordered pair as its input. If the first position receives a value \(a\) and the second receives a value \(b\), then the evaluation is \(F(a,b)\). Replacing that input with \((b,a)\) changes the input unless \(a=b\). There is no general rule that the output remains the same after this change.

This also explains why finding all the numbers is not enough: each number must be assigned to the correct position. Suppose the first input is supplied by a table lookup \(q(r)\) and the second by a formula \(m(t)\). The ordered pair is \((q(r),m(t))\). By the definition of evaluation, the result is \(F(q(r),m(t))\), which means evaluating each input and then applying \(F\) to the resulting pair. The table and formula provide values; they do not change the function's input order.

Justification: A function of two variables is evaluated at an ordered pair. Once each input source has supplied its value, the function receives the pair in its prescribed order. Therefore, combining table values and formula values is valid precisely when each value is placed in its assigned position.

A Common Mistake: Swapping the Inputs

Consider \(F(x,y)=10x+y\), with a table that gives \(q(0)=3\). Suppose the first input is \(q(0)\) and the second input is the formula value \(4\). The correct ordered input is \((3,4)\), so

$$ F(q(0),4)=F(3,4)=10(3)+4=30+4=34. $$

A common wrong calculation is to place the formula value first and the table value second:

$$ F(4,3)=10(4)+3=40+3=43. $$

The arithmetic in the wrong calculation is correct, but it evaluates the wrong ordered pair. The correction is to check the function notation before substituting: \(F(q(0),4)\) places \(q(0)\) first and \(4\) second. Reassembling those inputs gives \((3,4)\), and the correct value is \(34\).

Checks That Prevent Lookup Errors

Before accepting a combined evaluation, make a short audit of the inputs. Confirm that the table label or ordered input matches the requested lookup exactly. Check that any formula has been evaluated using the stated parameter values. Then write the complete input tuple in the same order as the function notation before carrying out the final calculation.

It is also important not to infer values that a table does not give. If a table lists \(G(1,2)\) but not \(G(2,1)\), the listed value does not determine the missing one. Likewise, if a requested input does not appear in a table, do not silently estimate or interpolate it. Use interpolation only when it is explicitly part of the given information or method.

These checks matter whenever values are assembled from more than one source. A written tuple makes the result traceable: each coordinate can be matched to its formula or table entry, and the final function evaluation can be checked against that tuple.

Check Your Understanding

For each question, keep the input order visible as you work.

  1. A table gives \(r(2)=6\), and \(F(x,y)=x-y\). Find \(F(r(2),3t)\) when \(t=1\).
  2. A table gives \(p(1,0)=4\). If \(H(x,y)=x+2y\), which ordered pair is required for \(H(p(1,0),1+0)\)?
  3. If a table lists \(G(2,5)=7\), does this determine \(G(5,2)\)? Explain.
  4. A table gives \(q(0)=-2\). For \(F(x,y)=3x+y\), compare \(F(q(0),4)\) with \(F(4,q(0))\). What causes any difference?
  5. A requested table input is not listed. What information would be needed before you could assign a value to that input?