# Question #cf6e2

Apr 7, 2017

See below.

#### Explanation:

Calling $f \left(x\right) = \left(\frac{1}{2} + x\right) \left(\frac{1}{3} - x\right) = - {x}^{2} - \frac{x}{6} + \frac{1}{6}$ and

we know that the local minima/maxima are given at the stationary points or when

$\frac{d}{\mathrm{dx}} f \left(x\right) = 0$

but in our case we have

$f \left(g \left(x\right)\right)$ so the stationary points are when

$\frac{d}{\mathrm{dx}} f \left(g \left(x\right)\right) = - \frac{1}{6} \left(1 + 12 g \left(x\right)\right) g ' \left(x\right) = 0$

with $g \left(x\right) = \cos \left(x\right)$

so the stationary points are the solutions of

$\left\{\begin{matrix}1 + 12 g \left(x\right) = 1 + 12 \cos \left(x\right) = 0 \\ g ' \left(x\right) = - \sin \left(x\right) = 0\end{matrix}\right.$

and the stationary points are

${x}_{1} = - \text{arccos} \left(- \frac{1}{12}\right) + 2 k \pi$ and

${x}_{2} = k \pi$ for $k \in \mathbb{Z}$

The stationary points qualification is done using ${d}^{2} / \left({\mathrm{dx}}^{2}\right) f \left(g \left(x\right)\right)$

or

${d}^{2} / \left({\mathrm{dx}}^{2}\right) f \left(g \left(x\right)\right) = - 2 g ' {\left(x\right)}^{2} - \frac{1}{6} \left(1 + 12 g \left(x\right)\right) g ' ' \left(x\right)$

or

${d}^{2} / \left({\mathrm{dx}}^{2}\right) f \left(\cos \left(x\right)\right) = C o s \frac{x}{6} + 2 C o {s}^{2} \left(x\right) - 2 S {\in}^{2} \left(x\right)$

Regarding the stationary points the value of ${d}^{2} / \left({\mathrm{dx}}^{2}\right) f \left(\cos \left(x\right)\right)$qualifies the type of extremum. If ${d}^{2} / \left({\mathrm{dx}}^{2}\right) f \left(\cos \left(x\right)\right) > 0$ is a local minimum and if ${d}^{2} / \left({\mathrm{dx}}^{2}\right) f \left(\cos \left(x\right)\right) < 0$ is a local maximum.

so

${d}^{2} / \left({\mathrm{dx}}^{2}\right) f \left(\cos \left({x}_{1}\right)\right) = - \frac{143}{72}$ local maxima
${d}^{2} / \left({\mathrm{dx}}^{2}\right) f \left(\cos \left({x}_{2}\right)\right) = \frac{13}{6}$ local minima

Attached a plot showing this behavior.

so concluding, ${x}_{1}$ for the maxima and ${x}_{2}$ for the minima

NOTE. The same result for the maximum point would be obtained directly by making

$\frac{\mathrm{df}}{\mathrm{dx}} = - \frac{1}{6} - 2 x = 0 \to x = - \frac{1}{12}$ with the maximum value given by

$f \left(- \frac{1}{12}\right) = \frac{25}{144}$ and here

$\frac{{d}^{2} f}{{\mathrm{dx}}^{2}} \left(- \frac{1}{12}\right) = - 2$ qualifying a maximum.

Jun 14, 2017

Maximum value is $\frac{25}{144}$

#### Explanation:

Let:

$y = \left(\cos x + \frac{1}{2}\right) \left(\frac{1}{3} - \cos x\right)$
$\setminus \setminus = \frac{1}{3} \cos x - {\cos}^{2} x + \frac{1}{6} - \frac{1}{2} \cos x$
$\setminus \setminus = \frac{1}{6} - {\cos}^{2} x + - \frac{1}{6} \cos x$

This is a quadratic in $\cos x$ so let us complete the square

$y = - \left({\cos}^{2} x + \frac{1}{6} \cos x - \frac{1}{6}\right)$
$\setminus \setminus = - \left({\left(\cos x + \frac{1}{12}\right)}^{2} - {\left(\frac{1}{12}\right)}^{2} - \frac{1}{6}\right)$
$\setminus \setminus = - \left({\left(\cos x + \frac{1}{12}\right)}^{2} - \frac{25}{144}\right)$
$\setminus \setminus = \frac{25}{144} - {\left(\cos x + \frac{1}{12}\right)}^{2}$

Now ${\left(\cos x + \frac{1}{12}\right)}^{2} \ge 0 \forall x \in \mathbb{R}$, and so $y$ has a maximum when ${\left(\cos x + \frac{1}{12}\right)}^{2} = 0 \implies \cos x = - \frac{1}{12}$.

When this occurs, the maximum value of $y$ is achieved.

${y}_{\max} = \frac{25}{144} - 0 = \frac{25}{144}$