# Calculus: Derivatives III

## Concavity

The concavity of a function describes whether it looks like a hill or a valley. Concave down regions are like hills - if you were to pour water onto the graph, the water would fall down the sides. Concave up regions are like valleys - if you were to pour water onto the graph, the water would fall to these regions.

In more mathematically precise language, a region of a function is **concave up** if the second derivative is positive in that region, and a region of a function is **concave down** if the second derivative in that region is negative.

Determining regions of concavity requires two steps. First find the zeros of the second derivative. Then compute the second derivative for any point within each region; the sign of this point determines the concavity of the region.

## Problems

Determine the regions of concavity for the function $y=4x^2 - 4x - 4$.

**Part 1:**Take the first derivative:$\dfrac{d}{dx}y = \dfrac{d}{dx}\left(4x^2 - 4x - 4\right) \\ \dfrac{dy}{dx} = 8x - 4 \\ $

**Part 2:**Take the second derivative:$\dfrac{d}{dx}\dfrac{dy}{dx} = \dfrac{d}{dx}(8x - 4) \\ \dfrac{d^2y}{dx^2} = 8 \\ $

**Part 3:**Determine regions by finding zeros:Since this function is constant, there are no zeros. Since $8$ is positive, $y$ is concave up everywhere.

Determine the regions of concavity for the function $y = x^3 - x$.

**Part 1:**Take the first derivative:$\dfrac{d}{dx}y = \dfrac{d}{dx}\left(x^3 - x\right) \\ \dfrac{dy}{dx} = 3x^2 - 1 \\ $

**Part 2:**Take the second derivative:$\dfrac{d}{dx}\dfrac{dy}{dx} = \dfrac{d}{dx}(3x^2 - 1) \\ \dfrac{d^2y}{dx^2} = 6x \\ $

**Part 3:**Determine regions by finding zeros:Clearly $\dfrac{d^2y}{dx^2}$ has a zero at $x=0$. We can also see that $\dfrac{d^2y}{dx^2} < 0$ when $x < 0$ and $\dfrac{d^2y}{dx^2} > 0$ when $x > 0$. Therefore, $y$ is concave down when $ x < 0$ and $y$ is concave up when $x > 0$.

Determine the regions of concavity for the function $y = -16x + 2$.

**Part 1:**Take the first derivative:$\dfrac{d}{dx}y = \dfrac{d}{dx}\left(-16x + 2\right) \\ \dfrac{dy}{dx} = -16 \\ $

**Part 2:**Take the second derivative:$\dfrac{d}{dx}\dfrac{dy}{dx} = \dfrac{d}{dx}(-16) \\ \dfrac{d^2y}{dx^2} = 0 \\ $

**Part 3:**Determine regions by finding zeros:Since the second derivative is zero everywhere, $y$ has no regions that are either concave up or concave down.

Determine the regions of concavity for the function $y = x^4 - 12x^3 + 48x^2 +9x + 7$.

**Part 1:**Take the first derivative:$\dfrac{d}{dx}y = \dfrac{d}{dx}\left(x^4 - 12x^3 + 48x^2 +9x + 7\right) \\ \dfrac{dy}{dx} = 4x^3 - 36x^2 + 96x +9 \\ $

**Part 2:**Take the second derivative:$\dfrac{d}{dx}\dfrac{dy}{dx} = \dfrac{d}{dx}\left(4x^3 - 18x^2 + 112x +9\right) \\ \dfrac{d^2y}{dx^2} = 12x^2 - 72x + 96 \\ $

**Part 3:**Determine regions by finding zeros:$12x^2 - 72x + 96 = 0 \\ x^2 - 6x + 8 = 0 \\ (x-3)(x-2) \\ $

The second derivative has zeros at $x=3$ and $x=2$. Its leading coefficient is positive, so it is therefore positive when $x < 2$ and $x > 3$, and thus negative when $2 < x < 3$. Therefore $y$ is concave up when $x < 2$ and when $x > 3$ and is concave down when $2 < x < 3$.

Determine the regions of concavity for the function $y = e^{-2x} + e^{2x}$.

**Part 1:**Take the first derivative:$\dfrac{d}{dx}y = \dfrac{d}{dx}\left(e^{-2x} + e^{2x}\right) \\ \dfrac{dy}{dx} = -2e^{2x} + 2e^{2x} \\ $

**Part 2:**Take the second derivative:$\dfrac{d}{dx}\dfrac{dy}{dx} = \dfrac{d}{dx}(-2e^{2x} + 2e^{2x}) \\ \dfrac{d^2y}{dx^2} = 4e^{-2x} + 4e^{2x} \\ $

**Part 3:**Determine regions by finding zeros:$4e^{-2x} + 4e^{2x} = 0$

Since exponential functions are always positive, the second derivative of $y$ has no zeros and is thus concave up everywhere.

Determine the regions of concavity for the function $y = \tan(\theta)$.

**Part 1:**Take the first derivative:$\dfrac{d}{d\theta}y = \dfrac{d}{d\theta}\tan(\theta) \\ \dfrac{dy}{d\theta} = \sec^2(\theta) \\ $

**Part 2:**Take the second derivative:$\dfrac{d}{d\theta}\dfrac{dy}{d\theta} = \dfrac{d}{d\theta}(\sec^2(\theta)) \\ \dfrac{d^2y}{d\theta^2} = 2\tan(\theta)\sec^2(\theta) \\ $

**Part 3:**Determine regions by finding zeros:Rather than set the second derivative to $0$ and solve for $\theta$ directly, we can observe that it will be $0$ when either $\tan(\theta)=0$ or when $\sec^2(\theta)=0$. Since $\sec^2(\theta)$ is always positive, it does not affect the sign of the second derivative. That leaves finding zeros of $\tan(\theta)$, which occur when $\theta=k\pi$, where $k \in \mathbb{Z}$. However, also note that both $\tan(\theta)$ and $\sec^2(\theta)$ are undefined when $\theta = \dfrac{(2k+1)\pi}{2}$, where $k \in \mathbb{Z}$.

Since the second derivative has the same sign until it crosses a zero or crosses an asymptote, the remaining task is to simply test a point in each region of the function for its sign. This can be made easier to compute by discarding the $\sec^2(\theta)$ term - since it is always positive, it has no impact on the sign. This leaves $\tan(\theta)$, which is positive for $2k\pi < \theta < \dfrac{(2k+1)\pi}{2}$ and negative for $\dfrac{(2k-1)\pi}{2} < \theta < 2k\pi$. Therefore $y$ is concave up and conave down in those respective regions.

Determine the regions of concavity for the function $y = \sin(\theta)$.

**Part 1:**Take the first derivative:$\dfrac{d}{dx}y = \dfrac{d}{d\theta}\sin(\theta) \\ \dfrac{dy}{dx} = \cos(\theta) \\ $

**Part 2:**Take the second derivative:$\dfrac{d}{dx}\dfrac{dy}{dx} = \dfrac{d}{dx}\cos(\theta) \\ \dfrac{d^2y}{dx^2} = -\sin(\theta) \\ $

**Part 3:**Determine regions by finding zeros:$\sin(\theta)$ has zeros at $\theta=k\pi$, where $k \in \mathbb{Z}$. Since $-\sin(\theta) < 0$ when $2k\pi < \theta < (2k+1)\pi$, $y$ is concave down in these regions, and since $-\sin(\theta) > 0$ when $(2k-1)\pi < \theta < 2k\pi$, $y$ is concave up in these regions.

Determine the regions of concavity for the function $y=\sqrt{6x}$ where $x > 0$.

**Part 1:**Take the first derivative:$\dfrac{d}{dx}y = \dfrac{d}{dx}\sqrt{6x} \\ \dfrac{dy}{dx} = \dfrac{3}{\sqrt{6x}} \\ $

**Part 2:**Take the second derivative:$\dfrac{d}{dx}\dfrac{dy}{dx} = \dfrac{d}{dx}\dfrac{3}{\sqrt{6x}} \\ \dfrac{d^2y}{dx^2} = \dfrac{-9}{x^(3/2)} \\ $

**Part 3:**Determine regions by finding zeros:The second derivative has no zeros (remember, $x>0$). It is also always negative, so $y$ is concave down everywhere.

Determine the regions of concavity for the function $y=\ln{x+4}$ where $x > -4$.

**Part 1:**Take the first derivative:$\dfrac{d}{dx}y = \dfrac{d}{dx}\ln{x+4} \\ \dfrac{dy}{dx} = \dfrac{1}{x+4} \\ $

**Part 2:**Take the second derivative:$\dfrac{d}{dx}\dfrac{dy}{dx} = \dfrac{d}{dx}\dfrac{1}{x+4} \\ \dfrac{d^2y}{dx^2} = \dfrac{-1}{(x+4)^2} \\ $

**Part 3:**Determine regions by finding zeros:The second derivative has no zeros (remember, $x > 0$). It is also always negative, so $y$ is concave down everywhere.

Determine the regions of concavity for the function $y=x^4 + 18x^3 + 120x^2 + \pi^2x - 7$.

**Part 1:**Take the first derivative:$\dfrac{d}{dx}y = \dfrac{d}{dx}\left(x^4 + 18x^3 + 120x^2 + \pi^2x - 7\right) \\ \dfrac{dy}{dx} = 4x^3 + 54x^2 + 240x + \pi^2 \\ $

**Part 2:**Take the second derivative:$\dfrac{d}{dx}\dfrac{dy}{dx} = \dfrac{d}{dx}\left(4x^3 + 54x^2 + 240x + \pi^2\right) \\ \dfrac{d^2y}{dx^2} = 12x^2 + 108x + 240 \\ $

**Part 3:**Determine regions by finding zeros:$\dfrac{d^2y}{dx^2} = 0 \\ 12x^2 + 108x + 240 = 0 \\ x^2 + 9 + 20 = 0 \\ (x+4)(x+5) = 0 \\ $

The second derivative has zeros at $x=-4$ and $x=-5$. Its leading coefficient is positive, so it is therefore positive when $x < -5$ and $x > -4$, and thus negative when $2 < x < 3$. Therefore $y$ is concave up when $x < 2$ and when $x > 3$ and is concave down when $2 < x < 3$.