<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, Question about applyrule</title>
    <link>http://www.mapleprimes.com/questions/143058-Question-About-Applyrule</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 20:45:21 GMT</lastBuildDate>
    <pubDate>Sat, 13 Jun 2026 20:45:21 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, Question about applyrule</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, Question about applyrule</title>
      <link>http://www.mapleprimes.com/questions/143058-Question-About-Applyrule</link>
    </image>
    <item>
      <title>Re</title>
      <link>http://www.mapleprimes.com/questions/143058-Question-About-Applyrule?ref=Feed:MaplePrimes:Question about applyrule:Comments#answer143061</link>
      <itunes:summary>&lt;p&gt;Maple does this automatically by &amp;nbsp;&lt;strong&gt;combine &amp;nbsp;&lt;/strong&gt;command. But the inverse convertation of the sum to the product - it is a problem:&lt;/p&gt;
&lt;pre&gt;&lt;strong&gt;combine(cos(3*x)*cos(x));&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;combine(cos(3*x)*cos(x) + sin(3*x)*sin(x));&lt;/strong&gt;&lt;/pre&gt;
&lt;pre&gt;              1/2*cos(2*x)+1/2*cos(4*x)&lt;br&gt;                            cos(2*x)&lt;/pre&gt;
&lt;pre&gt;&lt;strong&gt;&lt;br&gt;&lt;/strong&gt;&lt;/pre&gt;</itunes:summary>
      <description>&lt;p&gt;Maple does this automatically by &amp;nbsp;&lt;strong&gt;combine &amp;nbsp;&lt;/strong&gt;command. But the inverse convertation of the sum to the product - it is a problem:&lt;/p&gt;
&lt;pre&gt;&lt;strong&gt;combine(cos(3*x)*cos(x));&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;combine(cos(3*x)*cos(x) + sin(3*x)*sin(x));&lt;/strong&gt;&lt;/pre&gt;
&lt;pre&gt;              1/2*cos(2*x)+1/2*cos(4*x)&lt;br&gt;                            cos(2*x)&lt;/pre&gt;
&lt;pre&gt;&lt;strong&gt;&lt;br&gt;&lt;/strong&gt;&lt;/pre&gt;</description>
      <guid>143061</guid>
      <pubDate>Mon, 04 Feb 2013 21:15:00 Z</pubDate>
      <itunes:author>Kitonum</itunes:author>
      <author>Kitonum</author>
    </item>
    <item>
      <title>like so?</title>
      <link>http://www.mapleprimes.com/questions/143058-Question-About-Applyrule?ref=Feed:MaplePrimes:Question about applyrule:Comments#answer143064</link>
      <itunes:summary>&lt;p&gt;You can apply both those rules, together or separately. Below they are applied separately. Is that what you mean?&lt;/p&gt;
&lt;pre&gt;restart:

ee:=cos(3*x)*cos(x) + sin(3*x)*sin(x):

applyrule(cos(a::integer*x)*cos(b::integer*x)
          =1/2*(cos((a-b)*x)+cos((a+b)*x)),
          ee);

           1            1                           
           - cos(2 x) + - cos(4 x) + sin(3 x) sin(x)
           2            2                           

applyrule(sin(a::integer*x)*sin(b::integer*x)
          =1/2*(cos((a-b)*x)-cos((a+b)*x)),
          ee);

                             1            1         
           cos(3 x) cos(x) + - cos(2 x) - - cos(4 x)
                             2            2         
&lt;/pre&gt;
&lt;p&gt;If both are applied, then the terms collapse, and produce just cos(2*x).&lt;/p&gt;
&lt;!--break--&gt;
&lt;p&gt;acer&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;You can apply both those rules, together or separately. Below they are applied separately. Is that what you mean?&lt;/p&gt;
&lt;pre&gt;restart:

ee:=cos(3*x)*cos(x) + sin(3*x)*sin(x):

applyrule(cos(a::integer*x)*cos(b::integer*x)
          =1/2*(cos((a-b)*x)+cos((a+b)*x)),
          ee);

           1            1                           
           - cos(2 x) + - cos(4 x) + sin(3 x) sin(x)
           2            2                           

applyrule(sin(a::integer*x)*sin(b::integer*x)
          =1/2*(cos((a-b)*x)-cos((a+b)*x)),
          ee);

                             1            1         
           cos(3 x) cos(x) + - cos(2 x) - - cos(4 x)
                             2            2         
&lt;/pre&gt;
&lt;p&gt;If both are applied, then the terms collapse, and produce just cos(2*x).&lt;/p&gt;
&lt;!--break--&gt;
&lt;p&gt;acer&lt;/p&gt;</description>
      <guid>143064</guid>
      <pubDate>Mon, 04 Feb 2013 22:43:35 Z</pubDate>
      <itunes:author>acer</itunes:author>
      <author>acer</author>
    </item>
  </channel>
</rss>