# Calculating the minima and maxima of equations involving the trig functions

This is the function given:

$$S(x) = \sin^2 x$$

First I calculate the first and second derivatives:

\begin{align} \frac{dS}{dx}\; & = 2\cos(x)\sin(x) \\ & = \sin(2x) \\ \frac{d^2S}{dx^2}\; & = 2\cos(2x) \end{align}

Then I find the roots of $S'$:

\begin{align} & 2\cos(x)\sin(x)\; = 0 \\ & \implies \cos(x)\sin(x) = 0 \\ & \therefore \text{For any}\sin \theta \text{ or} \cos \theta = 0, \text{ we have an extreme point} \end{align}

Now I know that $$\sin \theta = 0\; \forall P\dfrac{\pi}{2}\; \text{where} \dfrac{P}{2} \in I\; i.e\; \text{when }P\text{ is even}$$

and

$$\cos \theta = 0\; \forall P\dfrac{\pi}{2}\; \text{where}\dfrac{P}{2} \notin I\; i.e\; \text{when }P\text{ is odd}$$

At this point I think a little bit. I put the second derivative into a graphing calculator and saw that it is $\gt 0$ for a root of $\sin \theta$ and $\lt 0$ for a root of $\cos \theta$. But I'm not quite sure how exactly to interpret this or how to express it algebraically. I would appreciate some help on how to go forward with finding the minimums and maximums of the original funtion ($S(x)$).

• A great deal of machinery for something that can be answered in seconds. – André Nicolas Mar 21 '16 at 16:28
• Why do you need all this stuff? You know that $|\sin x|\le 1$, so it follows immediately that $0\le\sin^2x\le1$. Minimum is attained (inter alia) at $x=0$ and maximum (inter alia) at $x=\pi/2$. – almagest Mar 21 '16 at 16:29

$S'(x) = 0$ when $\displaystyle x = 0, \pm \frac{\pi}{2}, \pm \pi, \pm \frac{3\pi}{2}, \dots$

$S''(x) > 0$ when $x = 0, \pm \pi, \pm 2\pi, \pm 3\pi, \dots$

You can express that as $x = n\pi$, where $n \in \mathbb{Z}$ ($n$ is an integer).

$S''(x) < 0$ when $x = \pm \dfrac{\pi}{2}, \pm \dfrac{3\pi}{2}, \pm \dfrac{5\pi}{2}, \dots$

You can express that as $x = \dfrac{(2m+1)\pi}{2}$, where $m \in \mathbb{Z}$. This works because if $m$ is any integer, then $2m$ is necessarily even, therefore $2m+1$ is odd. This is a standard way of expressing arbitrary odd numbers.

EDIT: Based on your comments to this answer, it sounds like you want to be able to explain why those inequalities are true and not just generally express their solutions.

First note that $\cos(2x)$ is periodic with period $\pi$. This means that the value of $2\cos(2x)$ is the same if we add any integer multiple of $\pi$ to $x$ (not to $2x$). Written mathematically, we have $2\cos(2[x + k\pi]) = 2\cos(2x)$ for every integer $k$. Therefore it's enough for us to just consider the interval $[0,\pi)$ (or any half-open interval of length $\pi$ but let's just keep it simple).

We know that $S'(x) = 0$ when $\displaystyle x = 0, \pm \frac{\pi}{2}, \pm \pi, \pm \frac{3\pi}{2}, \dots$. Out of all these values, there are only two that reside in the interval $[0, \pi)$. They are $x = 0$ and $x = \dfrac{\pi}{2}$. So let's evaluate $2\cos(2x)$ at each of these values of $x$.

$x = 0 \Longrightarrow 2\cos(2 \cdot 0) = 2\cos(0) = 2 > 0$.

Because $\cos(2x)$ has period $\pi$, we know that $2\cos(2[0 + k\pi]) = 2\cos(2 \cdot 0) = 2 > 0$.

But also note that $2\cos(2[0 + k\pi]) = 2\cos(2k\pi)$.

Therefore, $2\cos(2k\pi) > 0$, where $k$ is any integer.

We conclude then that $S''(x) = 2\cos(2x) > 0$ when $x = k\pi$, where $k$ is any integer.

The line of reasoning for $S''(x) < 0$ is identical and I'll leave the details to you.

• So that's how to express it - but how do I prove it? Currently I've written down when $\sin \theta$ is $0$ and when $\cos \theta$ is $0$. Then $S''(0) = 1 \gt 0$, so $S(0)$ is a local minimum. But for the general cases - $S(n\pi)$ and $S((2m + 1)\dfrac{\pi}{2})$, I don't know how I would calculate that. – naiveai Mar 22 '16 at 7:13
• $S''(\dfrac{(2m + 1)\pi}{2}) = 2\cos(\dfrac{(4m + 2)\pi}{2})$ - but then I have to prove whether that's $\gt 0$ or $\lt 0$, which is what I'm having trouble with. – naiveai Mar 22 '16 at 7:20
• Use periodicity. There are two cases to check and I worked out the details for one of them. – tilper Mar 22 '16 at 13:46
• Ah! Yes, I understand. Thanks SO much! – naiveai Mar 22 '16 at 14:18
• No problem, glad to help! – tilper Mar 22 '16 at 14:18