<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - comments on Post, solve vs. Roots</title>
    <link>http://www.mapleprimes.com/posts/40151-Solve-Vs-Roots</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 04:00:21 GMT</lastBuildDate>
    <pubDate>Wed, 10 Jun 2026 04:00:21 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest comments added to the Post, solve vs. Roots</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - comments on Post, solve vs. Roots</title>
      <link>http://www.mapleprimes.com/posts/40151-Solve-Vs-Roots</link>
    </image>
    <item>
      <title>Roots</title>
      <link>http://www.mapleprimes.com/posts/40151-Solve-Vs-Roots?ref=Feed:MaplePrimes:solve vs. Roots:Comments#comment73832</link>
      <itunes:summary>I don't know why Roots doesn't give you the solution but you are able to get the solutions if you add the numeric option for Roots.  For example

Student:-Calculus1:-Roots(sin(3*alpha)-.34, alpha = 0 .. 12);

Scott</itunes:summary>
      <description>The latest comments added to the Post, solve vs. Roots</description>
      <guid>73832</guid>
      <pubDate>Wed, 30 Jan 2008 19:31:26 Z</pubDate>
      <itunes:author>Scott03</itunes:author>
      <author>Scott03</author>
    </item>
    <item>
      <title>Floats vs. Exact</title>
      <link>http://www.mapleprimes.com/posts/40151-Solve-Vs-Roots?ref=Feed:MaplePrimes:solve vs. Roots:Comments#comment73828</link>
      <itunes:summary>As Scott points out, Roots should be called with the numeric option if you have floating point input:
&lt;tt&gt;Student:-Calculus1:-Roots(sin(3*alpha)-.34, alpha = 0 .. 12, 'numeric');&lt;/tt&gt;

Without the numeric option, Roots is calling 'solve' (instead of fsolve) and this solves the input converted to rational numbers:
&lt;tt&gt;convert(sin(3*alpha)-.34, 'rational');&lt;/tt&gt;
However, after it has the solutions, it calls evalf on them and sends the numerical solutions back to Roots().  Roots then plugs each solution back into the original floating point expression and checks whether they are &lt;i&gt;exactly&lt;/i&gt; equal to 0.  With the way floating point works, you have to be pretty lucky for the numerical roots to actually give you 0.0 when you plug them back in.  

Try it:
&lt;tt&gt;seq(eval(sin(3*alpha)-.34, alpha=sol), sol=Student:-Calculus1:-Roots(sin(3*alpha)-.34, alpha = 0 .. 12, 'numeric'));&lt;/tt&gt;

If you are interested in the exact solutions instead of the numerical ones, you should not put floats in your input:
&lt;tt&gt;Student:-Calculus1:-Roots(sin(3*alpha)-34/100, alpha = 0 .. 12);&lt;/tt&gt;

---
John May
Mathematical Software, Maplesoft</itunes:summary>
      <description>The latest comments added to the Post, solve vs. Roots</description>
      <guid>73828</guid>
      <pubDate>Wed, 30 Jan 2008 21:40:01 Z</pubDate>
      <itunes:author>jpmay</itunes:author>
      <author>jpmay</author>
    </item>
    <item>
      <title>But Roots should do this on its own!</title>
      <link>http://www.mapleprimes.com/posts/40151-Solve-Vs-Roots?ref=Feed:MaplePrimes:solve vs. Roots:Comments#comment84302</link>
      <itunes:summary>&lt;p&gt;This seems like a bug in Roots.&amp;nbsp; It is meant to be used in first-year calculus.&amp;nbsp; So although what you say is completely correct, it is also not something you should ever expect first-year students to know (or understand).&amp;nbsp; So, if Roots sees a float, it should just call fsolve on its own.&amp;nbsp; Isn't that part of the design principles of the Student package?&amp;nbsp; &lt;/p&gt;</itunes:summary>
      <description>The latest comments added to the Post, solve vs. Roots</description>
      <guid>84302</guid>
      <pubDate>Fri, 01 Feb 2008 09:03:53 Z</pubDate>
      <itunes:author>JacquesC</itunes:author>
      <author>JacquesC</author>
    </item>
    <item>
      <title>I Agree</title>
      <link>http://www.mapleprimes.com/posts/40151-Solve-Vs-Roots?ref=Feed:MaplePrimes:solve vs. Roots:Comments#comment92657</link>
      <itunes:summary>&lt;p&gt;I agree. Roots should either call fsolve on floating-point input, or at least use a numeric check instead of an exact check.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This same issue came up last week in another context (which is why I knew exactly what was causing the problem) and I have made the current maintainer of the Student packages aware of it.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;John May &lt;br /&gt;
&lt;i&gt; Mathematical Software, &lt;a href="http://www.maplesoft.com"&gt;Maplesoft&lt;/a&gt;&lt;/i&gt;&lt;/p&gt;</itunes:summary>
      <description>The latest comments added to the Post, solve vs. Roots</description>
      <guid>92657</guid>
      <pubDate>Sat, 02 Feb 2008 05:49:16 Z</pubDate>
      <itunes:author>John May</itunes:author>
      <author>John May</author>
    </item>
  </channel>
</rss>