I am trying to solve the following nontrivial equation:
fun[z_] := (Log[Gamma[n]] + n Log[Gamma[z + 1]] + z n Log[n] - Log[Gamma[n (z + 1)]])/n
fun[z] /. n -> 8
m = Table[i, {i, -1, 1, 0.1}]
sols = Table[FindRoot[fun'[z] + 0.5 == m[[i]], {z, 1}], {i, Length[m]}]
sols2 = Table[FindRoot[fun'[z] + 0.5 == m[[i]], {z, sols[[j]]}], {i, Length[m]},
{j, Length[sols]}]
Basically, I get roots from the equation that are stored in sols. However, I also need all values from sols as starting values for the next iteration that will be executed in sols2. However, this doesn't work and produce the following errors:
{{FindRoot[\!\(\*SuperscriptBox["fun", "\[Prime]",MultilineFunction->None]\)[z] +0.5 == m[[i]], {z, sols[[j]]}],
FindRoot[\!\(\*SuperscriptBox["fun", "\[Prime]",MultilineFunction->None]\)[z] + 0.5 == m[[i]], {z, sols[[j]]}],
FindRoot[\!\(\*SuperscriptBox["fun", "\[Prime]", MultilineFunction->None]\)[z] + 0.5 == m[[i]], {z, sols[[j]]}],
....
Any suggestion on how to fix this?


LogGamma[]built in? – J. M.♦ May 16 '12 at 0:25