Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the maximum value of the expression $1/(\sin^2 \theta + 3\sin\theta \cos\theta+ 5\cos^2 \theta$).

I tried reducing the expression to $1/(1 + 3\sin\theta$ $\cos\theta + 4\cos^2 \theta)$.

How do I proceed from here?

share|cite|improve this question
up vote 6 down vote accepted

Note that $$f(\theta)=\frac{1}{\sin^2(\theta)+3\sin(\theta)\cos(\theta)+5\cos^2(\theta)}=\frac{1}{1+3\sin(\theta)\cos(\theta)+4\cos^2(\theta)}$$ takes on its largest value precisely when $$g(\theta)=1+3\sin(\theta)\cos(\theta)+4\cos^2(\theta)$$ takes on its smallest value, and vica versa.

A local maximum or minimum of any continuous, differentiable function $h$ can only occur when $h'$ (the derivative of $h$) equals 0. So, to find possible $\theta$'s for which $$g(\theta)=1+3\sin(\theta)\cos(\theta)+4\cos^2(\theta)$$ takes on a maximum or minimum value, solve $$g'(\theta)=\frac{dg}{d\theta}=-3\sin^2(\theta)+3\cos^2(\theta)-8\sin(\theta)\cos(\theta)=0$$

You're not guaranteed that all of the $\theta$'s which satisfy this relation are maxima or minima (they could be inflection points), but you are guaranteed that the $\theta$'s which produce the maximum and minimum values of $g$ will be among the $\theta$'s for which $g'(\theta)=0$.

To find possible $\theta$'s for which $$f(\theta)=\frac{1}{1+3\sin(\theta)\cos(\theta)+4\cos^2(\theta)}$$ takes on a maximum or minimum value, solve $$f'(\theta)=\frac{df}{d\theta}=\frac{3\sin^2(\theta)-3\cos^2(\theta)+8\sin(\theta)\cos(\theta)}{\left(1+3\sin(\theta)\cos(\theta)+4\cos^2(\theta)\right)^2}=0$$ The denominator, which is $g(\theta)^2$, is never 0, so there's no problems there, and the only way the fraction is 0 will be if the numerator, which is $-g'(\theta)$, is 0.

share|cite|improve this answer
I thought about differentiating, but solving for θ doesn't look that straight forward. Also, I am interested only in the max value of the expression, rather than finding the value of θ first and then substituting it in the expression. (If I am using the differentiation technique, is it safe to rethink the problem as the min of the function in the denominator and then proceeding) – Ajay George Aug 22 '11 at 18:35
Here's a hint: solve for $2\theta$ using double angle formulas. The answer isn't a nice fraction of $\pi$, but it does give a very simple closed form. Also, I phrased my answer in terms of solving for either maxima or minima because your question initially had "maximum" in the title and "minimum" in the body. I'll also add a demonstration that we get the same answer if we do things directly with $f$. – Zev Chonoles Aug 22 '11 at 18:44
Got it, the answer is 2. Solving for 2θ gives tan2θ = 3/4 . From there sin and cos can be found and substituted back in the original equation. – Ajay George Aug 22 '11 at 19:01
Before you say that $f$ takes on its smallest value where $1/f$ takes on its largest value, shouldn't you explain why $f$ is always positive? – Michael Hardy Aug 23 '11 at 0:29
Well, you would find that $g$ is negative at one of its critical points if this were the case (since $g$ is clearly bounded). – ShawnD Aug 24 '11 at 1:41

There are as usual many approaches. We describe one that uses pure trigonometry (and in particular no calculus), in line with the tag on the question.

Trigonometry can be bypassed in favour of algebra, as we show in the second part of this answer. But it would not be a good idea to omit the trigonometric approach altogether, since in the process we describe an idea that is useful in Physics, Electrical Engineering, and elsewhere.

A solution via trigonometry: In order to have less messy expressions, we will mainly study $$\sin^2\theta+3\sin\theta\cos\theta+5\cos^2\theta.$$

It looks sensible enough to use $\sin^2\theta=1-\cos^2\theta$ to rewrite our expression as $$1+3\sin\theta\cos\theta+4\cos^2\theta.$$

Using the trigonometric identities $2\sin\theta\cos\theta=\sin 2\theta$ and $\cos 2\theta=2\cos^2\theta-1$, we can then rewrite our expression as $$3+\frac{3}{2}\sin 2\theta +2\cos 2\theta.$$

Next comes the idea which is useful elsewhere. We express $\frac{3}{2}\sin2\theta+2\cos 2\theta$ as $k \sin(2\theta+\alpha)$ for suitable $k$ and $\alpha$.

The idea is to use the identity $$\sin(2\theta +\alpha)=(\sin2\theta)(\cos\alpha)+(\cos2\theta)(\sin\alpha).$$

If our expression is to be equal to $k\sin(2\theta+\alpha)$, we need to have $(3/2)/k=\cos\alpha$ and $2/k=\sin\alpha$. This means that $k=\sqrt{(3/2)^2+2^2}$. It turns out that $k$ is the nice number $5/2$ (thank you, problem designer). So we are looking at $$3+\frac{5}{2}\left(\frac{3}{5}\sin 2\theta +\frac{4}{5}\cos 2\theta\right).$$

This is $$3+\frac{5}{2}\sin(2\theta+\alpha),$$ where $\alpha$ is the angle whose cosine is $3/5$ and whose sine is $4/5$. Note by the way that our expression is always positive, since $\sin(2\theta+\alpha)$ can never be less than $-1$.

The above expression is smallest when $\sin(2\theta+\alpha)=-1$. This is obviously achievable by letting $2\theta=3\pi/2-\alpha$. So the minimum value of our expression is $1/2$. The maximum value of the original function is therefore $2$. If we wanted the minimum value of the original function, that is also easily found.

Comment: The method that we used to get to the expression $k\sin(2\theta+\alpha)$ can be used to express $a\sin\phi +b\cos\phi$, where $a$ and $b$ are constants, as $k\sin(\phi + \delta)$, for suitable $k$ and $\delta$.

A solution via algebra: Let $x=\sin\theta$ and $y=\cos\theta$. We want to minimize $x^2+3xy+5y^2$ subject to the condition $x^2+y^2=1$.

To do this we examine the values of $k$ for which the curves $x^2+3xy+5y^2=k$ and $x^2+y^2=1$ kiss. (From the geometry we can see that at the minimum the two curves will be tangent, so have double point of intersection. That will also happen at the maximum.)

For the minimum, exactly one of $x$ and $y$ will be negative, it doesn't matter which. So let $x=\sqrt{1-y^2}$. Substitute for $x$ in $x^2+ 3xy+4y^2=k$. We obtain $4y^2-(k-1)=-3y\sqrt{1+y^2}$. Square both sides and simplify. We arrive at the equation $$25y^4-(8k+1)y^2 +(k-1)^2=0.$$ For $y^2$ to be a double root of this equation, the discriminant must be $0$. So we obtain the equation $(8k+1)^2=100(k-1)^2$, and thus $8k+1=\pm10(k-1)$. There is an extraneous root which gives us the maximum. The relevant $k$ is $1/2$. Thus the minimum value of $x^2+3xy+5y^2$ subject to $x^2+y^2=1$ is $1/2$, so the maximum value of the function in the post is $2$.

share|cite|improve this answer
This is a nice explanation Andre. One question though, if I can reduce the expression to asinϕ+bcosϕ , don't you think the question is solved?. Since the max and min values of that are +sqrt(a2+b2) and -sqrt(a2+b2) . – Ajay George Aug 23 '11 at 6:20
@Ajay George: That is indeed true, and also comes out of the procedure I described. My question would be: how do you prove the result you mentioned? – André Nicolas Aug 23 '11 at 6:39
through differentiation again I suppose. We can prove tan ϕ = a/b and from there its straight forward. Knowing this before hand can speed up the solving process. – Ajay George Aug 23 '11 at 13:03
@Ajay George: Let $c=\sqrt{a^2+b^2}$. Then our expression is $c((a/c)\sin\phi +(b/c)\cos\phi)$. Let $\delta$ be angle whose cos is $a/c$ and whose sine is $b/c$. Then our expression is equal to $c\sin(\phi+\delta)$. So its sine with a phase shift. Of course the calculus way works fine too. – André Nicolas Aug 23 '11 at 14:16

Another method is to rewrite $\sin^2 \theta + 3 \sin \theta \cos \theta + 5 \cos^2\theta$ as $$\frac{1 + (\sin\theta + 3\cos\theta)^2}{2}.$$ The minimum value of this expression is $\frac12$, so the maximum value of the original expression is 2.

share|cite|improve this answer

This is the same as minimizing the function $f(\theta)=\sin^2 \theta+3 \sin \theta \cos \theta+5\cos^2 \theta$ (subject to $f(\theta)>0$). We know such a minimum will occur only when $f'(\theta)=0$. We have \begin{align*} f'(\theta)&= 2 \sin \theta \cos \theta - 3 \sin^2 \theta +3 \cos^2 \theta-10 \sin \theta \cos \theta=-8 \sin \theta \cos \theta-3\sin^2 \theta + 3 \cos^2 \theta. \end{align*} Using trig identities, this is same as solving $3\cos 2\theta -4 \sin 2 \theta=0.$ The critical points occurs when $\tan 2 \theta= \frac{3}{4}$. At such a point $\sin 2 \theta=\frac{\pm 3}{5}$ and $\cos 2 \theta=\frac{\pm 4}{ 5}.$ As a result, $\sin \theta \cos \theta= \frac{\pm 3}{ 10}$ and $\cos^2 \theta -\sin^2 \theta= \frac{\pm 4}{5}$.

Now we have $f(\theta)=2\cos^2 \theta - 2\sin^2 \theta+3 + 3 \sin \theta \cos \theta.$ Substituting the values of $\cos \theta \sin \theta$ and $\cos^2 \theta- \sin^2 \theta$ at the critical points, we can find max/min values for $f$.

share|cite|improve this answer
made a small mistake in differentiation it would be −10sinθcosθ – Ajay George Aug 22 '11 at 19:04
yes, fixed that. probably other mistakes too though as I can't compute :) – ShawnD Aug 22 '11 at 19:20
It's the same as maximizing $f(\theta)$ provided you know that $f(\theta) > 0$ for all $\theta$. That's not the same as saying it's the same as maximizing $f(\theta)$ subject to a constraint that $f(\theta)>0$, since that would mean simply deciding to throw away any values of $\theta$ for which $f(\theta)\le0$, before showing that those don't exist. – Michael Hardy Aug 23 '11 at 0:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.