topic Re: Improper Integral with Units in PTC Mathcad
https://community.ptc.com/t5/PTC-Mathcad/Improper-Integral-with-Units/m-p/241515#M94189
<HTML><HEAD></HEAD><BODY><P>A couple of quick observations:</P><P></P><P>Can't use T=0 because a couple of places you divide by T</P><P></P><P></P><P>Lambda table is defined, but Lambda is not and it is not in the argument list for alpha.</P></BODY></HTML>Mon, 05 Mar 2012 23:45:55 GMTwayne2012-03-05T23:45:55ZImproper Integral with Units
https://community.ptc.com/t5/PTC-Mathcad/Improper-Integral-with-Units/m-p/241514#M94188
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,Thu, 03 May 2018 18:17:29 GMThttps://community.ptc.com/t5/PTC-Mathcad/Improper-Integral-with-Units/m-p/241514#M94188ptc-40595932018-05-03T18:17:29ZRe: Improper Integral with Units
https://community.ptc.com/t5/PTC-Mathcad/Improper-Integral-with-Units/m-p/241515#M94189
<HTML><HEAD></HEAD><BODY><P>A couple of quick observations:</P><P></P><P>Can't use T=0 because a couple of places you divide by T</P><P></P><P></P><P>Lambda table is defined, but Lambda is not and it is not in the argument list for alpha.</P></BODY></HTML>Mon, 05 Mar 2012 23:45:55 GMThttps://community.ptc.com/t5/PTC-Mathcad/Improper-Integral-with-Units/m-p/241515#M94189wayne2012-03-05T23:45:55ZRe: Improper Integral with Units
https://community.ptc.com/t5/PTC-Mathcad/Improper-Integral-with-Units/m-p/241516#M94190
<HTML><HEAD></HEAD><BODY><P><EM>><SPAN style="font-family: Arial; font-size: 12px; background-color: #ffffff;">Lambda table is defined, but Lambda is not and it is not in the argument list for alpha.</SPAN></EM></P><P>Why would I have to define the dummy variable in an integration routine? </P><P></P><P><EM>><SPAN style="font-family: Arial; font-size: 12px; background-color: #ffffff;">Can't use T=0 because a couple of places you divide by T</SPAN></EM></P><P>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.</P><P></P><P>***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.</P><P></P><P>lim b -> oo for int(0 to b) [f(lamda,T) d(lamda)]</P><P></P><P>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. </P><P></P><P>Thanks again, best regards!</P></BODY></HTML>Tue, 06 Mar 2012 00:04:41 GMThttps://community.ptc.com/t5/PTC-Mathcad/Improper-Integral-with-Units/m-p/241516#M94190ptc-40595932012-03-06T00:04:41ZRe: Improper Integral with Units
https://community.ptc.com/t5/PTC-Mathcad/Improper-Integral-with-Units/m-p/241517#M94191
<HTML><HEAD></HEAD><BODY><P>Sorry, you are quite right.</P><P></P><P>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.</P><P></P><P>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.</P><P></P><P></P><P>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. </P><P></P><P>Hopefully one of the more mathematically inclined will respond.</P></BODY></HTML>Tue, 06 Mar 2012 05:03:17 GMThttps://community.ptc.com/t5/PTC-Mathcad/Improper-Integral-with-Units/m-p/241517#M94191wayne2012-03-06T05:03:17ZRe: Improper Integral with Units
https://community.ptc.com/t5/PTC-Mathcad/Improper-Integral-with-Units/m-p/241518#M94192
<HTML><HEAD></HEAD><BODY><P>You could try something like the attached.</P><P></P><P>Alan</P><P></P><P>NB Better to use a name other than "test" for a worksheet. So many people do this it's easy to get confused!!</P></BODY></HTML>Tue, 06 Mar 2012 12:57:38 GMThttps://community.ptc.com/t5/PTC-Mathcad/Improper-Integral-with-Units/m-p/241518#M94192AlanStevens2012-03-06T12:57:38ZRe: Improper Integral with Units
https://community.ptc.com/t5/PTC-Mathcad/Improper-Integral-with-Units/m-p/241519#M94193
<HTML><HEAD></HEAD><BODY><P>Thanks Alan; <STRONG>so the key is to use a simple program to give the function at value at 0</STRONG>. </P><P></P><P>A minor point was to select infinite limit when right clicking the integral. I should mention that<EM> right clicking and selecting infinite limit</EM> is exactly the same as <EM>using the Calculus Toolbar</EM> to copy/paste the 'oo' symbol into the upper limit placeholder.</P><P></P><P>Thanks again, Wayne, Alan. Take care!</P></BODY></HTML>Tue, 06 Mar 2012 15:18:45 GMThttps://community.ptc.com/t5/PTC-Mathcad/Improper-Integral-with-Units/m-p/241519#M94193ptc-40595932012-03-06T15:18:45Z