TD 4

Index

Function Analysis

General approach

  1. Determine the domain of the function by noting whether there are any points or ranges where the function is undefined. This often happens when a value of $x$ would lead to a denominator equal to $0$, or a negative input inside a pure square root or logarithm, for example.
  2. Check for the axes intercepts. For the y-axis, this is simply done by evaluating $f(0)$. For the x-axis, it's achieved by solving $f(x)=0$. Note that a function might not have intercepts. In the case of the y-axis, this happens if $0$ is not part of the domain of $f(x)$. In the case of the x-axis, it happens when $f(x)=0$ has no real solutions.
  3. Calculate the limits at the boundaries of the function. For example, if the domain of $f(x)$ is $x \in (-\infty,1) \cup (2,3) \cup (5,+\infty)$, then the following limits should be computed (being careful to approach either to the left or to the right in each case for $2$, $3$ and $5$): $$\lim_{x \to -\infty} f(x) \quad \lim_{x \to 1^-} f(x) \quad \lim_{x \to 2^+} f(x) \quad \lim_{x \to 3^-} f(x) \quad \lim_{x \to 5^+} f(x) \quad \lim_{x \to +\infty} f(x) \quad$$
  4. These limits also reveal whether there are any vertical or horizontal asymptotes:
    • Given $x^*$ a finite boundary of $f(x)$, a vertical asymptote is present at $x_a=x^*$ when $\lim_{x \to x*}f(x) = \pm \infty$
    • A horizontal asymptote is present at $y_a$ when $\lim_{x \to \infty} = y_a \not= \infty$
  5. Compute the first derivative $f'(x)$. Then, the values of $x$ at which $f'(x)=0$, here called $x'_0$, will correspond to the location of maximum/minimum points. Evaluating the sign of $f'(x)$ before and after these $x'_0$ values also helps, in order to know the increasing-decreasing intervals.
  6. Compute the second derivative $f''(x)$. Then, the values of $x$ at which $f''(x)=0$, here called $x''_0$, can point to locations where a change of concavity occurs. The concave-convex intervals can be determined by evaluating the sign of $f''(x)$ before and after these $x''_0$ values. The second derivate is also useful to know whether the $x'_0$ points correspond to local maxima or minima, by evaluating $f''(x'_0)$: $$f''(x'_0) < 0 \Rightarrow max \\ f''(x'_0) > 0 \Rightarrow min \\$$

Exercise 1

$f(x)$ Domain Asymptotes Limits at Boundaries Axes Intercepts Increasing-Decreasing Intervals Concave-Convex Intervals Maximum-Minimum Points Inflection Points Plot
$$x^4-18x^2+56$$ $$\begin{aligned} y &= f(x) \\ \mathbf{X} &\longrightarrow \mathbf{Y} \\ \mathbf{X} &= (-\infty, +\infty) \\ \mathbf{X} &= \mathbb{R} \\ \end{aligned}$$ $$\begin{aligned} x_a &\in \{\} \text{ because } x^* \in \{\} \\ && \\ y_a &\in \{\} \text{ as found in "Limits at Boundaries"} \\ \end{aligned}$$ $$\begin{aligned} &\lim_{x \to -\infty} x^4-18x^2+56 \\ \sim &\lim_{x \to -\infty} x^4 \\ = &+\infty \\ && \\ &\lim_{x \to +\infty} x^4-18x^2+56 \\ \sim &\lim_{x \to +\infty} x^4 \\ = & +\infty \\ \end{aligned}$$ $$\begin{aligned} f(x) &= (x^2-4)(x^2-14) \\ &= (x+\sqrt{14})(x-\sqrt{14})(x+2)(x-2) \\ x_0 &\in \{-\sqrt{14}, -2, 2, \sqrt{14}\} \\ &\approx \{-3.74, -2, 2, 3.74\} \\ && \\ y_0 &= f(0) = 56 \\ \end{aligned}$$ $$\begin{aligned} f'(x) &= 4x^3-36x \\ &= 4x(x^2-9) \\ &= 4x(x-3)(x+3) \\ x'_0 &\in \{-3, 0, 3\} \\ \end{aligned}$$ $$\begin{aligned} f'(x) < 0, && x &\in (-\infty,-3) && (-)\\ f'(x) > 0, && x &\in (-3,0) && (+) \\ f'(x) < 0, && x &\in (0,3) && (-) \\ f'(x) > 0, && x &\in (3, +\infty) && (+) \\ \end{aligned}$$ $$\begin{aligned} f''(x) &= 12x^2 - 36\\ &= 12(x^2-3) \\ &= 12(x-\sqrt{3})(x+\sqrt{3}) \\ x''_0 &\in \{-\sqrt{3}, \sqrt{3}\} \\ &\approx \{-1.73, 1.73\} \\ \end{aligned}$$ $$\begin{aligned} f''(x) > 0, && x &\in (-\infty,-\sqrt{3}) && (\cup)\\ f''(x) < 0, && x &\in (-\sqrt{3},\sqrt{3}) && (\cap) \\ f''(x) > 0, && x &\in (\sqrt{3}, +\infty) && (\cup) \\ \end{aligned}$$ $$\begin{aligned} x'_0 &\in \{-3, 0, 3\} && \\ f''(-3) &= 12(-3)^2 - 36 > 0 &\Rightarrow min \\ f''( 0) &= 12( 0)^2 - 36 < 0 &\Rightarrow max \\ f''( 3) &= 12( 3)^2 - 36 > 0 &\Rightarrow min \\ \end{aligned}$$ $$\begin{aligned} x''_0 &\in \{-\sqrt{3}, \sqrt{3}\} \\ \end{aligned}$$
figures/td4-1a.png
$$\frac{2x-x^2}{x^2-2x+1}$$ $$\begin{aligned} f(x) &= \frac{g(x)}{h(x)} \\ h(x) &= x^2-2x+1 \\ &= (x-1)^2 \\ x^* &\in \{1\} \\ && \\ \mathbf{X} &= (-\infty,1) \cup (1,+\infty) \\ \mathbf{X} &= \mathbb{R} \backslash \{1\} \\ \end{aligned}$$ $$\begin{aligned} x^* &\in \{1\} \\ &\lim_{x \to 1} \frac{2x-x^2}{x^2-2x+1} = \frac{1}{0} \to \infty \\ && \\ x_a &\in \{1\} \\ && \\ y_a &\in \{-1\} \text{ as found in "Limits at Boundaries"} \\ \end{aligned}$$ $$\begin{aligned} &\lim_{x \to -\infty} \frac{2x-x^2}{x^2-2x+1} \\ = &\lim_{x \to -\infty} \frac{\frac{2}{x}-1}{1-\frac{2}{x}+\frac{1}{x^2}} \\ = &-1 && \\ &\lim_{x \to +\infty} \frac{2x-x^2}{x^2-2x+1} \\ = &\lim_{x \to +\infty} \frac{\frac{2}{x}-1}{1-\frac{2}{x}+\frac{1}{x^2}} \\ = &-1 \end{aligned}$$ $$\begin{aligned} g(x) &= 2x-x^2 \\ &= x(2-x) \\ x_0 &\in \{0,2\} \\ && \\ y_0 &= f(0) \\ &= \frac{2(0)-(0)^2}{(0)^2-2(0)+1} \\ &= 0 \end{aligned}$$ $$\begin{aligned} f'(x) &= \frac{(2-2x)(x^2-2x+1) - (2x-x^2)(2x-2)}{(x^2-2x+1)^2} \\ &= \frac{-2 ((x-1)(x^2-2x+1) + (x-1)(2x-x^2))}{(x-1)^4} \\ &= \frac{-2 (x^2-2x+1 + 2x-x^2)}{(x-1)^3} \\ &=-\frac{2}{(x-1)^3} = -2(x-1)^{-3} \\ &\qquad x'_0 \in \{\} \qquad x'^* \in \{1\} \\ \end{aligned}$$ $$\begin{aligned} f'(x) > 0, && x &\in (-\infty,1) && (+) \\ f'(x) < 0, && x &\in (1,+\infty) && (-) \\ \end{aligned}$$ $$\begin{aligned} f''(x) &= 6(x-1)^{-4} \\ x''_0 &\in \{\} \qquad x''^* \in \{1\} \\ \end{aligned}$$ $$\begin{aligned} f''(x) > 0, && x &\in (-\infty,1) && (\cup) \\ f''(x) > 0, && x &\in (1,+\infty) && (\cup) \\ \end{aligned}$$ $$\begin{aligned} x'_0 &\in \{\} \\ \end{aligned}$$ $$\begin{aligned} x''_0 &\in \{\} \\ \end{aligned}$$
figures/td4-1b.png
$$\frac{2x^2+3x+1}{x^2-1}$$ $$\begin{aligned} f(x) &= \frac{g(x)}{h(x)} \\ h(x) &= x^2-1 \\ &= (x+1)(x-1) \\ x^* &\in \{-1,1\} \\ && \\ \mathbf{X} &= \mathbb{R} \backslash \{-1,1\} \\ \end{aligned}$$ $$\begin{aligned} x^* &\in \{-1,1\} \\ &\lim_{x \to -1} \frac{2x^2+3x+1}{x^2-1} \\ = &\lim_{x \to -1} \frac{(x+1)(2x+1)}{(x+1)(x-1)} \\ = &\lim_{x \to -1} \frac{2x+1}{x-1} = \frac{1}{2}\\ && \\ &\lim_{x \to 1} \frac{2x^2+3x+1}{x^2-1} = \frac{6}{0} \to \infty \\ && \\ x_a &\in \{1\} \\ && \\ y_a &\in \{2\} \text{ as found in "Limits at Boundaries"} \\ \end{aligned}$$ $$\begin{aligned} &\lim_{x \to -\infty} \frac{2x^2+3x+1}{x^2-1} \\ = &\lim_{x \to -\infty} \frac{2+\frac{3}{x}+\frac{1}{x^2}}{1-\frac{1}{x^2}} \\ = &2 \\ && \\ &\lim_{x \to +\infty} \frac{2x^2+3x+1}{x^2-1} \\ = &\lim_{x \to -\infty} \frac{2+\frac{3}{x}+\frac{1}{x^2}}{1-\frac{1}{x^2}} \\ = &2 \\ \end{aligned}$$ $$\begin{aligned} g(x) &= 2x^2+3x+1 \\ &= (x+1)(2x+1) \\ x_0 &\in \{-\frac{1}{2}\} \\ && \\ y_0 &= f(0) \\ &= \frac{2(0)^2+3(0)+1}{(0)^2-1} \\ &= -1 \\ \end{aligned}$$ $$\begin{aligned} f'(x) &= \frac{(4x+3)(x^2-1)-(2x^2+3x+1)(2x)}{(x^2-1)^2} \\ &= \frac{4x^3-4x+3x^2-3-4x^3-6x^2-2x}{(x+1)^2(x-1)^2} \\ &= \frac{-3x^2-6x-3}{(x+1)^2(x-1)^2} \\ &= \frac{-3(x+1)^2}{(x+1)^2(x-1)^2} \\ &= \frac{-3}{(x-1)^2} = -3(x-1)^{-2} \\ &\qquad x'_0 \in \{\} \qquad x'^* \in \{1\} \\ \end{aligned}$$ $$\begin{aligned} f'(x) < 0, && x &\in (-\infty,1) && (-) \\ f'(x) < 0, && x &\in (1,+\infty) && (-) \\ \end{aligned}$$ $$\begin{aligned} f''(x) &= 6(x-1)^{-3} \\ x''_0 &\in \{\} \qquad x''^* \in \{1\} \\ \end{aligned}$$ $$\begin{aligned} f''(x) < 0, && x &\in (-\infty,1) && (\cap) \\ f''(x) > 0, && x &\in (1,+\infty) && (\cup) \\ \end{aligned}$$ $$\begin{aligned} x'_0 &\in \{\} \\ \end{aligned}$$ $$\begin{aligned} x''_0 &\in \{\} \\ \end{aligned}$$
figures/td4-1c.png
$$\sqrt{x^2-2x-5}$$ $$\begin{aligned} f(x) &= \sqrt{g(x)}, \quad g(x) \geq 0 \\ g(x) &= x^2-2x-5 = x^2-2x+1-6 \\ &= (x-1+\sqrt{6})(x-1-\sqrt{6}) \\ g''(x) &= 2 > 0 \quad (\cup) \\ &\therefore g(x) > 0, x \in (-\infty, 1-\sqrt{6}) \cup (1+\sqrt{6}, +\infty) \\ && \\ \mathbf{X} &= (-\infty, 1-\sqrt{6}) \cup (1+\sqrt{6}, +\infty) \\ & \approx (-\infty, -1.45) \cup (3.45, +\infty) \\ \end{aligned}$$ $$\begin{aligned} &\lim_{x \to 1 \pm \sqrt{6}} \sqrt{x^2-2x-5} = 0 \\ \\ x_a &\in \{\} \\ && \\ y_a &\in \{\} \text{ as found in "Limits at Boundaries"} \\ \end{aligned}$$ $$\begin{aligned} &\lim_{x \to -\infty} \sqrt{x^2-2x-5} \\ \sim &\lim_{x \to -\infty} \sqrt{x^2} \\ = &+\infty \\ && \\ &\lim_{x \to +\infty} \sqrt{x^2-2x-5} \\ \sim &\lim_{x \to +\infty} \sqrt{x^2} \\ = &+\infty \\ \end{aligned}$$ $$\begin{aligned} \sqrt{g_0} &= 0, \quad g_0 = 0 \\ g(x) &= x^2-2x-5 = 0 \\ &= (x-1+\sqrt{6})(x-1-\sqrt{6}) = 0 \\ x_0 &\in \{1-\sqrt{6}, 1+\sqrt{6}\} \\ && \\ y_0 &= f(0) \\ 0 &\not \in \mathbf{X} \\ &\therefore \text{ no intercept } y_0 \\ \end{aligned}$$ $$\begin{aligned} f'(x) &= \frac{1}{2} (x^2-2x-5)^{-\frac{1}{2}} (2x-2) \\ &= (x-1)(x^2-2x-5)^{-\frac{1}{2}} \\ &\qquad x'_0 \in \{\} \qquad x'^* \in \{1-\sqrt{6}, 1+\sqrt{6}\} \\ \end{aligned}$$ $$\begin{aligned} f'(x) < 0, && x &\in (-\infty, 1-\sqrt{6}) && (-) \\ f'(x) > 0, && x &\in (1+\sqrt{6}, +\infty) && (+) \\ \end{aligned}$$ $$\begin{aligned} f''(x) &= (1)(x^2-2x-5)^{-\frac{1}{2}} + (x-1)(-\frac{1}{2})(x^2-2x-5)^{-\frac{3}{2}}(2x-2) \\ &= (x^2-2x-5)^{-\frac{1}{2}} -(x-1)^2(x^2-2x-5)^{-\frac{3}{2}} \\ &= \frac{x^2-2x-5}{(x^2-2x-5)^{\frac{3}{2}}} -\frac{x^2-2x+1}{(x^2-2x-5)^{\frac{3}{2}}} \\ &= -\frac{6}{(x^2-2x-5)^{\frac{3}{2}}} \\ &\qquad x'_0 \in \{\} \qquad x'^* \in \{1-\sqrt{6}, 1+\sqrt{6}\} \\ \end{aligned}$$ $$\begin{aligned} f''(x) < 0, && x &\in (-\infty, 1-\sqrt{6}) && (\cap) \\ f''(x) < 0, && x &\in (1+\sqrt{6}, +\infty) && (\cap) \\ \end{aligned}$$ $$\begin{aligned} x'_0 &\in \{\} \\ \end{aligned}$$ $$\begin{aligned} x''_0 &\in \{\} \\ \end{aligned}$$
figures/td4-1d.png
$$ln(4x+3)$$ $$\begin{aligned} f(x) &= ln(g(x)), \quad g(x) > 0 \\ g(x) &= 4x+3 > 0 \\ x &> -\frac{3}{4} \\ && \\ \mathbf{X} &= (-\frac{3}{4}, +\infty) \\ \end{aligned}$$ $$\begin{aligned} x_a &\in \{-\frac{3}{4}\} \text{ as found in "Limits at Boundaries"} \\ && \\ y_a &\in \{\} \text{ as found in "Limits at Boundaries"} \\ \end{aligned}$$ $$\begin{aligned} &\lim_{x \to -\frac{3}{4}} ln(4x+3) \\ = &-\infty \\ && \\ &\lim_{x \to +\infty} ln(4x+3) \\ = &+\infty \\ \end{aligned}$$ $$\begin{aligned} ln(g_0) &= 0, \quad g_0 = 1 \\ g(x) &= 4x + 3 = 1 \\ x_0 &\in \{-\frac{1}{2}\} \\ && \\ y_0 &= f(0) \\ &= ln(4(0)+3) \\ &= ln(3) \approx 1.098 \\ \end{aligned}$$ $$\begin{aligned} f'(x) &= \frac{4}{4x+3} = 4(4x+3)^{-1} \\ &\qquad x'_0 \in \{\} \qquad x'^* \in \{-\frac{3}{4}\} \\ \end{aligned}$$ $$\begin{aligned} f'(x) > 0, && x &\in (-\frac{3}{4}, +\infty) && (+) \\ \end{aligned}$$ $$\begin{aligned} f''(x) &= -4(4x+3)^{-2}(4) \\ &= -16(4x+3)^{-2} \\ &\qquad x''_0 \in \{\} \qquad x''^* \in \{-\frac{3}{4}\} \\ \end{aligned}$$ $$\begin{aligned} f''(x) < 0, && x &\in (-\frac{3}{4}, +\infty) && (\cap) \\ \end{aligned}$$ $$\begin{aligned} x'_0 &\in \{\} \\ \end{aligned}$$ $$\begin{aligned} x''_0 &\in \{\} \\ \end{aligned}$$
figures/td4-1e.png
$$e^{2x}-3e^x+2$$ $$\begin{aligned} f(x) &= g^2(x)-3g(x)+2 \\ g(x) &= e^x \\ \mathbf{X} &= \mathbb{R} \\ \end{aligned}$$ $$\begin{aligned} x_a &\in \{\} \text{ because } x^* \in \{\} \\ && \\ y_a &\in \{2\} \text{ as found in "Limits at Boundaries"} \\ \end{aligned}$$ $$\begin{aligned} &\lim_{x \to -\infty} e^{2x}-3e^x+2 \\ = &(0)-(0)+2 \\ = &2 \\ && \\ &\lim_{x \to +\infty} e^{2x}-3e^x+2 \\ \sim &\lim_{x \to -\infty} e^{2x} \\ = &+\infty \\ \end{aligned}$$ $$\begin{aligned} f(x) &= (e^x)^2-3e^x+2 \\ &= (e^x-2)(e^x-1) \\ x_0 &\in \{0, ln(2)\} \\ &\approx \{0, 0.693\} \\ && \\ y_0 &= f(0) \\ &= e^{2(0)}-3e^{(0)}+2 \\ &= (1)-3(1)+2 \\ &= 0 \\ \end{aligned}$$ $$\begin{aligned} f'(x) &= 2e^{2x}-3e^x = 0 \\ 2e^{2x} &= 3e^x \\ e^x &= \frac{3}{2} \\ x'_0 &\in \{ln(\frac{3}{2})\} \\ &\approx \{0.405\} \\ \end{aligned}$$ $$\begin{aligned} f'(x) < 0, && x &\in (-\infty, ln(\frac{3}{2})) && (-) \\ f'(x) > 0, && x &\in (ln(\frac{3}{2}), +\infty) && (+) \\ \end{aligned}$$ $$\begin{aligned} f''(x) &= 4e^{2x}-3e^x = 0 \\ 4e^{2x} &= 3e^x \\ e^x &= \frac{3}{4} \\ x''_0 &\in \{ln(\frac{3}{4})\} \\ &\approx \{-0.288\} \\ \end{aligned}$$ $$\begin{aligned} f''(x) < 0, && x &\in (-\infty, ln(\frac{3}{4})) && (\cap) \\ f''(x) > 0, && x &\in (ln(\frac{3}{4}), +\infty) && (\cup) \\ \end{aligned}$$ $$\begin{aligned} x'_0 &= ln(\frac{3}{2}) \\ f''(ln(\frac{3}{2})) &= 4e^{2ln(\frac{3}{2})}-3e^{ln(\frac{3}{2})} \\ &= 4e^{ln(\frac{9}{4})}-3\frac{3}{2} \\ &= 4\frac{9}{4}-\frac{9}{2} \\ &= \frac{9}{2} > 0 \Rightarrow min \\ \end{aligned}$$ $$\begin{aligned} x''_0 &= ln(\frac{3}{4}) \\ \end{aligned}$$
figures/td4-1f.png
$$2sin^2(x)-sin(x)-1$$ $$\begin{aligned} f(x) &= 2g^2(x)-g(x)-1 \\ g(x) &= sin(x) \\ \mathbf{X} &= \mathbb{R} \\ \end{aligned}$$ $$\begin{aligned} x_a &\in \{\} \text{ because } x^* \in \{\} \\ && \\ y_a &\in \{\} \text{ as found in "Limits at Boundaries"} \\ \end{aligned}$$ $$\begin{aligned} &\lim_{x \to -\infty} 2sin^2(x)-sin(x)-1 \\ &\qquad \lim_{x \to -\infty} sin(x) \text{ diverges }\\ && \\ &\lim_{x \to +\infty} 2sin^2(x)-sin(x)-1 \\ &\qquad \lim_{x \to +\infty} sin(x) \text{ diverges }\\ \end{aligned}$$ $$\begin{aligned} f(x) &= 2sin^2(x)-sin(x)-1 \\ &= (2sin(x) + 1)(sin(x) - 1) = 0 \\ sin(x_0) &= -\frac{1}{2} \Rightarrow x_0 \in \{2n\pi+arcsin(-\frac{1}{2}), 2n\pi+\pi-arcsin(-\frac{1}{2})\} \\ &= \{2n\pi-\frac{\pi}{6}, 2n\pi+\pi+\frac{\pi}{6}\} \\ &= \{\pi(2n-\frac{1}{6}), \pi(2n+\frac{7}{6})\}, \qquad n \in \mathbb{Z} \\ sin(x_0) &= 1 \Rightarrow x_0 \in \{2n\pi+arcsin(1), 2n\pi+\pi-arcsin(1)\} \\ &= \{2n\pi+\frac{\pi}{2}, 2n\pi+\pi-\frac{\pi}{2}\} \\ &= \{\pi(2n+\frac{1}{2})\} \\ \therefore x_0 &\in \{(2n-\frac{1}{6})\pi, (2n+\frac{3}{6})\pi, (2n+\frac{7}{6})\pi\} \\ && \\ y_0 &= f(0) \\ &= 2sin^2(0)-sin(0)-1 \\ &= -1 \\ \end{aligned}$$ $$\begin{aligned} f'(x) &= 2(2sin(x))cos(x) - cos(x) \\ &= (4sin(x) - 1) cos(x) = 0 \\ sin(x'_0) &= \frac{1}{4} \Rightarrow x'_0 \in \{2n\pi+\theta, 2n\pi+\pi-\theta\} \\ &\quad \text{ with } \theta=arcsin(\frac{1}{4}) \approx 0.25 \approx \frac{\pi}{12} \\ cos(x'_0) &= 0 \Rightarrow x'_0 \in \{2n\pi+arccos(0), 2n\pi+2\pi-arccos(0)\} \\ &= \{2n\pi+\frac{\pi}{2}, 2n\pi+2\pi-\frac{\pi}{2}\} \\ \therefore x'_0 &\in \{\pi(2n + \frac{\theta}{\pi}), \pi(2n + \frac{1}{2}), \pi(2n + 1 - \frac{\theta}{\pi}), \pi(2n + 2 - \frac{1}{2})\} \\ &\approx \{\pi(2n + \frac{1}{12}), \pi(2n + \frac{6}{12}), \pi(2n + \frac{11}{12}), \pi(2n + \frac{18}{12})\} \\ \end{aligned}$$ $$\begin{aligned} f'(x) > 0, && x &\in (\pi(2n + \frac{1}{12}), \pi(2n + \frac{6}{12})) && (+) \\ f'(x) < 0, && x &\in (\pi(2n + \frac{6}{12}), \pi(2n + \frac{11}{12})) && (-) \\ f'(x) > 0, && x &\in (\pi(2n + \frac{11}{12}), \pi(2n + \frac{18}{12})) && (+) \\ f'(x) < 0, && x &\in (\pi(2n + \frac{18}{12}), \pi(2n + 2 + \frac{1}{12})) && (-) \\ \end{aligned}$$ $$\begin{aligned} f''(x) &= (4cos(x))(cos(x)) + (4sin(x) - 1)(-sin(x)) \\ &= 4(cos^2(x) - sin^2(x)) + sin(x) \\ &= 4(1 - sin^2(x) - sin^2(x)) + sin(x) \\ &= -8sin^2(x) + sin(x) + 4 = 0 \Rightarrow \text{ use quadratic formula} \\ sin(x''_0) &= \frac{1-\sqrt{129}}{16} \Rightarrow x''_0 \in \{2n\pi+\alpha, 2n\pi+\pi-\alpha\} \\ &\quad \text{ with } \alpha=arcsin(\frac{1-\sqrt{129}}{16}) \approx -0.70 \approx -\frac{8\pi}{36} \\ sin(x''_0) &= \frac{1+\sqrt{129}}{16} \Rightarrow x''_0 \in \{2n\pi+\beta, 2n\pi+\pi-\beta\} \\ &\quad \text{ with } \beta=arcsin(\frac{1+\sqrt{129}}{16}) \approx 0.88 \approx \frac{10\pi}{36} \\ \therefore x''_0 &\in \{\pi(2n+\frac{\alpha}{\pi}), \pi(2n+\frac{\beta}{\pi}), \pi(2n+1-\frac{\beta}{\pi}), \pi(2n+1-\frac{\alpha}{\pi})\} \\ &\approx \{\pi(2n-\frac{8}{36}), \pi(2n+\frac{10}{36}), \pi(2n+\frac{26}{36}), \pi(2n+\frac{44}{36})\} \end{aligned}$$ $$\begin{aligned} f''(x) > 0, && x &\in (\pi(2n-\frac{8}{36}), \pi(2n+\frac{10}{36})) && (\cup) \\ f''(x) < 0, && x &\in (\pi(2n+\frac{10}{36}), \pi(2n+\frac{26}{36})) && (\cap) \\ f''(x) > 0, && x &\in (\pi(2n+\frac{26}{36}), \pi(2n+\frac{44}{36})) && (\cup) \\ f''(x) < 0, && x &\in (\pi(2n+\frac{44}{36}), \pi(2n+2-\frac{8}{36})) && (\cap) \\ \end{aligned}$$ $$\begin{aligned} x'_0 &\approx \pi(2n + \frac{1}{12}) \\ f''(\frac{\pi}{12}) &> 0 \Rightarrow min \\ x'_0 &= \pi(2n + \frac{6}{12}) \\ f''(\frac{6\pi}{12}) &< 0 \Rightarrow max \\ x'_0 &\approx \pi(2n + \frac{11}{12}) \\ f''(\frac{11\pi}{12}) &> 0 \Rightarrow min \\ x'_0 &= \pi(2n + \frac{18}{12}) \\ f''(\frac{18\pi}{12}) &< 0 \Rightarrow max \\ \end{aligned}$$ $$\begin{aligned} x''_0 &\approx \pi(2n-\frac{8}{36}) \\ x''_0 &\approx \pi(2n+\frac{10}{36}) \\ x''_0 &\approx \pi(2n+\frac{26}{36}) \\ x''_0 &\approx \pi(2n+\frac{44}{36}) \\ \end{aligned}$$
figures/td4-1g.png

Verbose explanation of $f(x) = 2sin^2(x)-sin(x)-1$

Background

Domain

$f(x)$ is a polynomial of $sin(x)$, which is defined for all real numbers. Therefore, the domain of $f(x)$ is $\mathbb{R}$.

Asymptotes

Limits at Boundaries

See explanation above regarding the abscence of horizontal asymptotes for $f(x)$.

Axes Intercepts

Increasing-Decreasing Intervals

Solving the derivative

Compute the first derivative as usual: $$\begin{aligned} f'(x) &= 2(2sin(x))cos(x) - cos(x) \\ &= (4sin(x) - 1) cos(x) = 0 \\ \end{aligned}$$ In its factorized form, $(4sin(x) - 1) cos(x) = 0$ can be satisfied either by $(4sin(x) - 1) = 0$ or $cos(x) = 0$. This will yield the x-coordinates $x'_0$ where a local minimum or maximum is present.

The final result can be collected into a single expression: $x'_0 \in \{\pi(2n + \frac{1}{12}), \pi(2n + \frac{6}{12}), \pi(2n + \frac{11}{12}), \pi(2n + \frac{18}{12})\}$.

Getting the intervals

As always, the increasing-decreasing intervals can be found by evaluating the sign of $f'(x)$ at any position $x$ between two local minima/maxima. In this case, $n$ can be set to $n=0$ for simplicity of the numerical evaluations. Note that the last range to be evaluated is between the last $x'_0$ value, $\frac{18 \pi}{12}$, and the first one, $\frac{1 \pi}{12}$, because the function is periodic and repeats after $\frac{24 \pi}{12}$. an extra $+2$ is added to the expression to account for this. $$\begin{aligned} f'(x) > 0, && x &\in (\pi(2n + \frac{1}{12}), \pi(2n + \frac{6}{12})) && (+) \\ f'(x) < 0, && x &\in (\pi(2n + \frac{6}{12}), \pi(2n + \frac{11}{12})) && (-) \\ f'(x) > 0, && x &\in (\pi(2n + \frac{11}{12}), \pi(2n + \frac{18}{12})) && (+) \\ f'(x) < 0, && x &\in (\pi(2n + \frac{18}{12}), \pi(2n + 2 + \frac{1}{12})) && (-) \\ \end{aligned}$$

Concave-Convex Intervals

Solving the derivative

Now, the second derivative must be computed. $$\begin{aligned} f''(x) &= (4cos(x))(cos(x)) + (4sin(x) - 1)(-sin(x)) \\ &= 4(cos^2(x) - sin^2(x)) + sin(x) \\ &= 4(1 - sin^2(x) - sin^2(x)) + sin(x) \\ &= -8sin^2(x) + sin(x) + 4 = 0 \Rightarrow \text{ use quadratic formula} \\ \end{aligned}$$ This quadratic expression isn't suitable for factorizing, so the quadratic formula should be used instead. Consider a variable $g=sin(x)$ and apply thr formula to $-8g^2 + g + 4$. According to it, $-8g^2 + g + 4 = 0$ is satisfied when $g \in \{\frac{1-\sqrt{129}}{16}, \frac{1+\sqrt{129}}{16}\}$. This can be used to found the values for $x''_0$ (i.e. values of $x$ that satisfy $f''(x)=0$).

The final result can be collected into a single expression: $x''_0 \in \{\pi(2n-\frac{8}{36}), \pi(2n+\frac{10}{36}), \pi(2n+\frac{26}{36}), \pi(2n+\frac{44}{36})\}$.

Getting the intervals

Similar to the increasing-decreasing intervals, the concave-convex intervals are found by observing the sign of $f''(x)$ at any position $x$ between a pair of consecutive $x''_0$ values. The same considerations about periodicity as taken as before. $$\begin{aligned} f''(x) > 0, && x &\in (\pi(2n-\frac{8}{36}), \pi(2n+\frac{10}{36})) && (\cup) \\ f''(x) < 0, && x &\in (\pi(2n+\frac{10}{36}), \pi(2n+\frac{26}{36})) && (\cap) \\ f''(x) > 0, && x &\in (\pi(2n+\frac{26}{36}), \pi(2n+\frac{44}{36})) && (\cup) \\ f''(x) < 0, && x &\in (\pi(2n+\frac{44}{36}), \pi(2n + 2 -\frac{8}{36})) && (\cap) \\ \end{aligned}$$

Maximum-Minimum Points

The x-coordinates at which maximum-minimum points are present were previously found by studying the first derivative (i.e. they correspond to $x'_0$ that satisfy $f'(x'_0) = 0$). To know whether they are minima or maxima, the $x'_0$ values should be plugged into $f''(x)$. The output's sign will determine if they correspond to maxima or minima. Again, consider $n=0$ for simplicity. $$\begin{aligned} f''(\frac{\pi}{12}) &> 0 \Rightarrow min \\ f''(\frac{6\pi}{12}) &< 0 \Rightarrow max \\ f''(\frac{11\pi}{12}) &> 0 \Rightarrow min \\ f''(\frac{18\pi}{12}) &< 0 \Rightarrow max \\ \end{aligned}$$

Inflection Points

The inflection points are in the values of $x$ where $f''(x)=0$. That is, they're the values $x''_0$ that were found previously. $$\begin{aligned} x''_0 &\approx \pi(2n-\frac{8}{36}) \\ x''_0 &\approx \pi(2n+\frac{10}{36}) \\ x''_0 &\approx \pi(2n+\frac{26}{36}) \\ x''_0 &\approx \pi(2n+\frac{44}{36}) \\ \end{aligned}$$

Plot

All the information gathered before can be used to sketch the plot. This is where it turns useful to have grouped the relevant x-coordinates under a common denominator (e.g. $x_0 \in \{(2n-\frac{1}{6})\pi, (2n+\frac{3}{6})\pi, (2n+\frac{7}{6})\pi\}$); it makes it easier to place the points in their correct locations.

figures/td4-1g.png

Problems

Exercise 2

A person's blood glucose level after a meal varies according to the function (...) and $A > 0$ is constant.
$$ g(t) = A(1 + e^{-3t} - e^{-5t}) $$
What is the initial blood glucose level?
$$ g(0) = A(1 + e^0 - e^0) = A $$
What is the limit of the blood glucose as $t \to \infty$?
$$\begin{aligned} \lim_{t \to +\infty} & A(1 + e^{-3t} - e^{-5t}) \\ = & A (1 + e^{-\infty} - e^{-\infty}) \\ = & A (1 + 0 - 0) = A \\ \end{aligned}$$
What is the maximum blood glucose level, and at what time is it reached?
$$\begin{aligned} g'(t) &= A(-3e^{-3t} + 5e^{-5t}) = 0 \\ 5e^{-5t} &= 3e^{-3t} \\ 5 &= 3e^{2t} \\ e^{2t} &= \frac{5}{3} \\ 2t &= ln(\frac{5}{3}) \\ \therefore t^* &= \frac{1}{2} ln(\frac{5}{3}) \\ &= ln(\sqrt{\frac{5}{3}}) \approx 0.26 \\ \end{aligned}$$ $$\begin{aligned} g^* = g(t*) &= A(1 + e^{-3ln(\sqrt{\frac{5}{3}})} -e^{-5ln(\sqrt{\frac{5}{3}})})\\ &= A(1 + \frac{5}{3}^\frac{-3}{2} - \frac{5}{3}^\frac{-5}{2}) \\ &\approx 1.19 A \end{aligned}$$
Plot the curve of $g(t)$ for $t \in [0, \infty)$.
figures/td4-2.png

Exercise 3

Two bacterial colonies grow in the same Petri dish and share the same food supply. The first colony grows according to the law (...) The second colony grows according to the law (...) The initial number of bacteria in each colony is 6 (in units of thousands of cells). Time is measured in days. At time $t = 4$ days, the food supply is removed, and the colonies begin to die.
$$\begin{aligned} b_1(t) &= -t^3 + 5t^2 - 3t + A_0 \\ b_2(t) &= 3t + A_0 \\ b_1(0) &= b_2(0) = 6 \\ t &\in [0,4] \\ \end{aligned}$$
Show, using the initial conditions, that $A_0 = 6$.
$$\begin{aligned} b_1(0) &= 6 \\ -(0)^3 + 5(0)^2 - 3(0) + A_0 &= 6 \\ A_0 &= 6 \\ && \\ b_2(0) &= 6 \\ 3(0) + A_0 &= 6 \\ A_0 &= 6 \\ \end{aligned}$$
Calculate the derivatives of $b_1$ and $b_2$. At time $t = 0$, which population grows the fastest?
$$\begin{aligned} b_1'(t) &= -3t^2 + 10t - 3 \\ b_2'(t) &= 3 \\ b_1'(0) = -3 &< b_2'(0) = 3 \\ \end{aligned}$$ $$\text{In other words, }b_2\text{ grows faster than }b_1\text{ at }t_0$$
During the phase when food is present, determine the maximum and minimum values of each population. At what times are these values reached?
$$\begin{aligned} b_1'(t) &= -3t^2 + 10t - 3 = 0 \\ &= (3t-1)(t-3) = 0 \\ t'_0 &\in \{\frac{1}{3}, 3 \} \\ && \\ b_1''(t) &= -6t + 10 \\ b_1''(\frac{1}{3}) &= 8 > 0 \Rightarrow \text{min} \\ b_1''(3) &= -8 < 0 \Rightarrow \text{max} \\ && \\ b_1(\frac{1}{3}) &= -(\frac{1}{3})^3 + 5(\frac{1}{3})^2 - 3(\frac{1}{3}) + 6 \\ &=-\frac{1}{27}+\frac{5}{9}+5 = \frac{149}{27} \approx 5.52 \\ b_1(3) &= -(3)^3 + 5(3)^2 - 3(3) + 6 \\ &= -27 + 45 - 9 + 6 = 15 \\ && \\ b_2'(t) &= 3 \neq 0 \therefore \text{ no min/max under this criterion } \\ \end{aligned}$$ In other words, $b_1$ reaches a minimum at $t = \frac{1}{3}$ with a population of $\frac{149}{27} \approx 5.52$. It then reaches a maximum at $t = 3$ with a population of $15$. On the other hand, $b_2$ grows linearly, so it doesn't have a point where the derivative changes sign and therefore has neither minima nor maxima using this criterion. However, taking into acount this constant linear growth and that the domain is $t \in [0,4]$, it can be easily seen that the values $b_2(0) = 6$ and $b_2(4) = 18$ correspond to the actual minimum and maximum respectively for this function.