Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Numerically integrating the Planck distribution

  1. Apr 10, 2008 #1
    I'm working on a project that requires me to numerically integrate the Planck spectral distribution. The object is to find the median wavelength, with exactly 50% of the radiance on either side. I'm using a standard composite Simpson rule method and I get good convergence with temps around 5000K. For temps at and above 7000K, I can't get convergence. Is there a better scheme to use for this application?
  2. jcsd
  3. Apr 10, 2008 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    How familiar are you with issue of numeric stability? Have you analyzed the error term for Simpson's rule?
  4. Apr 10, 2008 #3
    Rudimentary. No.
  5. Apr 11, 2008 #4


    User Avatar
    Science Advisor
    Gold Member

    Sometimes the simplest methods are the best when you are trying to solve numerical problems. When I am integrating something that I suspect might "misbehave" I always use methods based on polynomials of order 1; e.g. the trapezoidal rule with very small intervals.
    This is very inefficient but it always works; and unless you need to integrate thousands of equations you will rarely notice the difference on a modern computer.

    Of course you can always try to use e.g. the composite Simpson's rule; it should be better than the "plain" Simpson's rule for your problem.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook