Chap 6 Exercises

\[ \newcommand{\dnorm}{\text{dnorm}} \newcommand{\pnorm}{\text{pnorm}} \newcommand{\recip}{\text{recip}} \]

Exercise 1 Answer these questions. You can use the interactive R chunk (with domain from -5 to 5) or refer to the graphs in Chapter 5 of the textbook.

Choose from among these possibilities:

  • Flat: not-concave
  • Down: concave down on the whole domain
  • Up: concave up on the whole domain
  • DU: concave down on the left and up on the right
  • UD: concave up on the left and down on the right
  • UDU: concave down in the center and concave up on both flanks
  1. Which of these best describes the concavity of the gaussian function?
Flat       Down       Up       UDU       DU       UD      

question id: ndK-1

  1. Which of these best describes the concavity of the sigmoid function?
Flat       Down       Up       UDU       DU       …UDUDU…      

question id: ndK-2

  1. Which of these best describes the concavity of the second-order monomial \(m_2(x) \equiv x^2\)?
Flat       Down       Up       UDU       DU       UD      

question id: ndK-3

Exercise 2 All but two of the pattern-book functions have a domain that runs over the whole number line: \(-\infty < x < \infty\).

  1. Which pattern-book function has a domain that excludes zero and negative numbers as inputs?
sinusoid       exponential       sigmoid       logarithm       square       reciprocal       identity      

question id: pattern-book-domain-a

  1. Which pattern-book function has just a single value missing from its domain?
sinusoid       exponential       sigmoid       logarithm       square       reciprocal       identity      

question id: pattern-book-domain-b

Exercise 3 A function’s domain is the set of possible inputs to the function. A function’s range is the set of possible outputs.

In each of the following questions, choose the correct answer from these possibilities:

  • All: All
  • Pos: The positive numbers (excluding zero)
  • Neg: The negative numbers (excluding zero)
  • NonNeg: The non-negative numbers
  • Closed: Closed.
  1. What is the range of the pattern-book exponential function?
Pos       NonNeg       Neg       All       Closed      

question id: nrlp2-1

  1. What is the range of the pattern-book sine function?
Pos       Neg       All       Closed      

question id: nrlp2-2

  1. What is the range of the pattern-book logarithm function?
Pos       NonNeg       Neg       All       Closed      

question id: nrlp2-3

  1. What is the range of the pattern-book square function?
Pos       NonNeg       Neg       All       Closed      

question id: nrlp2-4

  1. What is the range of the pattern-book proportional function?
Pos       Neg       All       Closed      

question id: nrlp2-5

  1. What is the range of the pattern-book sigmoid function?
Pos       NonNeg       Neg       All       Closed      

question id: nrlp2-6

Exercise 4 The following R/mosaic code makes a plot.

  1. Explain why the function graph doesn’t cover the whole domain indicated in the command.

question id: shark-rise-kitchen-1

  1. Calculate log(-5). What is the result?
-5       -1.609       NaN       1.609       5      

question id: shark-rise-kitchen-2

The answer to (2) demonstrates an important feature of modern computer numerics. When an input is outside of the domain of the function, the function value is undefined. This “undefined” value is represented by a special “number,” which has no value. The special “number” is written NaN standing for “not a number.”

  1. Do some experimental arithmetic with NaN, for instance, adding 5 or multiplying by 3. Construct a simple rule that accounts for the results in your experiments.

question id: shark-rise-kitchen-3

Exercise 5 Suppose \(w(t)\) is your weight and \(h(t)\) is your height and that the domain of both functions encompasses your whole life span. It’s reasonable to consider each of these functions to be continuous. So the function \(h(t) - w(t)\) is continuous.

Is the following statement true? At some time since you were born your weight in pounds equaled your height in inches.

True       False      

question id: kVNeFw

Is the following statement true? At some time since you were born your weight in pounds equaled your height in inches.

```{mcq}
#| label: ewdy-1
#| show_hints: true
1. True [ correct hint: Excellent!  ]
2. False [ hint: The value of this function when you were born was greater than zero. Calculate the value for $t=$today and you'll see that it is negative. A continuous function whose value goes from positive to negative must cross 0 at least once. ]
```

In-class activity

Exercise 6 We’re going to look at the pattern-book functions in terms of three properties

  1. Slope: whether the graph has a slope that is consistently positive, negative, both, or neither, and
  2. Concavity: whether the function being graphed is concave up, concave down, neither, or both (i.e., concave up in some regions of the domain and down for others).
  3. Horizontal asymptote: whether the function becomes approximately constant as the input goes to either plus or negative infinity.

As a reminder, here’s a command to plot a function over the graphics domain \(-3 \leq x \leq 3\):

Fill in the following table based on the graphs you make of the pattern-book functions. We have already shown answers for the exponential and sinusoid

function name R formula slope concavity horiz. asymptote
exponential exp(x) positive concave up \(x \rightarrow -\infty\)
logarithm
sinusoid sin(x) both both neither
square
identity
constant
reciprocal
gaussian
sigmoid

Exercise 7 Run this graph-making command in your console:

In this exercise, you will be modifying the sandbox code to draw different functions, so you can examine their shapes.

Your task is to read and interpret the graphs of the basic modeling functions. Here, you will be looking for zero-crossings: the neighborhood of a point in the function’s domain where the output of the function is negative for inputs on one side and positive for inputs on the other side. If zero is touched but not crossed, we will call that “touched zero.”

The table below lists the pattern-book functions. For each function in the list, fill in the table. That is, say whether the function crosses zero, touches zero but does not cross, or does not touch at all in the part of the domain shown in the graphic: \(-3 \leq x \leq 3\). Also note if the value of the function appears to be reaching a horizontal asymptote at zero for very negative \(x\), for very positive \(x\), for both, or neither.

function name R formula zero in domain shown in graph asymptotic zero
exponential exp(x) no zeros for very negative \(x\)
logarithm
sinusoid
square
proportional
constant
reciprocal
gaussian
sigmoid
No answers yet collected