# Math Insight

### Solutions to minimization and maximization problems

#### Problem 1

1. To find the critical points, we look for points where $f'(x)$ is zero or not defined. \begin{align*} f'(x) &= 2xe^x+x^2e^x\\ &= (2x+x^2)e^x \end{align*} The derivative is always defined and is zero if \begin{align*} (2x+x^2)e^x &=0\\ 2x+x^2 &=0\\ x(2+x) &=0\\ x = 0 & \quad \text{or} \quad x=-2. \end{align*} Therefore, the critical points are $x=0$ and $x=-2$.
2. $f'(x) \gt 0$ if $x\ lt -2$ or $x \gt 0$, so $f$ is increasing when $x$ is in those intervals. $f'(x)\lt 0$ if $-2 \lt x \lt 0$, so $f$ is decreasing when $x$ is in that interval.
3. $x=-2$ is a local maximum since $f$ is increasing just below it and decreasing just above it. $x=0$ is a local minimum since $f$ is decreasing just below it and increasing just above it. Alternatively, we could have calculated the second derivative \begin{align*} f''(x) &= (2+2x)e^x+(2x+x^2)e^x\\ &= (2+4x+x^2)e^x. \end{align*} Since $f''(-2) = (2-8+4)e^{-2} = -2e^{-2} \lt 0$, we can conclude that $x=-2$ is a local maximum. Since $f''(0) = 2e^{0}=2 \gt 0$, we can conclude that $x=0$ is a local minimum.
4. To find the global maximum and minimum, we check the critical points and the endpoints: $f(-3) = 9e^{-3} \approx 0.45$, $f(-2) = 4e^{-2} \approx 0.54$, $f(0)=0$, $f(1)=e^1 \approx 2.72$. Therefore, the global minimum occurs at $x=0$ and the global maximum occurs at $x=1$.

#### Problem 2

1. To find the critical points, we look for points where $g'(y)$ is zero or not defined. \begin{align*} g'(y) &= (1-3y^2)e^{y-y^3} \end{align*} The derivative is always defined and is zero if \begin{align*} (1-3y^2)e^{y-y^3} &=0\\ 1-3y^2 &=0\\ y^2&=\frac{1}{3}\\ y &=\pm \frac{1}{\sqrt{3}} \end{align*} Therefore, the critical points are $y=\pm 1/\sqrt{3}$.
2. $g'(y) \gt 0$ if $-1/\sqrt{3} \lt y \lt 1/\sqrt{3}$, so $g$ is increasing when $y$ is in that interval. $g'(y) \lt 0$ if $y \lt -1/\sqrt{3}$ or $y \gt 1/\sqrt{3}$, so $g$ is decreasing when $y$ is in those intervals.
3. $y=-1/\sqrt{3}$ is a local minimum since $g$ is decreasing just below it and increasing just above it. $y=1/\sqrt{3}$ is a local maximum since $g$ is increasing just below it and decreasing just above it. Alternatively, we could have calculated the second derivative \begin{align*} g''(y) &= -6ye^{y-y^3}+(1-3y^2)^2e^{y-y^3}\\ &= [(1-3y^2)^2-6y]e^{y-y^3}. \end{align*} Since $g''(-1/\sqrt{3}) \approx 2.36 \gt 0$, we can conclude that $y=-1/\sqrt{3}$ is a local minimum. Since $g''(1/\sqrt{3}) \approx -5.09 \lt 0$, we can conclude that $y=1/\sqrt{3}$ is a local maximum.
4. To find the global maximum and minimum, we check the critical points and the endpoints: $g(-1) = e^{-1-(-1)^3} = e^0=1$, $g(-1/\sqrt{3}) \approx 0.68$, $g(-1/\sqrt{3}) \approx 1.47$, and $g(2) = e^{2-2^3} = e^{-6} \approx 0.0025$. Therefore, the global maximum occurs at $y=1/\sqrt{3}$ and the global minimum occurs at $y=2$.

#### Problem 3

1. $h'(z)=2(z-a)$, which is defined everywhere, so the only critical point is where $h'(z)=0$, which is $z=a$.
2. $h'(z) \lt 0$ for $z \lt a$, so $h$ is decreasing for $z \lt a$. $h'(z) \gt 0$ for $z \gt a$, so $h$ is increasing for $z \gt a$.
3. $h''(z)=2 \gt 0$, so $z=a$ is a local minimum. There is no local maximum.
4. We check the endpoints and the critical points. $h(0) = a^2$, $h(a) = 0$, and $h(3a) = 4a^2$. The global minimum occurs at $z=a$ and the global maximum occurs at $z=3a$.

#### Problem 4

1. Since \begin{align*} k'(q) &= \frac{2q}{b^2}e^{-q}-\frac{q^2}{b^2}e^{-q}\\ &= \frac{1}{b^2}(2q-q^2)e^{-q}, \end{align*} the derivative is defined everywhere and the only critical points occur where the derivative is zero: \begin{align*} \frac{1}{b^2}(2q-q^2)e^{-q} &= 0\\ 2q-q^2&=0\\ q(2-q) &=0\\ q = 0 & \quad \text{or} \quad q=2. \end{align*} The critical points are $q=0$ and $q=2$.
2. $k'(q) \lt 0$ for $q \lt 0$ and $q \gt 2$, so $k$ is decreasing in those intervals. $k'(q) \gt 0$ for $0 \lt q \lt 2$, so $k$ is increasing in those intervals.
3. $q=2$ is a local maximum since $k$ is increasing just below it and decreasing just above it. $q=0$ is a local minimum since $q$ is decreasing just below it and increasing just above it. Alternatively, we could have calculated the second derivative \begin{align*} k''(1) &= \frac{1}{b^2}(2-2q)e^{-q}-\frac{1}{b^2}(2q-q^2)e^{-q}\\ &= \frac{1}{b^2}(2-4q+q^2)e^{-q}. \end{align*} Since $k''(2) = (2-8+4)e^{-2} = -2e^{-2} \lt 0$, we can conclude that $q=2$ is a local maximum. Since $k''(0) = 2e^{0}=2 \gt 0$, we can conclude that $q=0$ is a local minimum.
4. To find the global maximum and minimum, we check the critical points and the endpoints: $k(0) = 0$, $k(2) = \frac{4}{b^2}e^{-2} \approx 0.54/b^2$, $k(4)=\frac{16}{b^2}e^{-4} \approx 0.29/b^2$. Therefore, the global minimum occurs at $q=0$ and the global maximum occurs at $q=2$.

#### Problem 5

1. The derivative \begin{align*} m'(x) &= (x-c) +x\\ &= 2x-c \end{align*} is defined everywhere, so the only critical point is $x=c/2$, the point where $m'(x)=0$.
2. $m'(x) \lt 0$ for $x \lt c/2$, so $m$ is decreasing for $x \lt c/2$. $m'(x) \gt 0$ for $x \gt c/2$, so $m$ is increasing for $x \gt c/2$.
3. $m''(x)=2 \gt 0$ so $x=c/2$ is a local minimum. There is no local maximum.
4. We check the endpoints and the critical points. $m(0) = 0$, $m(c/2) = (c/2)(-c/2) = -c^2/4$, and $m(3c) = 3c(2c) = 6c^2$. The global minimum occurs at $x=c/2$, and the global maximum occurs at $x=3c$.

#### Problem 6

1. The derivative \begin{align*} n'(x) &= (x+c) +x\\ &= 2x+c \end{align*} is defined everywhere, so the only critical point is $x=-c/2$, the point where $n'(x)=0$.
2. $n'(x) \lt 0$ for $x \lt -c/2$, so $n$ is decreasing for $x \lt -c/2$. $n'(x) \gt 0$ for $x \gt -c/2$, so $n$ is increasing for $x \gt -c/2$.
3. $n''(x)=2 \gt 0$ so $x=-c/2$ is a local minimum. There is no local maximum.
4. We check the endpoints and the critical points. $n(-3c) = (-3c)(-2c) = 6c^2$, $n(-c/2) = (-c/2)(c/2) = -c^2/4$, and $n(0) = 0$. The global minimum occurs at $x=-c/2$, and the global maximum occurs at $x=-3c$.

#### Problem 7

1. The pollution level rising corresponds to $p'(t) \gt 0$. The derivative is \begin{align*} p'(t) &= 8(3)t^2e^{-2t} -8(2)t^3e^{-2t}\\ &= 8(3t^2-2t^3)e^{-2t}. \end{align*} The critical points are where $3t^2-2t^3 = t^2(3-2t)=0$. This occurs when $t=0$ and when $t=3/2$. We don't care about negative $t$ for this problem. The derivative is positive for $0 \lt t \lt 3/2$ and is negative for $t \gt 3/2$. Therefore the pollution level continues to rise for one and one-half weeks after the spill.
2. Since the pollution rises before $t=3/2$ and decreases afterward, the maximum pollution level is reached at $t=3/2$, or one ane one-half weeks after the spill. The maximum pollution level is $p(3/2) = 8(3/2)^3e^{-2(3/2)} = 27e^{-3} \approx 1.34$.

#### Problem 8

Let $g(k)=k \cdot p(k) = 1000k (1-k)^2$ be the fish harvest if $k$ is the fraction of fish harvested. Since $k$ is the fraction of fish, the relevant range of $k$ is $0 \lt k \lt 1$. To find the maximum of $g$ for $0 \lt k \lt 1$, we look for critical points of $g$. To make the derivative easier to compute, we'll multiply out the function and write it as \begin{align*} g(k) &= 1000k (1-2k +k^2)\\ &= 1000 (k -2k^2+k^3). \end{align*} Then, the derivative is simply \begin{align*} g'(k) &= 1000 (1- 4k +3k^2). \end{align*}

To find the critical points where $g'(k)=0$, we need to solve $1-4k+3k^2=0$. We can factor this as $(1-k)(1-3k)=0$, so the critical points are $k=1$ and $k=1/3$. Or, if you couldn't remember your factoring, you could use the quadratic equation to solve \begin{align*} k &= \frac{4 \pm \sqrt{16-12}}{6}\\ &= \frac{4 \pm \sqrt{4}}{6}\\ &= \frac{4 \pm 2}{6}\\ &= 1 \quad \text{or} \quad 1/3 \end{align*}

To find the global maximum, we check the endpoints and the critical points. $g(0)=0$, $g(1)=0$, and \begin{align*} g(1/3) &= 1000(1/3)(2/3)^2\\ &= 4000/27\\ & \approx 148. \end{align*} The maximum occurs at $k=1/3$. One-third of the fish should be harvested each year ot maximize the first harvest. The average number of fish in the lake is $p(1/3)=1000(2/3)^2 \approx 444$. The number of fish harvested is $g(1/3) \approx 148$.

#### Problem 9

Let $g(k)=k \cdot p(k) = ck (1-k)^2$ be the fish harvest if $k$ is the fraction of fish harvested. Since $k$ is the fraction of fish, the relevant range of $k$ is $0 \lt k \lt 1$. To find the maximum of $g$ for $0 \lt k \lt 1$, we look for critical points of $g$. To make the derivative easier to compute, we'll multiply out the function and write it as \begin{align*} g(k) &= c k (1-2k +k^2)\\ &= c (k -2k^2+k^3). \end{align*} Then, the derivative is simply \begin{align*} g'(k) &= c (1- 4k +3k^2). \end{align*}

To find the critical points where $g'(k)=0$, we need to solve $1-4k+3k^2=0$, just as in the previous problem. From above, the critical points are $k=1$ and $k=1/3$.

To find the global maximum, we check the endpoints and the critical points. $g(0)=0$, $g(1)=0$, and \begin{align*} g(1/3) &= c(1/3)(2/3)^2\\ &= 4c/27 \end{align*} The maximum occurs at $k=1/3$. One-third of the fish should be harvested each year ot maximize the first harvest. The average number of fish in the lake is $p(1/3)=4c/9$. The number of fish harvested is $g(1/3) = 4c/27$.