<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, Total degree in which a variable appears</title>
    <link>http://www.mapleprimes.com/questions/121163-Total-Degree-In-Which-A-Variable-Appears</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Thu, 11 Jun 2026 09:40:53 GMT</lastBuildDate>
    <pubDate>Thu, 11 Jun 2026 09:40:53 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, Total degree in which a variable appears</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, Total degree in which a variable appears</title>
      <link>http://www.mapleprimes.com/questions/121163-Total-Degree-In-Which-A-Variable-Appears</link>
    </image>
    <item>
      <title>One way</title>
      <link>http://www.mapleprimes.com/questions/121163-Total-Degree-In-Which-A-Variable-Appears?ref=Feed:MaplePrimes:Total degree in which a variable appears:Comments#answer121164</link>
      <itunes:summary>&lt;p&gt;It can be done in such a way (This way is not shortest, but it is simple.):&lt;br&gt;&amp;gt; f := x^2*y+3*x*y^2+x^3*y^3-x^5+y^4*z^5:&lt;br&gt;&amp;gt;a:= select(has, f, x);#we select all monoms of f with x &lt;br&gt;&amp;nbsp; x^2*y+3*x*y^2+x^3*y^3-x^5&lt;br&gt;&amp;gt;degree(a) # the total degree of a&lt;br&gt;&amp;nbsp; 6&lt;/p&gt;
&lt;p&gt;&lt;br&gt;Of course, we can combine these:&lt;/p&gt;
&lt;p&gt;&amp;gt;degree(select(has, f, x));&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&lt;/p&gt;
&lt;p&gt;Look at &lt;a href="http://www.maplesoft.com/support/help/search.aspx?term=select"&gt;?select&lt;/a&gt; and &lt;a href="http://www.maplesoft.com/support/help/search.aspx?term=degree"&gt;?degree&lt;/a&gt;.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;It can be done in such a way (This way is not shortest, but it is simple.):&lt;br&gt;&amp;gt; f := x^2*y+3*x*y^2+x^3*y^3-x^5+y^4*z^5:&lt;br&gt;&amp;gt;a:= select(has, f, x);#we select all monoms of f with x &lt;br&gt;&amp;nbsp; x^2*y+3*x*y^2+x^3*y^3-x^5&lt;br&gt;&amp;gt;degree(a) # the total degree of a&lt;br&gt;&amp;nbsp; 6&lt;/p&gt;
&lt;p&gt;&lt;br&gt;Of course, we can combine these:&lt;/p&gt;
&lt;p&gt;&amp;gt;degree(select(has, f, x));&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&lt;/p&gt;
&lt;p&gt;Look at &lt;a href="http://www.maplesoft.com/support/help/search.aspx?term=select"&gt;?select&lt;/a&gt; and &lt;a href="http://www.maplesoft.com/support/help/search.aspx?term=degree"&gt;?degree&lt;/a&gt;.&lt;/p&gt;</description>
      <guid>121164</guid>
      <pubDate>Mon, 06 Jun 2011 21:04:23 Z</pubDate>
      <itunes:author>hirnyk</itunes:author>
      <author>hirnyk</author>
    </item>
    <item>
      <title>Another way</title>
      <link>http://www.mapleprimes.com/questions/121163-Total-Degree-In-Which-A-Variable-Appears?ref=Feed:MaplePrimes:Total degree in which a variable appears:Comments#answer121167</link>
      <itunes:summary>&lt;p&gt;In addition to the way suggested by Markiyan Hirnyk, that could be done also as&lt;/p&gt;
&lt;pre&gt;degree(f-eval(f,x=0));

                                  6
&lt;/pre&gt;
&lt;p&gt;The usage is approximately the same,&lt;/p&gt;
&lt;pre&gt;p:=expand(randpoly(x,dense,degree=1000,coeffs=(()-&amp;gt;randpoly(y,dense,degree=2000)))+
randpoly(y,dense,degree=1000,coeffs=(()-&amp;gt;randpoly(z,dense,degree=2000)))):

CodeTools:-Usage(degree(p-eval(p,x=0)));
memory used=121.58MiB, alloc change=121.60MiB, cpu time=7.50s, real time=7.64s

                                 3000

CodeTools:-Usage(degree(select(has, p, z)));
memory used=218.90MiB, alloc change=128.04MiB, cpu time=7.38s, real time=7.44s

                                 3000
&lt;/pre&gt;
&lt;p&gt;Alec&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;In addition to the way suggested by Markiyan Hirnyk, that could be done also as&lt;/p&gt;
&lt;pre&gt;degree(f-eval(f,x=0));

                                  6
&lt;/pre&gt;
&lt;p&gt;The usage is approximately the same,&lt;/p&gt;
&lt;pre&gt;p:=expand(randpoly(x,dense,degree=1000,coeffs=(()-&amp;gt;randpoly(y,dense,degree=2000)))+
randpoly(y,dense,degree=1000,coeffs=(()-&amp;gt;randpoly(z,dense,degree=2000)))):

CodeTools:-Usage(degree(p-eval(p,x=0)));
memory used=121.58MiB, alloc change=121.60MiB, cpu time=7.50s, real time=7.64s

                                 3000

CodeTools:-Usage(degree(select(has, p, z)));
memory used=218.90MiB, alloc change=128.04MiB, cpu time=7.38s, real time=7.44s

                                 3000
&lt;/pre&gt;
&lt;p&gt;Alec&lt;/p&gt;</description>
      <guid>121167</guid>
      <pubDate>Mon, 06 Jun 2011 23:54:08 Z</pubDate>
      <itunes:author>Alec Mihailovs</itunes:author>
      <author>Alec Mihailovs</author>
    </item>
  </channel>
</rss>