# Finding maximum of the function:

1. Jun 15, 2013

### yungman

I need to find the maximum $\theta$ value with given constant "a" of this function.

$$f(\theta)=\frac{\cos(a\cos\theta)-\cos a}{\sin\theta}$$

So I take the derivative of the function:

$$\frac{d f(\theta)}{d\theta}=\frac d {d\theta}\left(\frac{\cos(a\cos\theta)}{\sin\theta}\right)-\frac d {d\theta}\left(\frac{\cos a}{\sin\theta}\right)$$

$$\Rightarrow\;\frac{d f(\theta)}{d\theta}=\frac{a\sin^2\theta \sin(a\cos \theta)-\cos\theta\cos(a\cos\theta)}{\sin^2\theta}+\frac{\cos a(\cos\theta)}{\sin^2 \theta}$$
To find max:
$$\frac{d f(\theta)}{d\theta}= a\sin(a\cos\theta)-\frac{\cos\theta}{\sin^2\theta}[\cos(a\cos\theta)-\cos a]=0$$
Which is not simpler or more obvious than the original equation.

Obviously $\theta=\frac {\pi}{2}$ will give
$$\frac{d f(\theta)}{d\theta}= a\sin(a\cos\theta)-\frac{\cos\theta}{\sin^2\theta}[\cos(a\cos\theta)-\cos a]=0$$
as $cos\frac {\pi}{2}=0$ and both zero

The other possibility is
$$a\sin(a\cos\theta)=\frac{\cos\theta}{\sin^2\theta}[\cos(a\cos\theta)-\cos a]$$
Which is still hard to find the value of the $\theta$. Please help.

Thanks

Last edited: Jun 16, 2013
2. Jun 15, 2013

### NasuSama

Hello.

You decomposed into two expressions and attempted to apply quotient rule, but the derivative is not right. Try working out the derivative of the first fractional expression step by step. What do you know about the derivative of the function in the denominator and the one in the numerator?

And also, you can't apply quotient rule for the second expression. Treat $\cos(a)$ as the constant and rewrite the whole expression in terms of $\csc$. Then, work out the derivative.

Last edited: Jun 15, 2013
3. Jun 15, 2013

### QED Andrew

I believe it is likely that he meant to write $\dfrac{\cos(a)\cos(\theta)}{\sin^2(\theta)}$ instead of $\dfrac{\cos(a\cos(\theta))}{\sin^2(\theta)}$. I would prefer one application of the quotient rule to two applications of the quotient rule; however, the derivative he posted is correct and, barring his typo, the method by which he arrived at is valid.

At the time, I do not have any suggestions for making progress on the problem. It is not obvious how to solve $\dfrac{df}{d\theta} = 0$ for $\theta$.

4. Jun 15, 2013

### yungman

No, my original post is correct.

5. Jun 15, 2013

### yungman

I triple checked, I use $d(\frac u v) =\frac {vdu-udv}{v^2}$. It is straight forward.

$$u=\cos(a\cos\theta),\;\hbox { and }\;v=\sin\theta$$

$$\frac d {d\theta}\left(\frac{\cos(a\cos\theta)}{\sin\theta}\right)=\frac {\sin\theta[-\sin(a\cos\theta)](-a\sin\theta)-\cos \theta\cos(a\cos\theta)}{\sin^2\theta}$$

$$\Rightarrow\;\frac{d f(\theta)}{d\theta}=\frac{a\sin^2\theta \sin(a\cos \theta)-\cos\theta\cos(a\cos\theta)}{\sin^2\theta}+\frac{\cos(a\cos\theta)}{\sin^2 \theta}$$

I don't see anything wrong with my work.

6. Jun 15, 2013

### QED Andrew

In that case, your original post is not correct, namely the second term in the penultimate step of your work. The quotient rule can be applied to $\dfrac{\cos(a)}{\sin(\theta)}$ like so

$$\dfrac{d}{d\theta}[\dfrac{\cos(a)}{\sin(\theta)}] = \dfrac{\dfrac{d}{d\theta}[\cos(a)]\sin(\theta) - \cos(a)\dfrac{d}{d\theta}[\sin(\theta)]}{\sin^2(\theta)} = \dfrac{0 \cdot \sin(\theta) - \cos(a)\cos(\theta)}{\sin^2(\theta)} = -\dfrac{\cos(a)\cos(\theta)}{\sin^2(\theta)}$$

However, your final derivative manages to be correct, which I suppose is what matters.

Last edited: Jun 15, 2013
7. Jun 15, 2013

### yungman

You are right, I look at the more difficult part and miss the "(". I correct it already. I was typing from my notes and just a typo.

8. Jun 15, 2013

### Ray Vickson

This is incorrect:
$$\frac{d}{d \theta} \frac{\cos(a)}{\sin(\theta)} = \cos(a) \frac{d}{d \theta} \frac{1}{\sin(\theta)} = \cos(a) \frac{-1}{\sin^2(\theta)} \frac{d \sin(\theta)}{d \theta} = -\frac{\cos(a) \cos(\theta)}{\sin^2(\theta)}.$$
Remember: $d \sin(\theta)/d \theta = +\cos(\theta).$

9. Jun 15, 2013

### yungman

The original equation in post #1 has a minus sign. That's the reason it's +ve. Yes, the term itself is -ve. We are just talking about a typo only.

10. Jun 15, 2013

### Ray Vickson

No. What you WROTE is incorrect; it did not have the claimed minus sign. It is important to be accurate in what you write.

11. Jun 15, 2013

### NasuSama

Remember that $\cos(a)$ is the constant. Then, you can't use quotient rule. The first fractional expression is right. You should rewrite that fractional expression using cosecant. You should get $\cos(a)\csc(\theta)$

Now, differentiate $\csc(\theta)$ and you are done.

12. Jun 15, 2013

### QED Andrew

I corrected the erroneous sign. Thank you for bringing it to our attention.

On the contrary, the quotient rule is applicable. $\cos(a)$ is a constant function whose derivative is $0$. See my previous post for the details. The final derivative in yungman's original post is correct. Although I would agree with you on the inefficiency of decomposing the initial fraction and then twice applying the quotient rule as opposed to an immediate application of the quotient rule, I don't see the point in concerning ourselves with alternative approaches to his intermediate work if his approach is valid and the final result he obtains is correct.

13. Jun 16, 2013

### yungman

I updated the original post in why I cannot find the maximum value.

Last edited: Jun 16, 2013
14. Jun 16, 2013

### yungman

The quotient rule work even the numerator is a constant, no doubt about it. Whether I decompose or not, the result is the same. This is really not the point. My point is this approach is going nowhere in finding the maximum as the equation after differentiation is even harder to equate to zero. There must be other approach that I don't know of.

Thanks

Last edited: Jun 16, 2013
15. Jun 16, 2013

### Ray Vickson

If you substitute a few numerical values for 'a' and then plot your function in each case, it will soon become obvious what the solution must be; then it becomes easy to give an actual proof.

16. Jun 16, 2013

### yungman

I guess that's the reason the book did not derive the general equation of $\theta$ for maximum value. This is part of the equation of antenna where a is related to the length of the antenna. We always given the length of the antenna to get the specific value of a.

So plotting the graph is the only way here?

Thanks

17. Jun 16, 2013

### Ray Vickson

No, that is NOT what I said. I said that plotting a few values would soon make the solution obvious, and at that point it would be easy to prove. In other words, after you see what is happening you can throw away the plots because you will not need them anymore.

Why waste time asking? Just doing it would be more profitable.