topic Integration with infinite upper and/or lower bound in PTC Mathcad
https://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594294#M184690
<P>Hi,</P>
<P> </P>
<P>During integration with infinite upper bound, I found that the result makes me doubtful.</P>
<P>Then I checked it by changing the infinite upper bound with a large enough number compare to other numbers in the equation. I got a more sensible result.</P>
<P> </P>
<P>my question:</P>
<P>1. when should we not use this infinite bounds?</P>
<P>2. did I miss something here in my worksheet?</P>
<P> </P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"><img src="https://sejnu66972.i.lithium.com/t5/image/serverpage/image-id/14281iE7CFDD9FAACE7E7D/image-size/large?v=1.0&px=999" title="image.png" alt="image.png" /></span></P>
<P> </P>Sun, 17 Feb 2019 23:35:47 GMTbmulyanto2019-02-17T23:35:47ZIntegration with infinite upper and/or lower bound
https://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594294#M184690
<P>Hi,</P>
<P> </P>
<P>During integration with infinite upper bound, I found that the result makes me doubtful.</P>
<P>Then I checked it by changing the infinite upper bound with a large enough number compare to other numbers in the equation. I got a more sensible result.</P>
<P> </P>
<P>my question:</P>
<P>1. when should we not use this infinite bounds?</P>
<P>2. did I miss something here in my worksheet?</P>
<P> </P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"><img src="https://sejnu66972.i.lithium.com/t5/image/serverpage/image-id/14281iE7CFDD9FAACE7E7D/image-size/large?v=1.0&px=999" title="image.png" alt="image.png" /></span></P>
<P> </P>Sun, 17 Feb 2019 23:35:47 GMThttps://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594294#M184690bmulyanto2019-02-17T23:35:47ZRe: Integration with infinite upper and/or lower bound
https://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594298#M184692
<BLOCKQUOTE><HR />
<P>2. did I miss something here in my worksheet?</P>
<P> </P>
<HR /></BLOCKQUOTE>
<P>You did not attach your worksheet!</P>
<P>What happens if you delete (or move down below the calculations) the definiton of the range for D. You only need it for plotting and not for the calculations.</P>
<P> </P>
<P>Are you aware that your functions J and K do NOT use the function pdf you defined afterwards but a (probably different?) function you defined earlier?</P>Sun, 17 Feb 2019 11:52:41 GMThttps://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594298#M184692Werner_E2019-02-17T11:52:41ZRe: Integration with infinite upper and/or lower bound
https://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594302#M184694
<P>Apart from Werner's correct remarks, the difference is most probably due to an overflow during the numeric integration. This overflow does not occur in the range from 10 to 1000 nm, but somewhere in the vast range between 1000 nm and infinity...</P>
<P>Try to evaluate your integrals (which, by the way are NOT functions of D) symbolically and see what happens.</P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LM20190217_Integration.png" style="width: 816px;"><img src="https://sejnu66972.i.lithium.com/t5/image/serverpage/image-id/14284iD9A4B78E755D5380/image-size/large?v=1.0&px=999" title="LM20190217_Integration.png" alt="LM20190217_Integration.png" /></span></P>
<P>Producing a 0 answer as a result of this is bad. I'd consider it a bug.</P>
<P>This bug is very old, because it also appears in Mathcad 11...<img id="smileysad" class="emoticon emoticon-smileysad" src="https://sejnu66972.i.lithium.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /></P>
<P> </P>
<P>Success!<BR />Luc</P>Sun, 17 Feb 2019 13:48:01 GMThttps://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594302#M184694LucMeekes2019-02-17T13:48:01ZRe: Integration with infinite upper and/or lower bound
https://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594308#M184695
<P>In real Mathcad we can chose the algorithm used for integration resp. we see which algorithm Mathcad choses automatically.</P>
<P>For an infinite limit the appropriate algorithm must be used (not the ordinary Romberg) but as it seems infinity time unit is not seen as an infinite limit and so the wrong algorithm is chosen:</P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="B.png" style="width: 206px;"><img src="https://sejnu66972.i.lithium.com/t5/image/serverpage/image-id/14285i544C4F15287D619B/image-dimensions/206x268?v=1.0" width="206" height="268" title="B.png" alt="B.png" /></span></P>Sun, 17 Feb 2019 18:24:45 GMThttps://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594308#M184695Werner_E2019-02-17T18:24:45ZRe: Integration with infinite upper and/or lower bound
https://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594325#M184704
<P>Sorry I forgot to attached it. I edited my post. </P>
<P> </P>
<P>In the previous page, there is the pdf written already. </P>
<P>I copied it there just to have in during screenshot.</P>
<P>I will try to delete D.</P>
<P> </P>Sun, 17 Feb 2019 23:41:15 GMThttps://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594325#M184704bmulyanto2019-02-17T23:41:15ZRe: Integration with infinite upper and/or lower bound
https://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594327#M184705
<P>I found that I need to pick specific range of integration by seeing the function first where its value is relevant (large enough).</P>
<P>The integration is done with respect (w.r.t.) to D and I also need to see the influence of w.</P>
<P>I put w before (in the 1st page of my worksheet).</P>Sun, 17 Feb 2019 23:49:40 GMThttps://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594327#M184705bmulyanto2019-02-17T23:49:40ZRe: Integration with infinite upper and/or lower bound
https://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594329#M184706
<P>yes, I am aware of that thing regarding the integration method/algorithm.</P>
<P>It is found in matlab as well.</P>
<P>I cannot find the way to change it here. I thought Mathcad will choose the correct one automatically until I come cross with this problem.</P>
<P>where can I find the menu to choose this integration algorithm in prime4?</P>Sun, 17 Feb 2019 23:52:49 GMThttps://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594329#M184706bmulyanto2019-02-17T23:52:49ZRe: Integration with infinite upper and/or lower bound
https://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594331#M184707
<P>The D range is not the problem.</P>
<P>As I had shown with the screenshot from real Mathcad the problem seems to be that the wrong algorithm is automatically chosen (you cannot chose it manually in Prime) if the upper limit is not infinity but infinity times unit nm.</P>
<P>So here is a workaround:</P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="B.png" style="width: 671px;"><img src="https://sejnu66972.i.lithium.com/t5/image/serverpage/image-id/14294i946A223897BB887B/image-dimensions/671x314?v=1.0" width="671" height="314" title="B.png" alt="B.png" /></span></P>Sun, 17 Feb 2019 23:57:46 GMThttps://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594331#M184707Werner_E2019-02-17T23:57:46ZRe: Integration with infinite upper and/or lower bound
https://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594332#M184708
<P>Here is the worksheet with the built-in workaround as explained above.</P>
<P>As its in Prime 5 format i also attach a pdf-print of it.</P>
<P> </P>Mon, 18 Feb 2019 00:19:36 GMThttps://community.ptc.com/t5/PTC-Mathcad/Integration-with-infinite-upper-and-or-lower-bound/m-p/594332#M184708Werner_E2019-02-18T00:19:36Z