cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Improper Integral with Units

ptc-4059593
1-Newbie

Improper Integral with Units

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,,

1 ACCEPTED SOLUTION

Accepted Solutions

You could try something like the attached.

Alan

NB Better to use a name other than "test" for a worksheet. So many people do this it's easy to get confused!!

View solution in original post

5 REPLIES 5

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.

You could try something like the attached.

Alan

NB Better to use a name other than "test" for a worksheet. So many people do this it's easy to get confused!!

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!

Top Tags