# Finding minimum of trigonometric function

Let $$v=\sqrt{a^2\cos^2(x)+b^2\sin^2(x)}+\sqrt{b^2\cos^2(x)+a^2\sin^2(x)}$$

Then find difference between maximum and minimum of $v^2$.

I understand both of them are distance of a point on ellipse from origin, but how do we find maximum and minimum?

I tried guessing, and got maximum $v$ when $x=45^{o}$ and minimum when $x=0$, but how do we justify this?

• Hint $cos(x+\pi /2)=sin(x)$ – user121049 May 3 '17 at 6:58
• Aha that was useful! – samjoe May 3 '17 at 13:49

There is no need to do a lot of calculus. The ellipses are symmetric with respect to axes of symmetry which fact should be exploited.

It is periodic function, period = $2 \pi$. Maximum inter-distance at $\theta= n \pi/2$ between ends of major/minor axes as shown and minimum distance $=0$ at $\theta= (2 m-1) \pi/4$ ellipse intersections.

Imho, when you see history of calculus... it came out of geometry and not really so much the other way round .. symbols never created geometry. So the above is adequate proof for your question.

EDIT1:

For example, if we had 4th or 6th order ellipses instead.. we satisfy same conditions of symmetry about the coordinate axes ..and consequently obtain the very same locations of $\theta$ extrema.

• Yes I did exactly in this way! But I wanted a mathematical one, but Thanks a lot! – samjoe May 3 '17 at 13:48
• @samjoe - this is a mathematical solution. It is no less rigorous than analytic solutions. – Paul Sinclair May 3 '17 at 14:09
• I guess I understand this, I didn't read the reasoning! Nice solution! – samjoe May 3 '17 at 15:01
• @PaulSinclair Thanks for the comment. – Narasimham May 3 '17 at 15:10

Let $$p=\sqrt{a^2\cos^2(x)+b^2\sin^2(x)},q=\sqrt{b^2\cos^2(x)+a^2\sin^2(x)}$$

Now $p^2+q^2=a^2+b^2$

and $$2(p^2+q^2)-(p+q)^2=(p-q)^2\ge0\iff(p+q)^2\le2(p^2+q^2)=?$$

We can restrict to $x\in[0,\pi/2]$, because of symmetries.

The maximum and minimum of $v$ are attained at the same values as the maximum and minimum of $v^2$: $$v^2=a^2+b^2+ 2\sqrt{(a^2\cos^2(x)+b^2\sin^2(x))(b^2\cos^2(x)+a^2\sin^2(x))}$$ We can also remove $a^2+b^2$, then the factor $2$ and square again, so we reduce to finding the maximum and minimum of $$f(x)=(a^2\cos^2(x)+b^2\sin^2(x))(b^2\cos^2(x)+a^2\sin^2(x))$$ If we set $t=\cos^2x$, we want to look at $$g(t)=((a^2-b^2)t+b^2)((b^2-a^2)t+a^2)$$ subject to $0\le t\le 1$.

If $a^2=b^2$, the function is constant, so it's not restrictive to assume $a^2\ne b^2$. The (global) function $g$ assumes its maximum at the middle point between its zeros: $$\frac{1}{2}\left(\frac{b^2}{b^2-a^2}+\frac{a^2}{a^2-b^2}\right)=\frac{1}{2}$$ which is in $[0,1]$ so it's our required maximum.

The minimum is either at $0$ or $1$ (the graph of $g$ is a parabola): since $g(0)=a^2b^2=g(1)$, we can choose either one.

Thus we have a maximum for $t=1/2$, which corresponds to $x=\pi/4$, and a minimum at $x=0$ (or $x=\pi/2$).

We have $$v(\pi/4)=2\sqrt{\frac{1}{2}(a^2+b^2)}$$ and $$v(0)=v(\pi/2)=|a|+|b|$$

By C-S we obtain: $$v=$$ $$=\sqrt{a^2\cos^2x+b^2\sin^2x+b^2\cos^2x+a^2\sin^2x+2\sqrt{(a^2\cos^2x+b^2\sin^2x)(b^2\cos^2x+a^2\sin^2x)}}=$$ $$=\sqrt{a^2+b^2+2\sqrt{(a^2\cos^2x+b^2\sin^2x)(b^2\cos^2x+a^2\sin^2x)}}\geq$$ $$\geq\sqrt{a^2+b^2+2|ab|(\cos^2x+\sin^2x)}=|a|+|b|.$$ $$v\leq\sqrt{2(a^2\cos^2x+b^2\sin^2x+b^2\cos^2x+a^2\sin^2x)}=\sqrt{2(a^2+b^2)}.$$

• What is C-S? Thank you! – samjoe May 3 '17 at 13:50
• @samjoe It's Cauchy-Schwarz: $(a_1^2+a_2^2+...+a_n^2)(b_1^2+b_2^2+...+b_n^2)\geq(a_1b_1+a_2b_2+...+a_nb_n)^2$. – Michael Rozenberg May 3 '17 at 13:52

Set $\sin^2(x) = 1 - \cos^2(x) = y^2$ Then you have $$v=\sqrt{a^2(1-y^2)+b^2 y^2}+\sqrt{b^2 (1-y^2)+a^2 y^2}$$ One extremum is obtained (differentiate w.r.t. y) at $$\sqrt{a^2(1-y^2)+b^2 y^2}= \sqrt{b^2 (1-y^2)+a^2 y^2}$$ or $$y^2 = 1/2$$

The other extremum is obtained at $y=0$.

So the difference of $v^2$ between maximum and minimum is $$2(a^2 + b^2) - (a+b)^2 = (a-b)^2$$

Let $v=\sqrt{a^2\cos^2(x)+b^2\sin^2(x)}+\sqrt{b^2\cos^2(x)+a^2\sin^2(x)}$

$v^2=a^2+b^2+2\sqrt{\left(a^2\cos^2(x)+b^2\sin^2(x)\right)\left(b^2\cos^2(x)+a^2\sin^2(x)\right)}$

$v^2=a^2+b^2+2\sqrt{a^2b^2\left(\cos^4(x)+\sin^4(x)\right)+\left(a^4+b^4\right)\cos^2(x)\sin^2(x)}$

$v^2=a^2+b^2+\sqrt{4a^2b^2\left(1-2\sin^2(x)\cos^2(x)\right)+\left(a^4+b^4\right)\sin^2(2x)}$

$v^2=a^2+b^2+\sqrt{4a^2b^2-2a^2b^2\sin^2(2x)+\left(a^4+b^4\right)\sin^2(2x)}$

$v^2=|a|^2+|b|^2+\sqrt{4a^2b^2+\left(a^2-b^2\right)^2\sin^2(2x)}$

To find minimumvalue of $v^2$

put $\sin^2(2x)=0$

to obtain $v^2=\left(|a|+|b|\right)^2$. So

$v_{min}=|a|+|b|$

And to obtain maximum value of $v^2$ put $\sin^2(2x)=1$

$v_{max}=\sqrt{2(a^2+b^2)}$