
Find maximum
I would like to find the $\displaystyle n$ that maximizes this discrete function
$\displaystyle d(n) = \frac{R^{n+1}}{\sin(\theta)}\left[R\sin(\theta(n+1))  \sin(\theta(n+2))\right]$
where n is 0,1,2,....
$\displaystyle 0<R<1$ and $\displaystyle 0<\theta < \pi $
Is that even possible?

Re: Find maximum
Hey niaren.
Hint: Try treating n as a continuous variable and using calculus to get the maximum points and look at answers that are integer values around those points.
With regards to the constraints on R and theta, consider using multivariable optimization with those constraints.
If you get a small number of turning points, then it will be easy to find the values of N that maximizes the function.

Re: Find maximum
I will write $\displaystyle t$ instead of $\displaystyle n$, just to make clear that $\displaystyle t$ is continuous.
$\displaystyle d'(t) = R^{t+1}\log(R) \left[R\sin(\theta(t+1)) + \sin(\theta(t+2))\right] + R^{t+1}\left[R\cos(\theta(t+1))\theta + \cos(\theta(t+2))\theta\right] \\ = R^{t+1}\left[\log(R) \left(R\sin(\theta(t+1)) + \sin(\theta(t+2))\right) +\left(R\cos(\theta(t+1))\theta + \cos(\theta(t+2))\theta\right)\right]$
Now setting equal to zero gives
$\displaystyle 0 = R^{t+1}\left[\log(R) \left(R\sin(\theta(t+1)) + \sin(\theta(t+2))\right) +\left(R\cos(\theta(t+1))\theta + \cos(\theta(t+2))\theta\right)\right] \\ 0 = \log(R) \left(R\sin(\theta(t+1)) + \sin(\theta(t+2))\right) +\left(R\cos(\theta(t+1))\theta + \cos(\theta(t+2))\theta\right) \\ 0 = \log(R)R\sin(\theta(t+1)) + \log(R)\sin(\theta(t+2)) + R\cos(\theta(t+1))\theta + \cos(\theta(t+2))\theta$
Is it possible to isolate t? It seems hard but my PC says it is possible, it also gives a result but I haven't found out yet how to do it manually. Any hints?

Re: Find maximum
I'm not sure but you might want to look at the various trig identities to see if you can simply the RHS in terms of a single trig representation.

Re: Find maximum
Thanks chiro.
I think I've got it now. I worked backwards and figured out the trick. I found the trig identity to use and the underlying idea. The idea is to take the trig terms with argument $\displaystyle \theta(t+2)$ and factor them out in terms of $\displaystyle \theta(t+1)$. Then the terms involving $\displaystyle \theta(t+1)$ can be boiled down to a tangent. The remaining terms does not depend on t. Very nice (Happy).
Actually, this max value I have been working on finding an expression for is a special case of a more general problem which I am now more prepared to tackle (a max overshoot value in some digital filters).
Thanks for your feedback.
Although not relevant anymore, I though I just mention that the expression for the derivative I posted is not correct. It has some sign issues. I thought I just mention it. Anyway thanks.