Tutorial: Functions of several variables from the numerical, algebraic, and graphical viewpoints
Adaptive game version
This tutorial: Part A: Algebraic and numerical viewpoint
(This topic is also in Section 15.1 in Finite Mathematics and Applied Calculus) #[I don't like this new tutorial. Take me back to the older tutorial!][No me gusta este nueve tutorial. ¡Regresame al tutorial más viejo!]#
#[Function of two variables][Función de dos variables]#
A real-valued function $f$ of two variables is a rule for manufacturing a new number, called $f(x,y)$ (and read '$f$ of $(x,y).$') from a pair of numbers $(x,y).$ The variables $x$ and $y$ are called the arguments of $f$.
#[Examples: (Specified algebraically)][Ejemplos: (Especificadas algebraicamente)]#
1. $f(x,y)$ \t ${}= 3x+y$ \t In go $x$ and $y$, out comes $3x+y.$
\\ $f(1,2)$ \t ${}= 3(1) + 2 = 5$ \t Substitute $1$ for $x$ and $2$ for $y.$
\\ $f(2,-6)$ \t ${}= 3(2) + (-6) = 0$ \t Substitute $2$ for $x$ and $-6$ for $y.$
\\
\\ 2. $f(x,y)$ \t ${}= x^2+y^2-25$ \t In go $x$ and $y$, out comes $x^2+y^2-25.$
\\ $f(4,-1)$ \t ${}= 4^2+(-1)^2-25 = -8$ \t Substitute $4$ for $x$ and $-1$ for $y.$
\\ $f(-3,4)$ \t ${}= (-3)^2+4^2-25 = 0$ $\quad$ \t Substitute $-3$ for $x$ and $4$ for $y.$
\\
\\
3. $f(x,y)$
\t ${}= \dfrac{1}{x^2+y^2-1}$ \t In go $x$ and $y$, out comes $\dfrac{1}{x^2+y^2}.$
\\ $f(-4,-1)$
\t ${}= \dfrac{1}{(-4)^2+(-1)^2-1} = \dfrac{1}{16} \quad$ \t Substitute $-4$ for $x$ and $-1$ for $y.$
\\ $f(0,2)$
\t ${}= \dfrac{1}{0^2+2^2-1} = \dfrac{1}{3}$ $\quad$ \t Substitute $0$ for $x$ and $2$ for $y.$
Some for you
#[Function of three variables][Función de tres variables]#
A real-valued function $f$ of three variables is a rule for manufacturing a new number, called $f(x,y,z)$ from a triple of numbers $(x,y,z).$ Here, $x, y, z$ are the arguments of $f.$
#[Examples: (Specified algebraically)][Ejemplos: (Especificadas algebraicamente)]#
4. $f(x,y,z)$ \t ${}= 3x+y-4z$ \t In go $x, y$ and $z$, out comes $3x+y-4z.$
\\ $f(1,-1,3)$ \t ${}= 3(1)+(-1)-4(3) = -10 \qquad$ \t Substitute $1$ for $x$, $-1$ for $y$, and $3$ for $z.$
\\
\\
5. $f(x,y,z)$
\t ${}= \dfrac{1}{x^2+y^2+z^2+1}$ \t In go $x, y$ and $z$, out comes $\dfrac{1}{x^2+y^2+z^2+1}.$
\\ $f(2,-1,1)$
\t ${}= \dfrac{1}{2^2+(-1)^2+1^2+1} = \dfrac{1}{7}$ \t Substitute $2$ for $x$, $-1$ for $y$, and $1$ for $z.$
\\
\\ 6. $f(x,y,z)$ \t ${}= \sqrt{x^2+y^2+z^2-4}$ \t In go $x, y$ and $z$, out comes $\sqrt{x^2+y^2+z^2-4}.$
\\ $f(1,1,2)$ \t ${}= \sqrt{1^2+1^2+2^2-4} = 0$ \t Substitute $1$ for $x$, $1$ for $y$, and $2$ for $z.$
\\ $f(2,0,-2)$ \t ${}= \sqrt{2^2+0^2+(-2)^2-4}$
\\ \t ${}= \sqrt{4} = 2$ \t Substitute $2$ for $x$, $0$ for $y$, and $-2$ for $z.$
Some for you
#[Function of n variables][Función de n variables]#
What about functions of four or more variables? If we keep going like this we will eventually run out of letters to use as the variable names. So it is often convenient to use subscripted variables instead: For instance instead of writing, say
$f(x,y,z) = \dfrac{1}{x^2+y^2+z^2+1},$
#[we write instead][excribimos en su lugar]#
$f(x_1, x_2, x_3) = \dfrac{1}{x_1^2+x_2^2+x_3^2+1}.$
#[This way, we can use as many independent variables as we like.][De esta forma, podemos utilizar tantas variables independientes como queramos.]#
%%Example
$f(x_1, x_2, x_3, x_4)$ \t ${}= 2x_1-x_2x_3+x_4$ \t In go $x_1, ..., x_4$, out comes $2x_1-x_2x_3+x_4.$
\\ $f(1.-2,3,-4)$ \t ${}= 2(1)-(-2)(3)+(-4) = 4 \qquad$ \t Substitute $1$ for $x_1$, $-2$ for $x_2$, and $3$ for $x_3$, and $-4$ for $x_4.$
Domain of a function of several variables
The functions above were all defined at the given values of the arguments. However, in Example 3 above,
$f(x,y) = \dfrac{1}{x^2+y^2-1},$
\\
\\ $f(1,0) = \dfrac{1}{1^2+0^2-1}$ \t \gap[10] #[is not defined][no está definido]#
So we need to exclude pairs $(x,y)$ like this. We get a similar issue with this function whenever the denominator is zero; that is, whenever
$x^2+y^2-1 = 0,$ #[that is,][es decir,]#
\\ $x^2+y^2 = 1.$ \t
So we say that the (natural) domain of $f(x,y) = \dfrac{1}{x^2+y^2-1}$ is the set of all pairs $(x, y)$ such that $x^2+y^2 \ne 1.$ (This is the set of all points in the plane other than those on the unit circle $x^2+y^2=1$.)
Similarly, in Example 6 above, the natural domain of $f(x,y,z) = \sqrt{x^2+y^2+z^2-4}$ is the set of all triples $(x, y, z)$ such that $x^2+y^2+z^2 \geq 4.$ (We will see in the %%partBtut that this is the set of all points outside the sphere with radius 2 centered at the origin in 3-space.)
#[To summarize:][Para resumir:]#
Domain of a function of two or more variables
#[The natural domain of a function $f$ of two or more variables $(x,y,...)$ is the set of pairs $(x,y,...)$ for which the expression $f(x,y,...)$ makes sense.][El dominio natural de una función $f$ de dos o más variables $(x,y,...)$ es el conjunto de pares $(x,y,...)$ para los cuales la expresión $f(x,y,...)$ tiene sentido.]#
#[Examples][Ejemplos]# (2 variables)
1. \t $f(x,y) = \dfrac{1}{x-y}$ makes sense for all $(x,y)$ for which $x-y \ne 0$, so the natural domain of $f$ is the set of all points other than those on the line $x-y = 0$ or $x = y$, shown as the shaded region in the following figure:
2. $f(x,y) = \sqrt{x^2+y^2-1}$ makes sense for all $(x,y)$ for which $x^2+y^2-1 \ge 0$, so the natural domain of $f$ is the set of all points $(x,y)$ with $x^2+y^2-1 \ge 0$, or $x^2+y^2\ge 1$, shown as the shaded region in the following figure:
#[Real world situations][Situaciones del mundo real]#
In many applications, the variables $x, y, ...$ represent numbers of items, and so cannot be negative. Further, if the variables represent the numbers of items sold or manufactured, there would also be some kind of upper limit on the total number of items, or the number of each item.
#[Example][Ejemplo]#
The cost of preparing $x$ bouquets and $y$ boxes of chocolates in a day is $C(x,y) = 4x+3y+ 100$ dollars, and you can prepare up to 10 bouquets and up to 20 boxes of chocolates in a day, then the domain of $C$ is the set of all pairs $(x,y)$ with $0 \leq x \leq 10$ and $0 \leq y \leq 20$. (By contrast, the natural domain of $C$ would consist of all possible pairs $(x,y)$.)
Some for you
Numerical viewpoint
%%Q #[All we have seen so far are functions of several variables represented algebraically. What about the numerical point of view?][Todo lo que hemos visto hasta ahora son funciones de varias variables representadas algebraicamente. ¿Qué pasa con el punto de vista numérico?]#
%%A #[As in the case of numerically specified functions of one variable (see the %%functionstut), numerically specified functions of several variables woud be evaluated using tables. For functions of two variables, we can use a two-dimensional table:][Como en el caso de funciones de una variable especificadas numéricamente (ver el %%functionstut), las funciones de varias variables especificadas numéricamente serían evaluados mediante tablas. Para funciones de dos variables, podemos utilizar una tabla bidimensional:]# %%Q That was a function of two variables. How would we represent a function of three or more variables numerically?
%%A We saw that a numerical representation of a function of two variables required a two-dimensional table of values, so representing a function of three variables $f(x, y, z)$ numerically would require a three-dimensional table. Or, one could use a booklet of two dimensional tables showing $f(x, y, z);$ with a different page for each value of $z.$ By Extansion, a function of four variables $x, y, z, t$ would require a shelf of booklets; one booklet for each value of $t.$ Then, for more variables, one would need a bookcase of shelves, then perhaps a library of bookcases, and so on... #[Some special kinds of functions of several variables][Algunos tipos especiales de funciones de varias variables.]# If you refer back to the %%linfnstut you will recall that a linear function of a single variable $x$ has the form
$f(x) = mx + b,$
where $m$ and $b$ are constants. This idea generalizes to functions of two or more variables in some interesting ways as follows.
Linear functions of several variables
A linear function of two variables has the form
Using subscripted variables, we can write instead
We extend this idea to any number of variables as follows:
$f(x,y) = a + bx + cy. \quad \qquad$
\t $a, b, c$ #[(possibly zero) constants][constantes (posiblemente cero)]#
$f(x_1,x_2) = a_0 + a_1x_1 + a_2x_2.$
\t $a_0, a_1, a_2$ #[constants][constantes]#
#[Linear function of 3 variables][Función lineal de 3 variables]#: \\ $f(x_1,x_2,x_3) = a_0 + a_1x_1 + a_2x_2 + a_3x_3\qquad$ \t $a_0, a_1, a_2, a_3$ #[constants][constantes]#
\\ ...
\\ #[Linear function of n variables][Función lineal de n variables]#:
\\ $f(x_1,x_2,...,x_n) = a_0 + a_1x_1 + a_2x_2 + ... + a_nx_n\qquad$ \t $a_0, a_1, a_2, ..., a_n$ #[constants][constantes]#
%%Examples
Los términos de segundo orden implican productos de incógnitas con una potencia total de 2, como $x^2$ o $xy$. De manera similar, los términos de tercer orden involucrarían productos de incógnitas con una potencia total de 3, como $x^3, X^2y$ o $xyz.$ Términos como $xy, xy^2$ y $xyz$ también se conocen como términos de interacción, ya que involucran más de una variable. ]#
1. $f(x,y) = 3x+y - 4$ \t #[Linear function of $x$ and $y$][Función lineal de $x$ y $y$]#
\\ 2. $f(x,y,z,t) = -x+y-4t+10 \qquad$ \t #[Linear function of $x,y,z,t$ (with zero coefficient of $z$)][Función lineal de $x,y,z,t$ (con coeficiente cero de $z$)]#
\\ 3. $f(x,y,z,t,w) = 4$ \t #[(Constant) linear function of five variables][Función lineal (constante) de cinco variables]#
\\ 4. $f(x,y) = 4+2x\color{darkred}{+y^2}$ \t #[Not linear because of the second-order term $y^2.$][No lineal debido al término de segundo orden $y^2.$]#
\\ 5. $f(x,y) = 4+2x+y\color{darkred}{-3xy}$ \t #[Not linear because of the second-order term $3xy.$][No lineal debido al término de segundo orden $3xy.$]#
#[Notes- Second-order terms involve products of unknowns with a total power of 2, like $x^2$ or $xy$. Similarly, third-order terms would involve products of unknowns with a total power of 3, like $x^3, x^2y$ or $xyz.$
- Terms like $xy, xy^2,$ and $xyz$ are also referred to as interaction terms, as they involve more than one variable.
Adding interaction terms
In statistical modeling using functions of several variables, interaction terms are often added to obtain a more accurate model.
%%Examples
5. $f(x,y) = 4+2x+y-3xy$ \t #[Example 5 again: Linear plus interaction][Ejemplo 5 nuevamente: Lineal más interacción]#
\\ 6. $f(x,y,z) = -x+2xy - xz + xyz \qquad$ \t #[Linear plus interaction:
Interactive terms can be products of more than two variables.][Lineal más interacción:
Los términos interactivos pueden ser productos de más de dos variables.]#
%%Note #[Interactive terms are nonlinear terms in a model, so linear model with added interaction terms is no longer linear.][Los términos interactivos son términos no lineales en un modelo, por lo que un modelo lineal con términos de interacción agregados ya no es lineal.]#
Interactive terms can be products of more than two variables.][Lineal más interacción:
Los términos interactivos pueden ser productos de más de dos variables.]#
Quadratic functions of several variables
A quadratic function of two variables is a nonlinear function of the form
$f(x,y) = a + b_1x + b_2y + c_1x^2 + c_2y^2 + dxy \qquad$ \t $a, b_1, b_2, c_1, c_2, d$ #[constants][constantes]#
(#[Being nonlinear amounts to saying that at least one of the second-order terms $c_1x^2,\ c_2y^2,\ dxy$ is nonzero (otherwise we would get a linear function).][Ser no lineal equivale a decir que al menos uno de los términos de segundo orden $c_1x^2,\ c_2y^2,\ dxy$ es distinto de cero (de lo contrario, obtendríamos una función lineal).]#)
%%Examples
#[Examples 4 and 5 above are quadratic whereas Examples 1–3 above are linear (and thus not quadratic). Example 6 above is neither linear nor quadratic, as it contains a third-order term $xyz.$ That model is an example of a cubic model.][El ejemplos 4 y 5 anterior son cuadráticos, mientras que los ejemplos 1 a 3 anteriores son lineales (y, por lo tanto, no cuadráticos). El ejemplo 6 anterior no es lineal ni cuadrático, ya que contiene un término de tercer-orden $xyz.$ Ese modelo es un ejemplo de modelo cúbico.]#
Now try the exercises in Section 15.1 in Finite Mathematics and Applied Calculus.
or move ahead to the next tutorial by pressing "Next tutorial" on the sidebar.
Copyright © 2019 Stefan Waner and Steven R. Costenoble