Chap 26 Exercises

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

Files to process
  • fox-make-stove.Rmd


::: {#exr-approx-blue}
---
id: "approx-blue"
written-by: "Daniel Kaplan"
origin: "141 DD-28"
---


::: {.cell}

:::

@fig-approx-blue shows a somewhat complex function with two inputs. The labels A, B, C, D mark some possible reference points $(x_0, y_0)$ around which polynomial approximations are being made.

::: {#fig-approx-blue}


::: {.cell}
::: {.cell-output-display}
![](26-exercises_files/figure-html/unnamed-chunk-6-1.png){width=672}
:::
:::



A function that is too complex to be modelled globally by a two-input low-order polynomial. We are going to construct *local* approximations centered on the input values marked by a letter.
:::

For each of the following graphs, say what kind of two-input polynomial approximation is being made and which reference point the approximation is centered on.

<!-- Graph I -->



::: {.cell}
::: {.cell-output-display}
![](26-exercises_files/figure-html/unnamed-chunk-7-1.png){width=672}
:::
:::



1. What is the order of approximation in graph (I)?



::: {.cell show_hints='true' inline='true'}
<input type="radio" class="devoirs-mcq" value="constant " id="approx-blue-1-1" w="23" name="approx-blue-1" hint="Sorry!" show_hints="TRUE"/>
constant 
     
<input type="radio" class="devoirs-mcq" value="linear" id="approx-blue-1-2" w="3" name="approx-blue-1" hint="The contours would be straight if the approximation were linear" show_hints="TRUE"/>
linear
     
<input type="radio" class="devoirs-mcq" value="bilinear" id="approx-blue-1-3" w="29" name="approx-blue-1" hint="Yes Right. But it turns out that the quadratic approximation is similar, presumably because $d_{xx}f(x_0, y_0)$ and $d_{yy} f(x_0, y_0)$ are too small to make a difference." show_hints="TRUE"/>
bilinear
     
<input type="radio" class="devoirs-mcq" value="quadratic" id="approx-blue-1-4" w="7" name="approx-blue-1" hint="Not a bad answer. In this case, the bilinear approximation looks a lot like the quadratic." show_hints="TRUE"/>
quadratic
     
<input type="radio" class="devoirs-mcq" name="approx-blue-1" id="approx-blue-1.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-blue-1-hintarea">question id: approx-blue-1</small>
</div>
:::



2. Do some detective work. What is the reference position $(x_0, y_0)$ for approximation in graph (I)?



::: {.cell show_hints='false' inline='true'}
<input type="radio" class="devoirs-mcq" value="A" id="approx-blue-2-1" w="41" name="approx-blue-2" hint="Excellent!" show_hints="FALSE"/>
A
     
<input type="radio" class="devoirs-mcq" value="B " id="approx-blue-2-2" w="7" name="approx-blue-2" hint="no" show_hints="FALSE"/>
B 
     
<input type="radio" class="devoirs-mcq" value="C " id="approx-blue-2-3" w="3" name="approx-blue-2" hint="Try again!" show_hints="FALSE"/>
C 
     
<input type="radio" class="devoirs-mcq" value="D " id="approx-blue-2-4" w="87" name="approx-blue-2" hint="no" show_hints="FALSE"/>
D 
     
<input type="radio" class="devoirs-mcq" name="approx-blue-2" id="approx-blue-2.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-blue-2-hintarea">question id: approx-blue-2</small>
</div>
:::





<!-- Graph II -->



::: {.cell}
::: {.cell-output-display}
![](26-exercises_files/figure-html/unnamed-chunk-10-1.png){width=672}
:::
:::



3. What order approximation in graph (II)?



::: {.cell show_hints='false' inline='true'}
<input type="radio" class="devoirs-mcq" value="constant " id="approx-blue-3-1" w="87" name="approx-blue-3" hint="wide of the mark" show_hints="FALSE"/>
constant 
     
<input type="radio" class="devoirs-mcq" value="linear" id="approx-blue-3-2" w="3" name="approx-blue-3" hint="The contours would be straight if the approximation were linear" show_hints="FALSE"/>
linear
     
<input type="radio" class="devoirs-mcq" value="bilinear" id="approx-blue-3-3" w="5" name="approx-blue-3" hint="Right. But it turns out that the quadratic approximation is similar, presumably because $d_{xx}f(x_0, y_0)$ and $d_{yy} f(x_0, y_0)$ are too small to make a difference." show_hints="FALSE"/>
bilinear
     
<input type="radio" class="devoirs-mcq" value="quadratic" id="approx-blue-3-4" w="7" name="approx-blue-3" hint="The circular (or elliptical) contours are the hallmark of a quadratic approximation near a maximum or minimum." show_hints="FALSE"/>
quadratic
     
<input type="radio" class="devoirs-mcq" name="approx-blue-3" id="approx-blue-3.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-blue-3-hintarea">question id: approx-blue-3</small>
</div>
:::



4. What is the reference position $(x_0, y_0)$ for approximation in graph (II)?



::: {.cell show_hints='false' inline='true'}
<input type="radio" class="devoirs-mcq" value="A " id="approx-blue-4-1" w="87" name="approx-blue-4" hint="wrong" show_hints="FALSE"/>
A 
     
<input type="radio" class="devoirs-mcq" value="B" id="approx-blue-4-2" w="41" name="approx-blue-4" hint="Nice. Practically a bullseye on B!" show_hints="FALSE"/>
B
     
<input type="radio" class="devoirs-mcq" value="C " id="approx-blue-4-3" w="3" name="approx-blue-4" hint="Not quite right" show_hints="FALSE"/>
C 
     
<input type="radio" class="devoirs-mcq" value="D " id="approx-blue-4-4" w="32" name="approx-blue-4" hint="incorrect choice" show_hints="FALSE"/>
D 
     
<input type="radio" class="devoirs-mcq" name="approx-blue-4" id="approx-blue-4.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-blue-4-hintarea">question id: approx-blue-4</small>
</div>
:::



<!-- Graph III -->



::: {.cell}
::: {.cell-output-display}
![](26-exercises_files/figure-html/unnamed-chunk-13-1.png){width=672}
:::
:::




5. What order approximation in graph (III)?



::: {.cell show_hints='true' inline='true'}
<input type="radio" class="devoirs-mcq" value="constant " id="approx-blue-5-1" w="23" name="approx-blue-5" hint="Better luck next time." show_hints="TRUE"/>
constant 
     
<input type="radio" class="devoirs-mcq" value="linear" id="approx-blue-5-2" w="5" name="approx-blue-5" hint="Excellent! A linear approximation always produces straight, parallel, evenly spaced contours." show_hints="TRUE"/>
linear
     
<input type="radio" class="devoirs-mcq" value="bilinear " id="approx-blue-5-3" w="7" name="approx-blue-5" hint="Better luck next time." show_hints="TRUE"/>
bilinear 
     
<input type="radio" class="devoirs-mcq" value="quadratic " id="approx-blue-5-4" w="19" name="approx-blue-5" hint="wrong" show_hints="TRUE"/>
quadratic 
     
<input type="radio" class="devoirs-mcq" name="approx-blue-5" id="approx-blue-5.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-blue-5-hintarea">question id: approx-blue-5</small>
</div>
:::



6. What is the reference position $(x_0, y_0)$ for approximation in graph (III)?



::: {.cell show_hints='false' inline='true'}
<input type="radio" class="devoirs-mcq" value="A " id="approx-blue-6-1" w="32" name="approx-blue-6" hint="wrong" show_hints="FALSE"/>
A 
     
<input type="radio" class="devoirs-mcq" value="B " id="approx-blue-6-2" w="7" name="approx-blue-6" hint="incorrect choice" show_hints="FALSE"/>
B 
     
<input type="radio" class="devoirs-mcq" value="C " id="approx-blue-6-3" w="87" name="approx-blue-6" hint="wrong" show_hints="FALSE"/>
C 
     
<input type="radio" class="devoirs-mcq" value="D" id="approx-blue-6-4" w="18" name="approx-blue-6" hint="Good job!" show_hints="FALSE"/>
D
     
<input type="radio" class="devoirs-mcq" name="approx-blue-6" id="approx-blue-6.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-blue-6-hintarea">question id: approx-blue-6</small>
</div>
:::




<!-- Graph IV -->



::: {.cell}
::: {.cell-output-display}
![](26-exercises_files/figure-html/unnamed-chunk-16-1.png){width=672}
:::
:::




7. What order approximation in graph (IV)?



::: {.cell show_hints='false' inline='true'}
<input type="radio" class="devoirs-mcq" value="constant " id="approx-blue-7-1" w="3" name="approx-blue-7" hint="incorrect choice" show_hints="FALSE"/>
constant 
     
<input type="radio" class="devoirs-mcq" value="linear" id="approx-blue-7-2" w="23" name="approx-blue-7" hint="The contours would be straight if the approximation were linear" show_hints="FALSE"/>
linear
     
<input type="radio" class="devoirs-mcq" value="bilinear" id="approx-blue-7-3" w="87" name="approx-blue-7" hint="Not a bad answer. But curvature in bilinear approximations is always in one direction." show_hints="FALSE"/>
bilinear
     
<input type="radio" class="devoirs-mcq" value="quadratic" id="approx-blue-7-4" w="41" name="approx-blue-7" hint="Nice. Sometimes quadratic approximations produce elliptical contours, as in a previous problem. But sometimes they produce the X-shaped contours seen here. In both cases, the contours curve in opposing ways in different parts of the domain. By the way, the contour pattern seen in the upper right of this graph corresponds to the shape of a saddle. It curves up along one line and down along the perpendicular line. The place right in the middle of the saddle is called a &#39;saddle point&#39;." show_hints="FALSE"/>
quadratic
     
<input type="radio" class="devoirs-mcq" name="approx-blue-7" id="approx-blue-7.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-blue-7-hintarea">question id: approx-blue-7</small>
</div>
:::



8. What is the reference position $(x_0, y_0)$ for approximation in graph (IV)?



::: {.cell show_hints='true' inline='true'}
<input type="radio" class="devoirs-mcq" value="A " id="approx-blue-8-1" w="3" name="approx-blue-8" hint="incorrect choice" show_hints="TRUE"/>
A 
     
<input type="radio" class="devoirs-mcq" value="B " id="approx-blue-8-2" w="87" name="approx-blue-8" hint="Try again!" show_hints="TRUE"/>
B 
     
<input type="radio" class="devoirs-mcq" value="C" id="approx-blue-8-3" w="41" name="approx-blue-8" hint="Yes" show_hints="TRUE"/>
C
     
<input type="radio" class="devoirs-mcq" value="D " id="approx-blue-8-4" w="32" name="approx-blue-8" hint="Better luck next time." show_hints="TRUE"/>
D 
     
<input type="radio" class="devoirs-mcq" name="approx-blue-8" id="approx-blue-8.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-blue-8-hintarea">question id: approx-blue-8</small>
</div>
:::



:::

::: {#exr-approx-orange}


---
id: "approx-orange"
written-by: "Daniel Kaplan"
origin: "141 DD-28"
---

::: {.cell}

:::



@fig-approx-orange shows a function $f(x)$. Five values of $x$ are labelled A, B, .... These are the possible values of $x_0$ in the questions.

::: {#fig-approx-orange}


::: {.cell}
::: {.cell-output-display}
![](26-exercises_files/figure-html/unnamed-chunk-20-1.png){width=672}
:::
:::



A random function to use in answering the questoins.
:::

Each of the graphs that follow show an approximation to $f(x)$ at one of the points A, B, .... in the above graph. The approximations are either constant ("order 0" approximation), linear ("order 1" approximation), quadratic ("order 2" approximation), or something else. For each graph, say what order approximation is being used.




::: {.cell}
::: {.cell-output-display}
![](26-exercises_files/figure-html/unnamed-chunk-21-1.png){width=672}
:::
:::



1. What order approximation in graph (I)?



::: {.cell show_hints='true' inline='true'}
<input type="radio" class="devoirs-mcq" value="constant" id="approx-orange-1-1" w="16" name="approx-orange-1" hint="Right" show_hints="TRUE"/>
constant
     
<input type="radio" class="devoirs-mcq" value="linear" id="approx-orange-1-2" w="19" name="approx-orange-1" hint="A linear approximation would have the same slope as $f()$ at the reference point $x_0$." show_hints="TRUE"/>
linear
     
<input type="radio" class="devoirs-mcq" value="quadratic " id="approx-orange-1-3" w="32" name="approx-orange-1" hint="Better luck next time." show_hints="TRUE"/>
quadratic 
     
<input type="radio" class="devoirs-mcq" value="none of these " id="approx-orange-1-4" w="32" name="approx-orange-1" hint="incorrect choice" show_hints="TRUE"/>
none of these 
     
<input type="radio" class="devoirs-mcq" name="approx-orange-1" id="approx-orange-1.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-orange-1-hintarea">question id: approx-orange-1</small>
</div>
:::



2. What is the reference position $x_0$ in @fig-approx-orange for the approximation in graph (I)?



::: {.cell show_hints='true' inline='true'}
<input type="radio" class="devoirs-mcq" value="A" id="approx-orange-2-1" w="23" name="approx-orange-2" hint="Not a bad choice, but notice that the constant approximation has a value a little lower than f(A)." show_hints="TRUE"/>
A
     
<input type="radio" class="devoirs-mcq" value="B" id="approx-orange-2-2" w="35" name="approx-orange-2" hint="You&#39;re right You&#39;re right. This has the correct value for f(B)." show_hints="TRUE"/>
B
     
<input type="radio" class="devoirs-mcq" value="C " id="approx-orange-2-3" w="87" name="approx-orange-2" hint="Better luck next time." show_hints="TRUE"/>
C 
     
<input type="radio" class="devoirs-mcq" value="D " id="approx-orange-2-4" w="7" name="approx-orange-2" hint="no" show_hints="TRUE"/>
D 
     
<input type="radio" class="devoirs-mcq" value="E " id="approx-orange-2-5" w="3" name="approx-orange-2" hint="Try again!" show_hints="TRUE"/>
E 
     
<input type="radio" class="devoirs-mcq" value="None of them " id="approx-orange-2-6" w="87" name="approx-orange-2" hint="no" show_hints="TRUE"/>
None of them 
     
<input type="radio" class="devoirs-mcq" name="approx-orange-2" id="approx-orange-2.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-orange-2-hintarea">question id: approx-orange-2</small>
</div>
:::



<!-- Second graph -->



::: {.cell}
::: {.cell-output-display}
![](26-exercises_files/figure-html/unnamed-chunk-24-1.png){width=672}
:::
:::




3. What order approximation in graph (II)?



::: {.cell show_hints='true' inline='true'}
<input type="radio" class="devoirs-mcq" value="constant " id="approx-orange-3-1" w="87" name="approx-orange-3" hint="wide of the mark" show_hints="TRUE"/>
constant 
     
<input type="radio" class="devoirs-mcq" value="linear " id="approx-orange-3-2" w="3" name="approx-orange-3" hint="Sorry!" show_hints="TRUE"/>
linear 
     
<input type="radio" class="devoirs-mcq" value="quadratic" id="approx-orange-3-3" w="5" name="approx-orange-3" hint="Good job!" show_hints="TRUE"/>
quadratic
     
<input type="radio" class="devoirs-mcq" value="none of these " id="approx-orange-3-4" w="32" name="approx-orange-3" hint="wrong" show_hints="TRUE"/>
none of these 
     
<input type="radio" class="devoirs-mcq" name="approx-orange-3" id="approx-orange-3.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-orange-3-hintarea">question id: approx-orange-3</small>
</div>
:::



4. What is the reference position $x_0$ @fig-approx-orange for the approximation in graph (II)?



::: {.cell show_hints='true' inline='true'}
<input type="radio" class="devoirs-mcq" value="A " id="approx-orange-4-1" w="87" name="approx-orange-4" hint="wrong" show_hints="TRUE"/>
A 
     
<input type="radio" class="devoirs-mcq" value="B " id="approx-orange-4-2" w="19" name="approx-orange-4" hint="wide of the mark" show_hints="TRUE"/>
B 
     
<input type="radio" class="devoirs-mcq" value="C" id="approx-orange-4-3" w="16" name="approx-orange-4" hint="Yes" show_hints="TRUE"/>
C
     
<input type="radio" class="devoirs-mcq" value="D" id="approx-orange-4-4" w="3" name="approx-orange-4" hint="At the reference position, the value of the approximation should always be $f(x_0)$. That is not the case here." show_hints="TRUE"/>
D
     
<input type="radio" class="devoirs-mcq" value="E " id="approx-orange-4-5" w="87" name="approx-orange-4" hint="Try again!" show_hints="TRUE"/>
E 
     
<input type="radio" class="devoirs-mcq" value="None of them " id="approx-orange-4-6" w="3" name="approx-orange-4" hint="Try again!" show_hints="TRUE"/>
None of them 
     
<input type="radio" class="devoirs-mcq" name="approx-orange-4" id="approx-orange-4.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-orange-4-hintarea">question id: approx-orange-4</small>
</div>
:::


`

<!-- Third graph -->



::: {.cell}
::: {.cell-output-display}
![](26-exercises_files/figure-html/unnamed-chunk-27-1.png){width=672}
:::
:::



5. What order approximation in graph (III)?



::: {.cell show_hints='true' inline='true'}
<input type="radio" class="devoirs-mcq" value="constant " id="approx-orange-5-1" w="19" name="approx-orange-5" hint="wrong" show_hints="TRUE"/>
constant 
     
<input type="radio" class="devoirs-mcq" value="linear " id="approx-orange-5-2" w="32" name="approx-orange-5" hint="wrong" show_hints="TRUE"/>
linear 
     
<input type="radio" class="devoirs-mcq" value="quadratic " id="approx-orange-5-3" w="7" name="approx-orange-5" hint="incorrect choice" show_hints="TRUE"/>
quadratic 
     
<input type="radio" class="devoirs-mcq" value="none of these" id="approx-orange-5-4" w="18" name="approx-orange-5" hint="Excellent! You cannot have two bends in a linear or quadratic function." show_hints="TRUE"/>
none of these
     
<input type="radio" class="devoirs-mcq" name="approx-orange-5" id="approx-orange-5.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-orange-5-hintarea">question id: approx-orange-5</small>
</div>
:::



6. What is the reference position $x_0$ in @fig-approx-orange for the approximation in graph (III)?



::: {.cell show_hints='true' inline='true'}
<input type="radio" class="devoirs-mcq" value="A " id="approx-orange-6-1" w="3" name="approx-orange-6" hint="wide of the mark" show_hints="TRUE"/>
A 
     
<input type="radio" class="devoirs-mcq" value="B " id="approx-orange-6-2" w="7" name="approx-orange-6" hint="incorrect choice" show_hints="TRUE"/>
B 
     
<input type="radio" class="devoirs-mcq" value="C " id="approx-orange-6-3" w="23" name="approx-orange-6" hint="incorrect choice" show_hints="TRUE"/>
C 
     
<input type="radio" class="devoirs-mcq" value="D" id="approx-orange-6-4" w="87" name="approx-orange-6" hint="At the reference position, the value of the approximation should always be $f(x_0)$. That is not the case here." show_hints="TRUE"/>
D
     
<input type="radio" class="devoirs-mcq" value="E " id="approx-orange-6-5" w="19" name="approx-orange-6" hint="incorrect choice" show_hints="TRUE"/>
E 
     
<input type="radio" class="devoirs-mcq" value="None of them" id="approx-orange-6-6" w="5" name="approx-orange-6" hint="You&#39;re right It is not a polynomial approximation at any of  those points." show_hints="TRUE"/>
None of them
     
<input type="radio" class="devoirs-mcq" name="approx-orange-6" id="approx-orange-6.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-orange-6-hintarea">question id: approx-orange-6</small>
</div>
:::




<!-- Fourth graph -->



::: {.cell}
::: {.cell-output-display}
![](26-exercises_files/figure-html/unnamed-chunk-30-1.png){width=672}
:::
:::



7. What order approximation in graph (IV)?



::: {.cell show_hints='false' inline='true'}
<input type="radio" class="devoirs-mcq" value="constant " id="approx-orange-7-1" w="87" name="approx-orange-7" hint="Try again!" show_hints="FALSE"/>
constant 
     
<input type="radio" class="devoirs-mcq" value="linear" id="approx-orange-7-2" w="41" name="approx-orange-7" hint="Yes" show_hints="FALSE"/>
linear
     
<input type="radio" class="devoirs-mcq" value="quadratic " id="approx-orange-7-3" w="32" name="approx-orange-7" hint="Better luck next time." show_hints="FALSE"/>
quadratic 
     
<input type="radio" class="devoirs-mcq" value="none of these " id="approx-orange-7-4" w="3" name="approx-orange-7" hint="You&#39;re mistaken" show_hints="FALSE"/>
none of these 
     
<input type="radio" class="devoirs-mcq" name="approx-orange-7" id="approx-orange-7.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-orange-7-hintarea">question id: approx-orange-7</small>
</div>
:::



8. What is the reference position $x_0$ in @fig-approx-orange for the approximation in graph (IV)?



::: {.cell show_hints='true' inline='true'}
<input type="radio" class="devoirs-mcq" value="A" id="approx-orange-8-1" w="16" name="approx-orange-8" hint="Yes" show_hints="TRUE"/>
A
     
<input type="radio" class="devoirs-mcq" value="B " id="approx-orange-8-2" w="23" name="approx-orange-8" hint="incorrect choice" show_hints="TRUE"/>
B 
     
<input type="radio" class="devoirs-mcq" value="C " id="approx-orange-8-3" w="23" name="approx-orange-8" hint="Not quite right" show_hints="TRUE"/>
C 
     
<input type="radio" class="devoirs-mcq" value="D " id="approx-orange-8-4" w="32" name="approx-orange-8" hint="You&#39;re mistaken" show_hints="TRUE"/>
D 
     
<input type="radio" class="devoirs-mcq" value="E " id="approx-orange-8-5" w="7" name="approx-orange-8" hint="no" show_hints="TRUE"/>
E 
     
<input type="radio" class="devoirs-mcq" value="None of them " id="approx-orange-8-6" w="32" name="approx-orange-8" hint="no" show_hints="TRUE"/>
None of them 
     
<input type="radio" class="devoirs-mcq" name="approx-orange-8" id="approx-orange-8.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-orange-8-hintarea">question id: approx-orange-8</small>
</div>
:::


:::

<!-- Fifth graph -->



::: {.cell}
::: {.cell-output-display}
![](26-exercises_files/figure-html/unnamed-chunk-33-1.png){width=672}
:::
:::



9. What order approximation in graph (V)?



::: {.cell show_hints='true' inline='true'}
<input type="radio" class="devoirs-mcq" value="constant " id="approx-orange-9-1" w="19" name="approx-orange-9" hint="incorrect choice" show_hints="TRUE"/>
constant 
     
<input type="radio" class="devoirs-mcq" value="linear " id="approx-orange-9-2" w="7" name="approx-orange-9" hint="wrong" show_hints="TRUE"/>
linear 
     
<input type="radio" class="devoirs-mcq" value="quadratic" id="approx-orange-9-3" w="5" name="approx-orange-9" hint="You&#39;re right" show_hints="TRUE"/>
quadratic
     
<input type="radio" class="devoirs-mcq" value="none of these " id="approx-orange-9-4" w="3" name="approx-orange-9" hint="no" show_hints="TRUE"/>
none of these 
     
<input type="radio" class="devoirs-mcq" name="approx-orange-9" id="approx-orange-9.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-orange-9-hintarea">question id: approx-orange-9</small>
</div>
:::



10. What is the reference position $x_0$ @fig-approx-orange for the approximation in graph (V)?



::: {.cell show_hints='true' inline='true'}
<input type="radio" class="devoirs-mcq" value="A " id="approx-orange-10-1" w="87" name="approx-orange-10" hint="Not quite right" show_hints="TRUE"/>
A 
     
<input type="radio" class="devoirs-mcq" value="B " id="approx-orange-10-2" w="3" name="approx-orange-10" hint="Not quite right" show_hints="TRUE"/>
B 
     
<input type="radio" class="devoirs-mcq" value="C " id="approx-orange-10-3" w="3" name="approx-orange-10" hint="no" show_hints="TRUE"/>
C 
     
<input type="radio" class="devoirs-mcq" value="D " id="approx-orange-10-4" w="3" name="approx-orange-10" hint="Sorry!" show_hints="TRUE"/>
D 
     
<input type="radio" class="devoirs-mcq" value="E " id="approx-orange-10-5" w="32" name="approx-orange-10" hint="Not quite right" show_hints="TRUE"/>
E 
     
<input type="radio" class="devoirs-mcq" value="None of them" id="approx-orange-10-6" w="5" name="approx-orange-10" hint="You&#39;re right" show_hints="TRUE"/>
None of them
     
<input type="radio" class="devoirs-mcq" name="approx-orange-10" id="approx-orange-10.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="approx-orange-10-hintarea">question id: approx-orange-10</small>
</div>
:::





:::

::: {#exr-birch-lie-sheet}


---
id: "birch-lie-sheet"
created: "Mon Sep  6 13:44:32 2021"
global_id: "3EdMBL"
---




The Taylor polynomial for $e^x$ has an especially lovely formula: $$p(x) = 1 + \frac{x}{1!} + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} + \cdots$$



In the above formula, the center $x_0$ does not appear. Why not?



::: {.cell show_hints='true'}
<p>
  <input type="radio" class="devoirs-mcq" value="Having a c ... olynomial." id="birch-lie-sheet-1" w="19" name="birch-lie-sheet" hint="This is wrong. All Taylor polynomials are expansions around some fixed center value." show_hints="TRUE"/>
  Having a center is not a requirement for a Taylor polynomial.
  
</p>
<p>
  <input type="radio" class="devoirs-mcq" value="There is a ...  to $x^2$." id="birch-lie-sheet-2" w="32" name="birch-lie-sheet" hint="Look again at the Taylor formula at the start of this section. The basis functions are $x-x_0, (x-x_0)^2, \ldots$, not $x_0 x, x_0 x^2, \ldots$" show_hints="TRUE"/>
  There is a center, $x_0 = 1$, but terms like $x_0 x^2$ were simplified to $x^2$.
  
</p>
<p>
  <input type="radio" class="devoirs-mcq" value="There is a ...  to $x^2$." id="birch-lie-sheet-3" w="35" name="birch-lie-sheet" hint="Excellent!" show_hints="TRUE"/>
  There is a center, $x_0 = 0$, but the terms like $(x-x_0)^2$ were algebraically simplified to $x^2$.
  
</p>
<input type="radio" class="devoirs-mcq" name="birch-lie-sheet" id="birch-lie-sheet.null" style="display: none;" w="skipped" checked=""/>
<div>
  <small style="color: grey;" id="birch-lie-sheet-hintarea">question id: birch-lie-sheet</small>
</div>
:::





:::

::: {#exr-approx-tan}


---
id: "approx-tan"
origin: "141 DD29"
written-by: "Daniel Kaplan"
---

::: {.cell}

:::



In this exercise, you're going to be looking at the shape of contour lines very close to a reference point. The graph shows which function we will  be examining. The contours are unlabeled, to avoid distracting you with  numbers; we are interested in *shapes*. Four different reference points are marked, with these coordinates



::: {.cell}
::: {.cell-output-display}
`````{=html}
<table class="table" style="width: auto !important; margin-left: auto; margin-right: auto;">
 <thead>
  <tr>
   <th style="text-align:left;"> label </th>
   <th style="text-align:right;"> x_0_ </th>
   <th style="text-align:right;"> y_0_ </th>
  </tr>
 </thead>
<tbody>
  <tr>
   <td style="text-align:left;"> A </td>
   <td style="text-align:right;"> -2.100 </td>
   <td style="text-align:right;"> 3.000 </td>
  </tr>
  <tr>
   <td style="text-align:left;"> B </td>
   <td style="text-align:right;"> -0.400 </td>
   <td style="text-align:right;"> 2.500 </td>
  </tr>
  <tr>
   <td style="text-align:left;"> C </td>
   <td style="text-align:right;"> -1.605 </td>
   <td style="text-align:right;"> 1.932 </td>
  </tr>
  <tr>
   <td style="text-align:left;"> D </td>
   <td style="text-align:right;"> 1.265 </td>
   <td style="text-align:right;"> -2.725 </td>
  </tr>
</tbody>
</table>

:::

Figure 1: The function \(g(x, y)\) we are aiming to approximate locally, at each of the marked points A, B, C, and D.

For each of the four points A, B, C, D marked in Figure 1, we want to find the largest region size for which an approximation will be pretty good. What do we mean by “pretty good?” That if you switched to a smaller region size the result would look very much like what you saw at the larger region size.

The R/mosaic code in Active R chunk 1 plots out the function \(g(x, y)\) over a small domain, centered at (x0, y0). The extent of the locale is specified by size. As shown initially, the location corresponds to the point labelled A Figure 1. The size is 1.0.

Active R chunk 1

Looking locally, the function shape is much simpler than it appears globally. You can see this by running the code in Active R chunk 1 which displays the function in a small locale.

Now change size to 0.5, run the code, and observe the shape of the function in this smaller locale. (Ignore the contour labels: just look at the shape of the contours.) If the shape is practically the same as before, we have reason to believe that the larger size was small enough to give a good local approximation. But if the shape is clearly different, the original size was not good enough. Pick a smaller size, 0.1 and check if the shape of the function is similar to what it was at 0.5. If so, 0.5 is small enough to give a good local approximation. If not … pick a still smaller size. Keep going until two consecutive graphs show practically the same shape.

You can use this sequence of sizes, stopping when you have found a size that produces the same visual impression as the previous size.

\[\text{size}: 1.0,\ 0.5,\ 0.1,\ 0.05,\ 0.01,\ 0.005,\ 0.001,\ 0.0005,\ 0.0001\]

Do this separately for each of the 4 locations A, B, C, and D.

1a) For reference point A how small should size be so that the shape of the contours does not differ substantially from the shape at the previous size.

0.1       0.01       0.001       1e-04      

question id: approx-tan-1a

::: ::: {#exr-approx-tan-2} 1b) For reference point A which phrase best describes the shape of the contours at the size you found in question (1a).

contours are straight and almost exactly parallel and evenly spaced

contours are straight, almost exactly parallel, but unevenly spaced.

contours are straight, but fan out a bit

contours are curved but concentric and evenly spaced

contours are curved and concentric, but unevenly spaced.

question id: approx-tan-1b

2a) For reference point B how small should size be so that the shape of the contours does not differ substantially from the shape at the previous size.

0.1       0.01       0.001       1e-04      

question id: approx-tan-2a

2b) For reference point B which phrase best describes the shape of the contours at the size you found in question (2a).

contours are straight and almost exactly parallel and evenly spaced

contours are straight, almost exactly parallel, but unevenly spaced.

contours are straight, but fan out a bit

contours are curved but concentric and evenly spaced

contours are curved and concentric, but unevenly spaced.

question id: approx-tan-2b

3a) For reference point C how small should size be so that the shape of the contours does not differ substantially from the shape at the previous size.

0.1       0.01       0.001       1e-04      

question id: approx-tan-3a

3b) For reference point C, which phrase best describes the shape of the contours at the size you found in question (3a).

contours are straight and almost exactly parallel and evenly spaced

contours are straight, almost exactly parallel, but unevenly spaced.

contours are straight, but fan out a bit

contours are curved but concentric and evenly spaced

contours are curved and concentric, but unevenly spaced.

question id: approx-tan-3b

4a) For reference point D how small should size be so that the shape of the contours does not differ substantially from the shape at the previous size.

0.1       0.01       0.001       0.0001      

question id: approx-tan-4a

4b) For reference point D which phrase best describes the shape of the contours at the size you found in question (4a).

contours are straight and almost exactly parallel and evenly spaced

contours are straight, almost exactly parallel, but unevenly spaced.

contours are straight, but fan out a bit

contours are curved but concentric and evenly spaced

contours are curved and concentric, but unevenly spaced.

question id: approx-tan-4b

:::

Exercise 1 Consider the model presented in XREF not implemented yet about the energy expenditure while walking distance \(d\) on a grade \(g\): \[E(d,g) = (a_0 + a_1 g)d\] where \(d\) is the (horizontal equivalent) of the distance walked and \(g\) is the grade of the slope (that is, rise over run).

We want \(E\) to be measured in Joules which has dimension M L\(^2\) T\(^{-2}\). Of course, the dimension of \(d\) is L, that is \([d] = \text{L}\).

  1. What is the dimension of the parameter \(a_0\)?
dimensionless       \(L/T^2\)       \(T/L^2\)       \(M/T^2\)       \(M L/T^2\)       \(M/L^2\)       \(M/(L^2 T^2)\)       \(M L^2 / T^2\)      

question id: rooster-pink-1

  1. What is the dimension of \(g\)? (Hint: \(g\) is the ratio of vertical to horizontal distance covered.)
dimensionless       \(L/T^2\)       \(T/L^2\)       \(M/T^2\)       \(M L/T^2\)       \(M/L^2\)       \(M/(L^2 T^2)\)       \(M L^2 / T^2\)      

question id: rooster-pink-2

  1. What is the dimension of the parameter \(a_1\)?
dimensionless       \(L/T^2\)       \(T/L^2\)       \(M/T^2\)       \(M L/T^2\)       \(M/L^2\)       \(M/(L^2 T^2)\)       \(M L^2 / T^2\)      

question id: rooster-pink-3

Exercise 2 Suppose we describe the spread of an infection in terms of three quantities:

  • \(N\) infection rate with respect to time: the number of new infections per day
  • \(I\) the current number of people who are infectious, that is, currently capable of spreading the infection
  • \(S\) the number of people who are susceptible, that is, currently capable of becoming infectious if exposed to the infection.

All three of these quantities are functions of time. News reports in 2020 such as the one below routinely gave the graph of \(N\) versus time for Covid-19.

Figure 2: Number of COVID cases in the US in 2020. The outbreak started to grow rapidly in mid-March, 2020.

On November 15, 2020, \(N\) was 135,187 people per day. (This is the number of positive tests. The true value of \(N\) was, based on later information, 5-10 times greater.) The news reports don’t usually report \(S\) on a day-by-day basis.

But a basic strategy in modeling with calculus is to take a snapshot: Given \(I\) and \(S\) today, what is a model of \(N\) for today. (Next semester, we will study “differential equations,” which provide a way of assembling from the snapshot model what the time course of the pandemic will look like.)

The low-order polynomial for \(N(S, I)\) is \[N(S,I) = a_0 + a_1 S + a_2 I + a_{12} I S.\] We don’t include quadratic terms because there is no local maximum in \(N(S, I)\)—common sense suggests that \(\partial_S N() \geq 0\) and \(\partial_I N() \geq 0\), whereas a local maximum requires at least one of these derivatives to be negative near the max.

Your job is to figure out which, if any, terms can be safely deleted from the low-order polynomial. A good way to approach this is to figure out, using common sense, what \(N\) would be for either \(S=0\) or \(I=0\). (Note that the previous is not restricted to \(S = I = 0\). Only one of them needs to be zero to produce the relevant result.)

We know that if \(I=0\) there will be no new infections, regardless of how large \(S\) is. We also know that if \(S=0\), there will be no new infections no matter how many people are currently infective. Which of these low-order polynomials correctly represents these two facts? (Assume that all the coefficients in the various polynomials are non-zero.)

\(N(S,I) = a_0 + a_1 S + a_2 I + a_{12} I S\)

\(N(S,I) = a_0 + a_1 S + a_2 I\)

\(N(S,I) = a_1 S + a_2 I + a_{12} I S\)

\(N(S,I) = a_2 I + a_{12} I S\)

\(N(S,I) = a_1 S + a_{12} I S\)

\(N(S,I) = a_{12} I S\)

\(N(S,I) = a_1 S + a_2 I\)

question id: rooster-violet-1

:::

Exercise 3  

Still in draft

Fitting polynomials

Taylor polynomials provide a means to approximate continuous and smooth functions around a center \(x_0\). So long as \(x\) is very close to \(x_0\), the approximation will be excellent. But Taylor polynomials aren’t a solution to every problem. Consider the piecewise continuous function, \(ramp(x-1)\), in ?fig-ramp-Taylor.

A piecewise continuous ramp function (gray) together with its Taylor polynomial (magenta) centered on \(x_0 = 0\).

The value of \(ramp(x-1) \left.\Large\right|_{x=0}\) is zero, as is the value of the first, second, third, and every other derivative. Whatever we choose for the order \(n\) of the Taylor polynomial, it will be \(\text{Taylor(x) = 0}\). That is an excellent approximation to \(ramp(x-1)\) around \(x=0\)! But it misses the point of \(ramp()\) entirely.

Or consider the problem that introduced this chapter: finding an arithmetic process to evaluate \(\sin(x)\). As it happens, we only need to be able to evaluate \(\sin(x)\) on the interval \(0 \leq x \leq \pi/2\).^[If \(x\) is outside this range, add or subtract a multiple \(k \in [\ldots, -2, -1, 0, 1, 2, \ldots]\) of \(\pi\) so \(0 \leq x - k \pi \leq \pi\). Then, if \(\pi/2 \leq (x - k \pi)\), calculate \(\sin(\pi - (x - k \pi))\)

FIT TO PART OF SINE

Pts <- tibble(x = seq(0, pi/2, length=1000), y = sin(x))
mod <- lm(y ~ x + I(x*x) + I(x*x*x) - 1, data = Pts)
mod

Call:
lm(formula = y ~ x + I(x * x) + I(x * x * x) - 1, data = Pts)

Coefficients:
           x      I(x * x)  I(x * x * x)  
     1.01642      -0.05629      -0.11892  
fmod <- makeFun(mod)
slice_plot(sin(x) ~ x, bounds(x=c(0, pi/2)), size=3, alpha=0.25) %>%
  slice_plot(fmod(x) ~ x, color="magenta")

slice_plot(sin(x) - fmod(x) ~ x, bounds(x=c(0, pi/2))) %>%
  slice_plot(sin(x) - (x - x^3/6) ~ x, color="green")

No answers yet collected