Numerically integrating the Planck distribution

AI Thread Summary
The discussion centers on the challenges of numerically integrating the Planck spectral distribution to find the median wavelength, particularly at higher temperatures (7000K and above) where convergence issues arise using the composite Simpson's rule. Suggestions for improving numerical integration include considering simpler methods, such as the trapezoidal rule with small intervals, which, while inefficient, can provide reliable results for problematic functions. The composite Simpson's rule is also recommended as a potentially better alternative to the plain version for this specific application. The conversation highlights the importance of numerical stability and error analysis in choosing the appropriate integration method.
heafnerj
Messages
48
Reaction score
0
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?
 
Technology news on Phys.org
How familiar are you with issue of numeric stability? Have you analyzed the error term for Simpson's rule?
 
Hurkyl said:
How familiar are you with issue of numeric stability? Have you analyzed the error term for Simpson's rule?

Rudimentary. No.
 
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.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top