I have an improper integral that's discontinuous at 0. I need to evaluate from 0 to infinity. Also, the infinity should have units of length, because I'm integrating over the entire wavelength spectrum. How is this integral evaluated? I've attached a sample of my work, reduced to a simple form. I tried a limit and a few other things, with no success. Right now, I'm just truncating the improper ends of the integral domain, but there's got to be a more elegant way to calculate this integral.
I've used this forum before with great success. Like always, I appreciate your guy's time in helping me understand how to better use PTC products. Kindest regards,,
Solved! Go to Solution.
A couple of quick observations:
Can't use T=0 because a couple of places you divide by T
Lambda table is defined, but Lambda is not and it is not in the argument list for alpha.
>Lambda table is defined, but Lambda is not and it is not in the argument list for alpha.
Why would I have to define the dummy variable in an integration routine?
>Can't use T=0 because a couple of places you divide by T
Please explain why the fact that it's discontinuous at T = 0K is relevant? I don't specifiy T until the end. T should just carry along through the integral, I do believe.
***We need to focus on how to integrate an improper integral with units from 0 to infinity. Some examples show using the limit (shown below in text format) so I think that gets us started on the right track.
lim b -> oo for int(0 to b) [f(lamda,T) d(lamda)]
Wayne is forgetting about dummy arguments which is a whole other side issue. Let's stay on track. When I integrate from 10nm to 50000nm, I get approximately the right answer. I'm just truncating the discontinuities (the discontinuities are zero and infinity at the limits). I want to learn how to use MathCAD to calculate the full numerical integral (or symbolic, if possible) from 0 to infinity.
Thanks again, best regards!
Sorry, you are quite right.
However, in your example the integrand isn't just discontinuous, it is asymptotic on the left and is not defined at 0. I generally do not have a problem numerically integrating across a single valued step. I plotted your integrand about 0 and added an example with a discontinuity.
For the infinity problem, numerically I don't get it to work all the time either. You can add units to the infinity symbol, that is not the problem.
I added an example of well defined function and can calculate with an upper limit of infinity, with units, but only if the lower limit is set very high.
Hopefully one of the more mathematically inclined will respond.
Thanks Alan; so the key is to use a simple program to give the function at value at 0.
A minor point was to select infinite limit when right clicking the integral. I should mention that right clicking and selecting infinite limit is exactly the same as using the Calculus Toolbar to copy/paste the 'oo' symbol into the upper limit placeholder.
Thanks again, Wayne, Alan. Take care!