<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Simplify an algebraic equation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Simplify-an-algebraic-equation/m-p/460077#M116927</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;is possible to simplify algebric equation?&lt;/P&gt;
&lt;P&gt;I have a character variable with a equation:&lt;/P&gt;
&lt;P&gt;"x+2+5+2x+3"&lt;/P&gt;
&lt;P&gt;I would create a new variable&lt;/P&gt;
&lt;P&gt;"3x+10"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 May 2018 12:27:36 GMT</pubDate>
    <dc:creator>cosimodc</dc:creator>
    <dc:date>2018-05-07T12:27:36Z</dc:date>
    <item>
      <title>Simplify an algebraic equation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simplify-an-algebraic-equation/m-p/460077#M116927</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;is possible to simplify algebric equation?&lt;/P&gt;
&lt;P&gt;I have a character variable with a equation:&lt;/P&gt;
&lt;P&gt;"x+2+5+2x+3"&lt;/P&gt;
&lt;P&gt;I would create a new variable&lt;/P&gt;
&lt;P&gt;"3x+10"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 12:27:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simplify-an-algebraic-equation/m-p/460077#M116927</guid>
      <dc:creator>cosimodc</dc:creator>
      <dc:date>2018-05-07T12:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Simplify Equation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simplify-an-algebraic-equation/m-p/460080#M116930</link>
      <description>&lt;P&gt;What is the question you need help with then?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can find basic tutorials here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://video.sas.com/category/videos/sas-analytics-u" target="_blank"&gt;http://video.sas.com/category/videos/sas-analytics-u&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Including this one on creating new variables:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://video.sas.com/detail/videos/sas-analytics-u/video/4573023399001/creating-a-new-column-in-sas?autoStart=false" target="_blank"&gt;http://video.sas.com/detail/videos/sas-analytics-u/video/4573023399001/creating-a-new-column-in-sas?autoStart=false&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/111252"&gt;@cosimodc&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;is possible to simplify algebric equation?&lt;/P&gt;
&lt;P&gt;I have a character variable with a equation:&lt;/P&gt;
&lt;P&gt;"x+2+5+2x+3"&lt;/P&gt;
&lt;P&gt;I would create a new variable&lt;/P&gt;
&lt;P&gt;"3x+10"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 15:13:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simplify-an-algebraic-equation/m-p/460080#M116930</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-05-04T15:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Simplify Equation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simplify-an-algebraic-equation/m-p/460103#M116935</link>
      <description>&lt;P&gt;I want to minimize length a variable which contains a equation.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;a=x+3x+5x+10*2+4x+10x+x**2+20x;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data new;&lt;/P&gt;&lt;P&gt;b=x**2+43x+20;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 17:02:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simplify-an-algebraic-equation/m-p/460103#M116935</guid>
      <dc:creator>cosimodc</dc:creator>
      <dc:date>2018-05-04T17:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Simplify Equation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simplify-an-algebraic-equation/m-p/460105#M116936</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/111252"&gt;@cosimodc&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I want to minimize length a variable which contains a equation.&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;data test;&lt;/P&gt;
&lt;P&gt;a=x+3x+5x+10*2+4x+10x+x**2+20x;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data new;&lt;/P&gt;
&lt;P&gt;b=x**2+43x+20;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is possible?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Possible yes.&lt;/P&gt;
&lt;P&gt;How much experience to you have writing compilers that parse code? Which is in effect what you are requesting. You would have to specify exactly every type of function and the reduction rule and I am afraid that&amp;nbsp; introducing () in to the equations means the logic is going to be extremely complex.&lt;/P&gt;
&lt;P&gt;Consider&lt;/P&gt;
&lt;P&gt;((x+3x+5x+10)*2+4x+10x+x)**2+20x&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How are you using these things such that the length is a critical issue?&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 17:13:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simplify-an-algebraic-equation/m-p/460105#M116936</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-05-04T17:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Simplify Equation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simplify-an-algebraic-equation/m-p/460136#M116943</link>
      <description>&lt;P&gt;I probably woudn't use SAS for that. Wolfram Alpha can do that and I *think* it has an API call, but it may be a paid service.&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 18:56:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simplify-an-algebraic-equation/m-p/460136#M116943</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-05-04T18:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Simplify Equation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simplify-an-algebraic-equation/m-p/460163#M116948</link>
      <description>&lt;P&gt;As someone mentioned, SAS is primarily a numerical language. If you are looking for symbolic computations such as simplifying an algebraic expression, Wolfram Alpha or other symbolic software would be a better choice.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to find the value of x that minimizes or maximizes an expression, then you are solving an optimization problem, and SAS has many ways to numerically&amp;nbsp;optimize equations, including PROC NLIN and NLMIXED (SAS/STAT), PROC IML (SAS/IML), and PROC OPTMODEL (SAS/OR).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 20:24:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simplify-an-algebraic-equation/m-p/460163#M116948</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-05-04T20:24:34Z</dc:date>
    </item>
  </channel>
</rss>

