Lab

Lab: By now you know that Ms. Amazing has made a mistake: She said that the amount of bacteria doubles every two months. If she starts with 125 lbs of bacteria at the end of month 0, she will not have one ton at 6 months:

month02468
bacteria (lbs)12525050010002000=1 ton
She'll have one ton (2000 lbs) after 8 months.

Writing the letter...

Your report will be a letter. A couple things...

  • In a letter, you typically right-justify things like the date and your address. But there is no easy way to do that in Markdown. So, it's fine if the text in your letter is all left-justified.
  • In your address, simply hitting a return in a Markdown cell will not cause a line break. But there *is* an easy way to add a linebreak, to your address: When you edit your text, make sure you're in 'Markdown' mode, not text mode. Then you can type <br> (for example, at the end of one line), then type a return. This is HTML code for a line break.

Optimization

If $f'(x)=0$, then $(x,f(x))$ is a critical point.

But even for a continuous, polynomial function, there are 3 possibilities:

  • $f'(x)=0$, and the function is concave down

    $\Rightarrow$ This critical point is a maximum, and $f''(x)\lt 0$.

  • $f'(x)=0$, and the function is concave up

    $\Rightarrow$ This critical point is a minimum, and $f''(x)\gt 0$.

  • $f'(x)=0$, and the function has an inflection point and is neither concave up nor concave down

    $\Rightarrow$ This critical point is a neither a minima nor a maxima, and $f''(x)= 0$.

<< 4.1 | 4.2 | 8.5, 8.6 >>

Using CoCalc to find a minimum/maximum

CoCalc can be very helpful to find a minimum or maximum.

  • Use plot(...) to graph a function, $f(x)$ and locate very roughly the location of a minimum or maximum. For example $2\lt x \lt 4$.
  • Use find_root(...) and diff(...) to solve the equation $f'(x)=0$ for $x$. For example,

    find_root( diff( f(x),x )==0, 2,4 ) CoCalc will find a solution to $f'(x)=0$ in the interval $2\lt x \lt 4$.

    (Make sure your interval includes only one minima/maxima.)

Solving the pumping station example from the handout: show / hide

In class we decided that the equation to minimize was the total length of the pipe, given by: $$L(x)=\sqrt(x^2+1)+\sqrt((4-x)^2+16).$$ We'd like to solve this equation for $x$: $$L'(x)=0$$ Here's how to do that in CoCalc using find_root(....):