0

With previous help I was able to find the first derivative of an equation for a work project. Now I'm after the second and third derivative, for use in a program to find the maximum (Which I must do from scratch). The following is what I believe them to be. Would someone please check my answers.

$$ f(\theta)= -\ln \left(\frac{1}{T}\sum_{t=1}^{T} e^{r_t\theta}\right) $$ $$ f(\theta)= -\ln \left( \sum_{t=1}^{T} e^{r_t\theta} \right) + \ln(T) $$ $$ f'(\theta)=-\frac{\sum_{t=1}^{T} r_te^{r_t\theta}}{\sum_{t=1}^{T} e^{r_t\theta}} $$ $$ f'(\theta)=-\frac{h(\theta)}{g(\theta)} $$ $$ f''(\theta)=-\frac{g(\theta)h'(\theta)-h(\theta)g'(\theta)}{g'(\theta)^2} $$ $$ f''(\theta)=\frac{(\sum_{t=1}^{T} r_te^{r_t\theta})^2 - \sum_{t=1}^{T} e^{r_t\theta}\sum_{t=1}^{T} r_t^2e^{r_t\theta}}{(\sum_{t=1}^{T} e^{r_t\theta})^2} $$

Many thanks!

Look Left
  • 113
  • 5

1 Answers1

1

Yes, it's right, and holds if $T$ is not a function of $\theta$, and if it is a constant, $T$ is finite. See here.

  • Thank you very much! Now I can move onto checking the find_maxima(theta) program logic. – Look Left Jul 04 '14 at 02:08
  • I did make one typographical error that went unnoticed. The first derivative f'(), is actually not a derivative but f() in a different form. So f'''() is actually just f''() which as it turns out is all I needed. I've updated the question. – Look Left Jul 04 '14 at 04:40
  • @LookLeft I will edit my answer tomorrow, it's late now. –  Jul 04 '14 at 04:56