<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, why not cancelling?</title>
    <link>http://www.mapleprimes.com/questions/125215-Why-Not-Cancelling</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Tue, 09 Jun 2026 14:17:20 GMT</lastBuildDate>
    <pubDate>Tue, 09 Jun 2026 14:17:20 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, why not cancelling?</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, why not cancelling?</title>
      <link>http://www.mapleprimes.com/questions/125215-Why-Not-Cancelling</link>
    </image>
    <item>
      <title>normal</title>
      <link>http://www.mapleprimes.com/questions/125215-Why-Not-Cancelling?ref=Feed:MaplePrimes:why not cancelling?:Comments#answer125228</link>
      <itunes:summary>&lt;p&gt;I think it's normal behaviour by Maple.&lt;/p&gt;
&lt;p&gt;For example,&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;(a*c+c)/(b*c+c);&lt;br&gt;                            a c + c&lt;br&gt;                            -------&lt;br&gt;                            b c + c&lt;br&gt;&lt;br&gt;&lt;/pre&gt;</itunes:summary>
      <description>&lt;p&gt;I think it's normal behaviour by Maple.&lt;/p&gt;
&lt;p&gt;For example,&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;(a*c+c)/(b*c+c);&lt;br&gt;                            a c + c&lt;br&gt;                            -------&lt;br&gt;                            b c + c&lt;br&gt;&lt;br&gt;&lt;/pre&gt;</description>
      <guid>125228</guid>
      <pubDate>Mon, 29 Aug 2011 10:56:17 Z</pubDate>
      <itunes:author>longrob</itunes:author>
      <author>longrob</author>
    </item>
    <item>
      <title>Force cancellation</title>
      <link>http://www.mapleprimes.com/questions/125215-Why-Not-Cancelling?ref=Feed:MaplePrimes:why not cancelling?:Comments#answer125233</link>
      <itunes:summary>&lt;p&gt;If on the surface of it you see common factors you could force factorization by a procedure like the following.&lt;/p&gt;
&lt;p&gt;sfactor:=proc(u) local i,F,S,p;&lt;br&gt;if not hastype(u,`+`) then return u end if;&lt;br&gt;if not type(u,`+`) then return evalindets(u,`+`,procname) end if;&lt;br&gt;for i to nops(u) do&lt;br&gt;&amp;nbsp; if not type(op(i,u),`*`) then &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; F[i]:={op(i,u)}&lt;br&gt;&amp;nbsp; else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; F[i]:={op(op(i,u))}&lt;br&gt;&amp;nbsp; end if&lt;br&gt;end do;&lt;br&gt;S:=`intersect`(seq(F[i],i=1..nops(u)));&lt;br&gt;if S={} then &lt;br&gt;&amp;nbsp;&amp;nbsp; u&lt;br&gt;else&lt;br&gt;&amp;nbsp;&amp;nbsp; p:=`*`(op(S));&lt;br&gt;&amp;nbsp;&amp;nbsp; p*map(`/`,u,p)&lt;br&gt;end if&lt;br&gt;end proc;&lt;/p&gt;
&lt;p&gt;#Test on your example.&lt;br&gt;u:=(Pi^2*(c+(1+Pi)/Pi)^2+Pi^2)/((c-(-1+Pi)/Pi)^2*Pi^2+Pi^2);&lt;br&gt;T:=op(1,u);&lt;br&gt;sfactor(T);&lt;br&gt;sfactor(u);&lt;br&gt;&lt;br&gt;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;If on the surface of it you see common factors you could force factorization by a procedure like the following.&lt;/p&gt;
&lt;p&gt;sfactor:=proc(u) local i,F,S,p;&lt;br&gt;if not hastype(u,`+`) then return u end if;&lt;br&gt;if not type(u,`+`) then return evalindets(u,`+`,procname) end if;&lt;br&gt;for i to nops(u) do&lt;br&gt;&amp;nbsp; if not type(op(i,u),`*`) then &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; F[i]:={op(i,u)}&lt;br&gt;&amp;nbsp; else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; F[i]:={op(op(i,u))}&lt;br&gt;&amp;nbsp; end if&lt;br&gt;end do;&lt;br&gt;S:=`intersect`(seq(F[i],i=1..nops(u)));&lt;br&gt;if S={} then &lt;br&gt;&amp;nbsp;&amp;nbsp; u&lt;br&gt;else&lt;br&gt;&amp;nbsp;&amp;nbsp; p:=`*`(op(S));&lt;br&gt;&amp;nbsp;&amp;nbsp; p*map(`/`,u,p)&lt;br&gt;end if&lt;br&gt;end proc;&lt;/p&gt;
&lt;p&gt;#Test on your example.&lt;br&gt;u:=(Pi^2*(c+(1+Pi)/Pi)^2+Pi^2)/((c-(-1+Pi)/Pi)^2*Pi^2+Pi^2);&lt;br&gt;T:=op(1,u);&lt;br&gt;sfactor(T);&lt;br&gt;sfactor(u);&lt;br&gt;&lt;br&gt;&lt;/p&gt;</description>
      <guid>125233</guid>
      <pubDate>Mon, 29 Aug 2011 15:54:20 Z</pubDate>
      <itunes:author>Preben Alsholm</itunes:author>
      <author>Preben Alsholm</author>
    </item>
    <item>
      <title>Reference</title>
      <link>http://www.mapleprimes.com/questions/125215-Why-Not-Cancelling?ref=Feed:MaplePrimes:why not cancelling?:Comments#answer125235</link>
      <itunes:summary>&lt;p&gt;It was asked and answered here:&lt;a href="http://www.mapleprimes.com/questions/36354-Help-Maple-Doesnt-Cancel-Common-Factors"&gt;http://www.mapleprimes.com/questions/36354-Help-Maple-Doesnt-Cancel-Common-Factors&lt;/a&gt; . This link can be found by the "cancel" search in MaplePrimes at the top of this page.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;It was asked and answered here:&lt;a href="http://www.mapleprimes.com/questions/36354-Help-Maple-Doesnt-Cancel-Common-Factors"&gt;http://www.mapleprimes.com/questions/36354-Help-Maple-Doesnt-Cancel-Common-Factors&lt;/a&gt; . This link can be found by the "cancel" search in MaplePrimes at the top of this page.&lt;/p&gt;</description>
      <guid>125235</guid>
      <pubDate>Mon, 29 Aug 2011 16:23:15 Z</pubDate>
      <itunes:author>Markiyan Hirnyk</itunes:author>
      <author>Markiyan Hirnyk</author>
    </item>
    <item>
      <title>easy with a transformation rule</title>
      <link>http://www.mapleprimes.com/questions/125215-Why-Not-Cancelling?ref=Feed:MaplePrimes:why not cancelling?:Comments#answer125278</link>
      <itunes:summary>&lt;p&gt;A common factor of type &lt;strong&gt;constant&lt;/strong&gt; as here can easily be cancelled out by a transformation rule that iteratively extracts the factor out from a sum by taking pairs of summands, and applying it to the subexpressions of type `+`, like:&lt;/p&gt;
&lt;pre&gt;fac3:=A::constant*B::algebraic+A::constant*C::algebraic=A*(B+C):
ex:=(Pi^2*(c+(1+Pi)/Pi)^2+Pi^2)/((c-(-1+Pi)/Pi)^2*Pi^2+Pi^2):

subsindets(ex,`+`,x-&amp;gt;applyrule(fac3,x));

                          /    1 + Pi\2
                          |c + ------|  + 1
                          \      Pi  /
                          ------------------
                          /    -1 + Pi\2
                          |c - -------|  + 1
                          \      Pi   /
&lt;/pre&gt;
&lt;p&gt;The simple pattern above will not work for coefficients of type&amp;nbsp;&lt;strong&gt;constant&lt;/strong&gt;. So, a rule specific for the factor at hand may be better:&lt;/p&gt;
&lt;pre&gt;p:=identical(Pi^2):
fac0:=A::p*B::algebraic+A::p*C::algebraic=A*(B+C):
subsindets(ex,`+`,x-&amp;gt;applyrule(fac0,x));

                          /    1 + Pi\2
                          |c + ------|  + 1
                          \      Pi  /
                          ------------------
                          /    -1 + Pi\2
                          |c - -------|  + 1
                          \      Pi   /
&lt;/pre&gt;</itunes:summary>
      <description>&lt;p&gt;A common factor of type &lt;strong&gt;constant&lt;/strong&gt; as here can easily be cancelled out by a transformation rule that iteratively extracts the factor out from a sum by taking pairs of summands, and applying it to the subexpressions of type `+`, like:&lt;/p&gt;
&lt;pre&gt;fac3:=A::constant*B::algebraic+A::constant*C::algebraic=A*(B+C):
ex:=(Pi^2*(c+(1+Pi)/Pi)^2+Pi^2)/((c-(-1+Pi)/Pi)^2*Pi^2+Pi^2):

subsindets(ex,`+`,x-&amp;gt;applyrule(fac3,x));

                          /    1 + Pi\2
                          |c + ------|  + 1
                          \      Pi  /
                          ------------------
                          /    -1 + Pi\2
                          |c - -------|  + 1
                          \      Pi   /
&lt;/pre&gt;
&lt;p&gt;The simple pattern above will not work for coefficients of type&amp;nbsp;&lt;strong&gt;constant&lt;/strong&gt;. So, a rule specific for the factor at hand may be better:&lt;/p&gt;
&lt;pre&gt;p:=identical(Pi^2):
fac0:=A::p*B::algebraic+A::p*C::algebraic=A*(B+C):
subsindets(ex,`+`,x-&amp;gt;applyrule(fac0,x));

                          /    1 + Pi\2
                          |c + ------|  + 1
                          \      Pi  /
                          ------------------
                          /    -1 + Pi\2
                          |c - -------|  + 1
                          \      Pi   /
&lt;/pre&gt;</description>
      <guid>125278</guid>
      <pubDate>Wed, 31 Aug 2011 09:08:33 Z</pubDate>
      <itunes:author>Alejandro Jakubi</itunes:author>
      <author>Alejandro Jakubi</author>
    </item>
    <item>
      <title>That's a different case, as it can be easily</title>
      <link>http://www.mapleprimes.com/questions/125215-Why-Not-Cancelling?ref=Feed:MaplePrimes:why not cancelling?:Comments#comment125259</link>
      <itunes:summary>&lt;p&gt;That's a different case, as it can be easily handled by simplify or normal. Axel's example with Pi^2 as the common factor is more difficult.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;That's a different case, as it can be easily handled by simplify or normal. Axel's example with Pi^2 as the common factor is more difficult.&lt;/p&gt;</description>
      <guid>125259</guid>
      <pubDate>Tue, 30 Aug 2011 10:40:47 Z</pubDate>
      <itunes:author>Thomas Richard</itunes:author>
      <author>Thomas Richard</author>
    </item>
    <item>
      <title>Thx, I like it !</title>
      <link>http://www.mapleprimes.com/questions/125215-Why-Not-Cancelling?ref=Feed:MaplePrimes:why not cancelling?:Comments#comment125242</link>
      <itunes:summary>&lt;p&gt;Preben, thank you - I like it!&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Preben, thank you - I like it!&lt;/p&gt;</description>
      <guid>125242</guid>
      <pubDate>Mon, 29 Aug 2011 22:17:12 Z</pubDate>
      <itunes:author>Axel Vogt</itunes:author>
      <author>Axel Vogt</author>
    </item>
  </channel>
</rss>