First of all, I know there is a Mathematica group in beta, but I don't think the problem of the following is directly a Mathematica issue.

I am trying to calculate the change of the refractive index dnF from the change of absorption daF. Note that l,li,ln is in nm.

The form of the resulting curve is fine (which is a sign for me that there is no Problem with e.g. PrecionGoals), but the order of magnitude is lower by 13 orders of magnitude than the expected one. The MathLab script von Lucarini et. al. "KK Relation in Optical Materials Research" gives the correct values. The formula used here is from the same book and matches the one in German Wikipedia.

Does anyone see my mistake?

c = 300000000;

daF[l_] = 500 * 0.28 Exp[-((l - 500)/90)^2];

dnFpoints = Table[
        c/Pi NIntegrate[
            daF[li] / ((2 Pi c 10^9 /li)^2 - (2 Pi c 10^9 / ln)^2),
            {li, 200, 800},
            Method -> {"PrincipalValue"},
            Exclusions -> ((2 Pi c 10^9 /li)^2 - (2 Pi c 10^9 / ln)^2) == 0
    {ln, 300, 600}

ListPlot[dnFpoints, Filling -> Axis]
  • 1
    $\begingroup$ Why don't you write the formula explicitly and explain what are the input data? I did not spend much time on this, but right now I don't understand why you divide, rather than multiply, by 10^9, if l,li,ln is in nm. $\endgroup$
    – akhmeteli
    Feb 15, 2012 at 15:05
  • $\begingroup$ Sorry, my remark on dividing by 10^9 was silly, please disregard it. $\endgroup$
    – akhmeteli
    Feb 15, 2012 at 16:09
  • $\begingroup$ The formula is the last one on this German Wikipedia article. The English article also explains the backgrounds. $\endgroup$
    – mcandril
    Feb 16, 2012 at 12:54
  • $\begingroup$ Cross-posted from mathematica.stackexchange.com/q/1750 $\endgroup$
    – Qmechanic
    Apr 15, 2013 at 0:42
  • $\begingroup$ No, different problems with the same code. Not talking about the necessity to dig that up more than one year later. $\endgroup$
    – mcandril
    Apr 16, 2013 at 10:16

1 Answer 1


It looks like you integrate by $d\lambda$, whereas, according to the formula, you should integrate by $d\Omega$ - this may well give you 13 orders of magnitude.

  • $\begingroup$ I am integrating by $\text{d}\lambda$, but also, my denominator is ((2 Pi c 10^9 /li)^2 - (2 Pi c 10^9 / ln)^2). - But I forgot to do the substitution for $\text{d}\Omega$. Dammit, awkward. $\endgroup$
    – mcandril
    Feb 20, 2012 at 10:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.