<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, How do I calculate Riemannsum?</title>
    <link>http://www.mapleprimes.com/questions/102235-How-Do-I-Calculate-Riemannsum</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Sat, 13 Jun 2026 06:17:00 GMT</lastBuildDate>
    <pubDate>Sat, 13 Jun 2026 06:17:00 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, How do I calculate Riemannsum?</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, How do I calculate Riemannsum?</title>
      <link>http://www.mapleprimes.com/questions/102235-How-Do-I-Calculate-Riemannsum</link>
    </image>
    <item>
      <title>Homework?</title>
      <link>http://www.mapleprimes.com/questions/102235-How-Do-I-Calculate-Riemannsum?ref=Feed:MaplePrimes:How do I calculate Riemannsum?:Comments#answer102237</link>
      <itunes:summary>&lt;p&gt;It looks like a homework. What did you do on your own?&amp;nbsp; In order to produce you request, the integral int(1/(1+x^2),x=0..1)=Pi/4 can be taken into consideration. Look at &lt;a href="http://www.maplesoft.com/support/help/search.aspx?term=Riemannsum"&gt;?Riemannsum&lt;/a&gt; . The error of this approximation in the case of equal-sized subintervals is the same as the error of the trapezoidal approximation up to multiplier 2. See &lt;a href="http://www.mapleprimes.com/view.aspx?sf=102236/320872/sec_5-2.pdf"&gt;sec_5-2.pdf&lt;/a&gt; for that. Don't hesitate to ask me and my colleagues in the need. Of course, this is your work which you must do.&lt;/p&gt;
&lt;p&gt;PS. Increase the partition option until the difference between the upper Riemann sum and the lower Riemann sum will become less than 0.0001/4.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;It looks like a homework. What did you do on your own?&amp;nbsp; In order to produce you request, the integral int(1/(1+x^2),x=0..1)=Pi/4 can be taken into consideration. Look at &lt;a href="http://www.maplesoft.com/support/help/search.aspx?term=Riemannsum"&gt;?Riemannsum&lt;/a&gt; . The error of this approximation in the case of equal-sized subintervals is the same as the error of the trapezoidal approximation up to multiplier 2. See &lt;a href="http://www.mapleprimes.com/view.aspx?sf=102236/320872/sec_5-2.pdf"&gt;sec_5-2.pdf&lt;/a&gt; for that. Don't hesitate to ask me and my colleagues in the need. Of course, this is your work which you must do.&lt;/p&gt;
&lt;p&gt;PS. Increase the partition option until the difference between the upper Riemann sum and the lower Riemann sum will become less than 0.0001/4.&lt;/p&gt;</description>
      <guid>102237</guid>
      <pubDate>Sat, 05 Mar 2011 23:13:06 Z</pubDate>
      <itunes:author>hirnyk</itunes:author>
      <author>hirnyk</author>
    </item>
    <item>
      <title>Trapezoidal approximation dosent work</title>
      <link>http://www.mapleprimes.com/questions/102235-How-Do-I-Calculate-Riemannsum?ref=Feed:MaplePrimes:How do I calculate Riemannsum?:Comments#answer102262</link>
      <itunes:summary>&lt;p&gt;I'm supposed to get the answer S[41]=3.141493506 but I don't understand what I'm doing wrong&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="webkit-fake-url://66C2D022-6DAA-47E3-AE22-E498575F2BB2/image.tiff" alt=""&gt;&lt;img src="webkit-fake-url://7BE1C3C9-867E-45D6-8F57-594D2C5AE759/image.tiff" alt=""&gt;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;I'm supposed to get the answer S[41]=3.141493506 but I don't understand what I'm doing wrong&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="webkit-fake-url://66C2D022-6DAA-47E3-AE22-E498575F2BB2/image.tiff" alt=""&gt;&lt;img src="webkit-fake-url://7BE1C3C9-867E-45D6-8F57-594D2C5AE759/image.tiff" alt=""&gt;&lt;/p&gt;</description>
      <guid>102262</guid>
      <pubDate>Sun, 06 Mar 2011 17:53:36 Z</pubDate>
      <itunes:author>Harry_smile</itunes:author>
      <author>Harry_smile</author>
    </item>
    <item>
      <title>operation</title>
      <link>http://www.mapleprimes.com/questions/102235-How-Do-I-Calculate-Riemannsum?ref=Feed:MaplePrimes:How do I calculate Riemannsum?:Comments#answer102263</link>
      <itunes:summary>&lt;p&gt;This is the operation I've done&lt;/p&gt;
&lt;p&gt;f:=x-&amp;gt;4/(1+x^2);&lt;/p&gt;
&lt;p&gt;n:=1;s[n]:=1;while abs(s[n]-Pi)&amp;gt;=0.0001 do n:=n+1;s[n]:=evalf(sum(f((k-1)/n+k/n)*1/2n),k=1..n));end do; E[n]:=evalf(abs(s[n]-Pi));&lt;/p&gt;
&lt;p&gt;but it doesn't work....&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;This is the operation I've done&lt;/p&gt;
&lt;p&gt;f:=x-&amp;gt;4/(1+x^2);&lt;/p&gt;
&lt;p&gt;n:=1;s[n]:=1;while abs(s[n]-Pi)&amp;gt;=0.0001 do n:=n+1;s[n]:=evalf(sum(f((k-1)/n+k/n)*1/2n),k=1..n));end do; E[n]:=evalf(abs(s[n]-Pi));&lt;/p&gt;
&lt;p&gt;but it doesn't work....&lt;/p&gt;</description>
      <guid>102263</guid>
      <pubDate>Sun, 06 Mar 2011 17:58:45 Z</pubDate>
      <itunes:author>Harry_smile</itunes:author>
      <author>Harry_smile</author>
    </item>
    <item>
      <title>still doesn't work</title>
      <link>http://www.mapleprimes.com/questions/102235-How-Do-I-Calculate-Riemannsum?ref=Feed:MaplePrimes:How do I calculate Riemannsum?:Comments#answer102265</link>
      <itunes:summary>&lt;p&gt;I have now put in evalf before Pi&lt;/p&gt;
&lt;p&gt;f:=x-&amp;gt;4/(1+x^2);&lt;/p&gt;
&lt;p&gt;n:=1;s[n]:=1;while abs(s[n]-evalf(Pi))&amp;gt;=0.0001 do n:=n+1;s[n]:=evalf(sum(f((k-1)/n+k/n)*1/2n),k=1..n));end do; E[n]:=evalf(abs(s[n]-Pi))&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;but still no....&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;I have now put in evalf before Pi&lt;/p&gt;
&lt;p&gt;f:=x-&amp;gt;4/(1+x^2);&lt;/p&gt;
&lt;p&gt;n:=1;s[n]:=1;while abs(s[n]-evalf(Pi))&amp;gt;=0.0001 do n:=n+1;s[n]:=evalf(sum(f((k-1)/n+k/n)*1/2n),k=1..n));end do; E[n]:=evalf(abs(s[n]-Pi))&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;but still no....&lt;/p&gt;</description>
      <guid>102265</guid>
      <pubDate>Sun, 06 Mar 2011 19:42:13 Z</pubDate>
      <itunes:author>Harry_smile</itunes:author>
      <author>Harry_smile</author>
    </item>
    <item>
      <title>Syntax and math</title>
      <link>http://www.mapleprimes.com/questions/102235-How-Do-I-Calculate-Riemannsum?ref=Feed:MaplePrimes:How do I calculate Riemannsum?:Comments#comment102264</link>
      <itunes:summary>&lt;p&gt;At least, there are two mistakes in your code.&lt;/p&gt;
&lt;p&gt;1. Look at &lt;a href="http://www.maplesoft.com/support/help/search.aspx?term=do"&gt;?do&lt;/a&gt; . The construction&amp;nbsp;&lt;strong&gt; for&amp;nbsp;&lt;/strong&gt; n&lt;strong&gt;&amp;nbsp;from ... to .. &lt;/strong&gt;must be&amp;nbsp;before &lt;strong&gt;while .&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;2. The right trapezoid formula is &lt;strong&gt;s := sum(evalf((f((k-1)/n)+f(k/n))/(2*n)), k = 1 .. n)&lt;/strong&gt;&amp;nbsp; .&lt;/p&gt;
&lt;p&gt;PS. The most serious defect of your code is that you don't know Pi, you calculate it. Because of this you have to use another stop condition.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;At least, there are two mistakes in your code.&lt;/p&gt;
&lt;p&gt;1. Look at &lt;a href="http://www.maplesoft.com/support/help/search.aspx?term=do"&gt;?do&lt;/a&gt; . The construction&amp;nbsp;&lt;strong&gt; for&amp;nbsp;&lt;/strong&gt; n&lt;strong&gt;&amp;nbsp;from ... to .. &lt;/strong&gt;must be&amp;nbsp;before &lt;strong&gt;while .&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;2. The right trapezoid formula is &lt;strong&gt;s := sum(evalf((f((k-1)/n)+f(k/n))/(2*n)), k = 1 .. n)&lt;/strong&gt;&amp;nbsp; .&lt;/p&gt;
&lt;p&gt;PS. The most serious defect of your code is that you don't know Pi, you calculate it. Because of this you have to use another stop condition.&lt;/p&gt;</description>
      <guid>102264</guid>
      <pubDate>Sun, 06 Mar 2011 19:14:56 Z</pubDate>
      <itunes:author>hirnyk</itunes:author>
      <author>hirnyk</author>
    </item>
  </channel>
</rss>