<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - comments on Post, Dirichlet function</title>
    <link>http://www.mapleprimes.com/posts/38691-Dirichlet-Function</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Tue, 16 Jun 2026 08:09:17 GMT</lastBuildDate>
    <pubDate>Tue, 16 Jun 2026 08:09:17 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest comments added to the Post, Dirichlet function</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - comments on Post, Dirichlet function</title>
      <link>http://www.mapleprimes.com/posts/38691-Dirichlet-Function</link>
    </image>
    <item>
      <title>how would you tell?</title>
      <link>http://www.mapleprimes.com/posts/38691-Dirichlet-Function?ref=Feed:MaplePrimes:Dirichlet function:Comments#comment69764</link>
      <itunes:summary>&lt;p&gt;How would you be able to distinguish the difference between a plot of that function and the plot of the solid lines y=0 and y=1?&lt;/p&gt;
&lt;pre&gt;
plot([0,1],x=-5..5,color=red,thickness=5);
&lt;/pre&gt;
&lt;p&gt;Remember, the rationals are a dense subset of the reals. Between any two reals there exists some rational. And, given a nonzero distance and some real number, there is a rational to be found within that distance from it. So, how could you plot the rationals without it &amp;quot;looking&amp;quot; like a solid line?&lt;/p&gt;
&lt;p&gt;acer&lt;/p&gt;</itunes:summary>
      <description>The latest comments added to the Post, Dirichlet function</description>
      <guid>69764</guid>
      <pubDate>Sat, 13 Sep 2008 22:33:14 Z</pubDate>
      <itunes:author>acer</itunes:author>
      <author>acer</author>
    </item>
    <item>
      <title>Dirichlet function -- modified version</title>
      <link>http://www.mapleprimes.com/posts/38691-Dirichlet-Function?ref=Feed:MaplePrimes:Dirichlet function:Comments#comment69763</link>
      <itunes:summary>&lt;p&gt;Here is a modifed version, said to be graphable:&lt;/p&gt;
&lt;p&gt;f(x) =&amp;nbsp; {&amp;nbsp; 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for x irrational&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; {&amp;nbsp; 1/b,&amp;nbsp; for x = a/b a reduced fraction&lt;/p&gt;
&lt;p&gt;Alla&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>The latest comments added to the Post, Dirichlet function</description>
      <guid>69763</guid>
      <pubDate>Sat, 13 Sep 2008 23:18:55 Z</pubDate>
      <itunes:author>alla</itunes:author>
      <author>alla</author>
    </item>
    <item>
      <title>It does not make much sense. Anyway ...</title>
      <link>http://www.mapleprimes.com/posts/38691-Dirichlet-Function?ref=Feed:MaplePrimes:Dirichlet function:Comments#comment69761</link>
      <itunes:summary>&lt;pre&gt;
&amp;nbsp; restart;
&amp;nbsp; Digits:=14;

&amp;nbsp; d:=proc(x)
&amp;nbsp;&amp;nbsp;&amp;nbsp; local q,a,b;
&amp;nbsp;&amp;nbsp;&amp;nbsp; q:=convert(evalf(x),rational);
&amp;nbsp;&amp;nbsp;&amp;nbsp; b:=1/denom(q);
&amp;nbsp; end proc;
&amp;nbsp;
&amp;nbsp; plot('d'(x),x=0.1..Pi, thickness=3, numpoints=100);
&lt;/pre&gt;</itunes:summary>
      <description>The latest comments added to the Post, Dirichlet function</description>
      <guid>69761</guid>
      <pubDate>Sat, 13 Sep 2008 23:35:50 Z</pubDate>
      <itunes:author>Axel Vogt</itunes:author>
      <author>Axel Vogt</author>
    </item>
    <item>
      <title>the hard part</title>
      <link>http://www.mapleprimes.com/posts/38691-Dirichlet-Function?ref=Feed:MaplePrimes:Dirichlet function:Comments#comment82850</link>
      <itunes:summary>&lt;p&gt;The hard part for graphing this is not dealing with the rationals, it is dealing with the irrationals.&lt;/p&gt;
&lt;p&gt;One difficulty is in making &lt;b&gt;f&lt;/b&gt; plot as a &lt;i&gt;function&lt;/i&gt; (1-to-1, not 1-to-many). Each irrational is only representable in fixed precision floating-point as a value which happens to also correspond (perfectly) to some rational. And that rational should here be plotted also as a rational (using the rule in &lt;b&gt;f&lt;/b&gt; for rationals). But if the same point x gets plotted twice, by both schemes, then the plot doesn't really represent a &lt;i&gt;function&lt;/i&gt; (because it's 1-to-2).&lt;/p&gt;
&lt;p&gt;Also, how does one make the line along y=0 appear to be not merely solid and yet still be faithful to the spirit of the given definition? Omitting the line along y=0 altogether doesn't seem to encapsulate that important part of it all (to me).&lt;/p&gt;
&lt;p&gt;acer&lt;/p&gt;</itunes:summary>
      <description>The latest comments added to the Post, Dirichlet function</description>
      <guid>82850</guid>
      <pubDate>Sun, 14 Sep 2008 07:14:38 Z</pubDate>
      <itunes:author>acer</itunes:author>
      <author>acer</author>
    </item>
    <item>
      <title>numpoints</title>
      <link>http://www.mapleprimes.com/posts/38691-Dirichlet-Function?ref=Feed:MaplePrimes:Dirichlet function:Comments#comment69734</link>
      <itunes:summary>When you say numpoints=100, doesn't that cause evaluation at 100 equally-spaced points (which, in this case, are all rational)???

--- 
G A Edgar</itunes:summary>
      <description>The latest comments added to the Post, Dirichlet function</description>
      <guid>69734</guid>
      <pubDate>Thu, 18 Sep 2008 19:44:03 Z</pubDate>
      <itunes:author>edgar</itunes:author>
      <author>edgar</author>
    </item>
    <item>
      <title>My version</title>
      <link>http://www.mapleprimes.com/posts/38691-Dirichlet-Function?ref=Feed:MaplePrimes:Dirichlet function:Comments#comment69731</link>
      <itunes:summary>&lt;p&gt;Here is a reasonable approximation to the graph.&lt;/p&gt;
&lt;pre&gt;&amp;gt; plots[pointplot]([seq(seq([a/b,1/b],
      a=select((t-&amp;gt;igcd(t,b)=1), [$1..b])),b=1..200)],
    symbolsize=4,colour=red);
&lt;/pre&gt;
&lt;p&gt;&lt;img src="/view.aspx?sf=69731/plot1.gif" alt=""&gt;&lt;/p&gt;</itunes:summary>
      <description>The latest comments added to the Post, Dirichlet function</description>
      <guid>69731</guid>
      <pubDate>Thu, 18 Sep 2008 21:44:11 Z</pubDate>
      <itunes:author>Robert Israel</itunes:author>
      <author>Robert Israel</author>
    </item>
  </channel>
</rss>