I was solving a question which required me to find the value of $\theta$ for which the expression $\frac{a}{\cos\theta}+\frac{b}{\sin\theta}$ has its minimum value. Given that, $a=3\sqrt3, b=1$.

Note: It was a fault from my end for not including the values of $a,b$ which were given in the question. I apologize for that.

Since this is a fairly trivial task, I proceeded by using AM-GM inequality which yields the following:

Using AM-GM inequality

$$\frac{a}{\cos\theta}+\frac{b}{\sin\theta} \ge 2\sqrt{\frac{ab}{\cos\theta\sin\theta}}\\ \implies \frac{a}{\cos\theta}+\frac{b}{\sin\theta} \ge 2\sqrt{\frac{2ab}{\sin2\theta}}$$ Since, we're minising the given expression, therefore $\sin2\theta$ should have maximum value, i.e. $\sin2\theta=1$. Therefore, $\theta=\dfrac{\pi}{4}$.

Using calculus

$$\text{Let }f(\theta)=a\sec\theta+b\csc\theta \\ \therefore f'(\theta)=a\sec\theta\tan\theta-b\csc\theta\cot\theta \\ \text{For mininma, }f(\theta)=0, \implies a\sec\theta\tan\theta=b\csc\theta\cot\theta \\ \text{or, }\tan^3\theta=\frac{b}{a}=\frac{1}{3\sqrt3} \\ \implies \theta=\frac{\pi}{6}$$ Why does solving this problem using derivatives yield $\theta=\dfrac{\pi}{6}$. Why is this happening? What should I look out for in the future while deciding whether to use AM-GM or calculus?

  • $\begingroup$ Please show your work solving using derivatives; doesn't $\theta$ depend on $a$ and $b$? $\endgroup$ Commented Apr 8, 2019 at 14:11
  • $\begingroup$ @J.W.Tanner Done! $\endgroup$ Commented Apr 8, 2019 at 14:28
  • $\begingroup$ Thanks for clarifying; you have the correct answer using calculus now $\endgroup$ Commented Apr 8, 2019 at 14:37
  • $\begingroup$ Simply, you cannot apply AM-GM inequality here. This applies to means. You need calculus for a correct answer. $\endgroup$
    – Jon
    Commented Apr 8, 2019 at 14:54

2 Answers 2


Let $y=a\sec t+b\csc t$

$\dfrac{dy}{dt}=a\sec t\tan t-b\csc t\cot t=\dfrac{a\sin^3t-b\cos^3t}{\cos^2t\sin^2t} $

For extreme values of $y,f'(t)=0$

$\implies\tan^3t=\dfrac ba\iff\dfrac a{\cos^3t}=\dfrac b{\sin^3t}=\pm\sqrt{a^{2/3}+b^{2/3}}$

How have you found $t=\dfrac\pi8?$

  • $\begingroup$ The values for a,b were provided in the question. I have now included them in the question. Sorry for not mentioning them beforehand. $\endgroup$ Commented Apr 8, 2019 at 14:29
  • $\begingroup$ @Utkarsh, So, put those values in $f'(t)$ $\endgroup$ Commented Apr 8, 2019 at 14:38
  • $\begingroup$ The answer comes $\frac{\pi}{6}$ which is different from the one given by AM-GM inequality. $\endgroup$ Commented Apr 8, 2019 at 14:40

Even if $f(\theta)\ge g(\theta)$ for all $\theta$, $f$ may attain its least possible value for some $\theta$ that doesn't minimize $g$. Consider for instance the inequality (which holds on the whole real line) $$\theta^2\ge \frac12\theta^2-\theta-1$$ The LHS is minimized for $\theta=0$, the RHS for $\theta=1$.

So it's not really a matter of choice of approach. It's a matter of basic logic.

  • $\begingroup$ Thinking about this problem also led me to this conclusion, but I still want to know when to rely upon either of the methods. That's also what my question aims at! $\endgroup$ Commented Apr 8, 2019 at 14:31
  • $\begingroup$ Do both and the one that works faster is the one you should have used first. $\endgroup$
    – user562983
    Commented Apr 8, 2019 at 14:32
  • $\begingroup$ This when you're young. When you're old, use the one that has worked faster most of the times and, if it doesn't work, cry like an old man. $\endgroup$
    – user562983
    Commented Apr 8, 2019 at 14:34
  • $\begingroup$ Sadly, I don't have that freedom. I'm preparing for an exam, hence time is limited. I'd like to save as much time as I can, hence even the thought of doing multiple methods for a single problem is out of the question. $\endgroup$ Commented Apr 8, 2019 at 14:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .