<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, Unable to plot an integral function containing a piecewise function</title>
    <link>http://www.mapleprimes.com/questions/139388-Unable-To-Plot-An-Integral-Function</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Wed, 10 Jun 2026 20:51:24 GMT</lastBuildDate>
    <pubDate>Wed, 10 Jun 2026 20:51:24 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, Unable to plot an integral function containing a piecewise function</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, Unable to plot an integral function containing a piecewise function</title>
      <link>http://www.mapleprimes.com/questions/139388-Unable-To-Plot-An-Integral-Function</link>
    </image>
    <item>
      <title>beta</title>
      <link>http://www.mapleprimes.com/questions/139388-Unable-To-Plot-An-Integral-Function?ref=Feed:MaplePrimes:Unable to plot an integral function containing a piecewise function:Comments#answer139390</link>
      <itunes:summary>&lt;p&gt;The proc T does not know the beta that you passed to g. Perhaps you meant to pass beta as a thrid argument to T.&lt;/p&gt;
&lt;p&gt;Also, you may have intended the first conditional (the `and) to be different (missing a minus sign?).&lt;/p&gt;
&lt;p&gt;Lastly, you might want to reduce the accuracy for the numerical integration, so that it succeeds across more values. You may have to play with that a bit...&lt;/p&gt;
&lt;pre&gt;restart;

Delta := proc(beta) options operator, arrow; sqrt(1-1/beta^2) end proc;

T := proc(`&amp;amp;epsilon;`, Z, beta) options operator, arrow;
 piecewise(`&amp;amp;epsilon;` &amp;lt; Delta(beta) and -Delta(beta) &amp;lt; `&amp;amp;epsilon;`,
 2*Delta(beta)^2/(`&amp;amp;epsilon;`^2+(Delta(beta)^2-`&amp;amp;epsilon;`^2)*(2*Z^2+1)^2),
 `&amp;amp;epsilon;` &amp;lt; -Delta(beta) or Delta(beta) &amp;lt; `&amp;amp;epsilon;`,
 2*abs(`&amp;amp;epsilon;`)/(abs(`&amp;amp;epsilon;`)+sqrt(`&amp;amp;epsilon;`^2-Delta(beta)^2)*(2*Z^2+1)))
end proc;

g := proc(V, Z, beta) options operator, arrow;
 1/(Int(T(`&amp;amp;epsilon;`, Z, beta)*beta*exp(beta*(`&amp;amp;epsilon;`-e*V))/
(exp(beta*(`&amp;amp;epsilon;`-e*V))+1)^2, `&amp;amp;epsilon;` = -infinity .. infinity,
 ':-epsilon'=1e-4, method = _NCrule)) end proc;

e := 1;

plot('g'(V, .1, 10), V = -4 .. 4);
&lt;/pre&gt;
&lt;!--break--&gt;
&lt;p&gt;acer&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;The proc T does not know the beta that you passed to g. Perhaps you meant to pass beta as a thrid argument to T.&lt;/p&gt;
&lt;p&gt;Also, you may have intended the first conditional (the `and) to be different (missing a minus sign?).&lt;/p&gt;
&lt;p&gt;Lastly, you might want to reduce the accuracy for the numerical integration, so that it succeeds across more values. You may have to play with that a bit...&lt;/p&gt;
&lt;pre&gt;restart;

Delta := proc(beta) options operator, arrow; sqrt(1-1/beta^2) end proc;

T := proc(`&amp;amp;epsilon;`, Z, beta) options operator, arrow;
 piecewise(`&amp;amp;epsilon;` &amp;lt; Delta(beta) and -Delta(beta) &amp;lt; `&amp;amp;epsilon;`,
 2*Delta(beta)^2/(`&amp;amp;epsilon;`^2+(Delta(beta)^2-`&amp;amp;epsilon;`^2)*(2*Z^2+1)^2),
 `&amp;amp;epsilon;` &amp;lt; -Delta(beta) or Delta(beta) &amp;lt; `&amp;amp;epsilon;`,
 2*abs(`&amp;amp;epsilon;`)/(abs(`&amp;amp;epsilon;`)+sqrt(`&amp;amp;epsilon;`^2-Delta(beta)^2)*(2*Z^2+1)))
end proc;

g := proc(V, Z, beta) options operator, arrow;
 1/(Int(T(`&amp;amp;epsilon;`, Z, beta)*beta*exp(beta*(`&amp;amp;epsilon;`-e*V))/
(exp(beta*(`&amp;amp;epsilon;`-e*V))+1)^2, `&amp;amp;epsilon;` = -infinity .. infinity,
 ':-epsilon'=1e-4, method = _NCrule)) end proc;

e := 1;

plot('g'(V, .1, 10), V = -4 .. 4);
&lt;/pre&gt;
&lt;!--break--&gt;
&lt;p&gt;acer&lt;/p&gt;</description>
      <guid>139390</guid>
      <pubDate>Fri, 09 Nov 2012 19:28:48 Z</pubDate>
      <itunes:author>acer</itunes:author>
      <author>acer</author>
    </item>
    <item>
      <title>use unapply instead&amp;nbsp;of -&amp;gt; to define</title>
      <link>http://www.mapleprimes.com/questions/139388-Unable-To-Plot-An-Integral-Function?ref=Feed:MaplePrimes:Unable to plot an integral function containing a piecewise function:Comments#answer139571</link>
      <itunes:summary>&lt;p&gt;use unapply instead&amp;nbsp;of -&amp;gt; to define a function:&lt;/p&gt;
&lt;p&gt;g := unapply(1/(Int(T(`&amp;amp;epsilon;`, Z)*beta*exp(beta*(`&amp;amp;epsilon;`-e*V))/(exp(beta*(`&amp;amp;epsilon;`-e*V))+1)^2, `&amp;amp;epsilon;` = -infinity .. infinity, method = _NCrule)), V, Z, beta);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;use unapply instead&amp;nbsp;of -&amp;gt; to define a function:&lt;/p&gt;
&lt;p&gt;g := unapply(1/(Int(T(`&amp;amp;epsilon;`, Z)*beta*exp(beta*(`&amp;amp;epsilon;`-e*V))/(exp(beta*(`&amp;amp;epsilon;`-e*V))+1)^2, `&amp;amp;epsilon;` = -infinity .. infinity, method = _NCrule)), V, Z, beta);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <guid>139571</guid>
      <pubDate>Sat, 10 Nov 2012 22:07:42 Z</pubDate>
      <itunes:author>zsy312</itunes:author>
      <author>zsy312</author>
    </item>
    <item>
      <title>':-epsilon'=1e-5</title>
      <link>http://www.mapleprimes.com/questions/139388-Unable-To-Plot-An-Integral-Function?ref=Feed:MaplePrimes:Unable to plot an integral function containing a piecewise function:Comments#comment139392</link>
      <itunes:summary>&lt;p&gt;Using&amp;nbsp;':-epsilon'=1e-5 I got the following plot,&lt;/p&gt;
&lt;p&gt;&lt;a href="/view.aspx?sf=139392/446354/epsplot.gif"&gt;&lt;img src="/view.aspx?sf=139392/446354/epsplot.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--break--&gt;
&lt;p&gt;acer&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Using&amp;nbsp;':-epsilon'=1e-5 I got the following plot,&lt;/p&gt;
&lt;p&gt;&lt;a href="/view.aspx?sf=139392/446354/epsplot.gif"&gt;&lt;img src="/view.aspx?sf=139392/446354/epsplot.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;!--break--&gt;
&lt;p&gt;acer&lt;/p&gt;</description>
      <guid>139392</guid>
      <pubDate>Fri, 09 Nov 2012 19:39:56 Z</pubDate>
      <itunes:author>acer</itunes:author>
      <author>acer</author>
    </item>
    <item>
      <title>moreover: exp(beta*(epsilon-V)) may cause over/under flow</title>
      <link>http://www.mapleprimes.com/questions/139388-Unable-To-Plot-An-Integral-Function?ref=Feed:MaplePrimes:Unable to plot an integral function containing a piecewise function:Comments#comment139393</link>
      <itunes:summary>&lt;p&gt;moreover: exp(beta*(epsilon-V)) may cause over/under flow&lt;/p&gt;
&lt;p&gt;As far as I can read the code ...&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;moreover: exp(beta*(epsilon-V)) may cause over/under flow&lt;/p&gt;
&lt;p&gt;As far as I can read the code ...&lt;/p&gt;</description>
      <guid>139393</guid>
      <pubDate>Fri, 09 Nov 2012 19:42:35 Z</pubDate>
      <itunes:author>Axel Vogt</itunes:author>
      <author>Axel Vogt</author>
    </item>
    <item>
      <title>Yes, that's true, I need to add &amp;beta; as</title>
      <link>http://www.mapleprimes.com/questions/139388-Unable-To-Plot-An-Integral-Function?ref=Feed:MaplePrimes:Unable to plot an integral function containing a piecewise function:Comments#comment139402</link>
      <itunes:summary>&lt;p&gt;Yes, that's true, I need to add &amp;beta; as the 3rd parameter when define T, perhaps it will help. Thank you &lt;span class="memberLink"&gt; &lt;a href="http://www.mapleprimes.com/users/acer"&gt;acer&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Yes, that's true, I need to add &amp;beta; as the 3rd parameter when define T, perhaps it will help. Thank you &lt;span class="memberLink"&gt; &lt;a href="http://www.mapleprimes.com/users/acer"&gt;acer&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;</description>
      <guid>139402</guid>
      <pubDate>Fri, 09 Nov 2012 23:50:42 Z</pubDate>
      <itunes:author>Budaoy</itunes:author>
      <author>Budaoy</author>
    </item>
  </channel>
</rss>