Here is my code.
CMB[a_?NumericQ, lambda_?NumericQ] :=
FindRoot[ns[i, lambda, a] - .96 == 0, {i, 15}]
END[a_?NumericQ, lambda_?NumericQ] :=
FindRoot[eps[i, lambda, a] - 1 == 0, {i, 1}]
Ne[lambda_?NumericQ, a_?NumericQ] =
NIntegrate[
V[i, lambda, a]/D[V[i, lambda, a], i], {i, Evaluate[END[a, lambda]],
Evaluate[CMB[a, lambda]]}]
I am trying to get Mathematica to first evaluate the integral bounds, and then evaluate the integral at those bounds. Is there any way to make it do that?
ns,eps, etc. – Mr.Wizard Jul 11 '16 at 15:20:=instead of=in your definition ofNe? How about using a scoping construct likeModulewhere you first compute the limits as local variables and then pass those to the integration? – Lukas Jul 11 '16 at 15:20