<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168581</link>
    <title>MATLAB Central Newsreader - solve equations for integral limits?</title>
    <description>Feed for thread: solve equations for integral limits?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 01 May 2008 15:49:03 -0400</pubDate>
      <title>solve equations for integral limits?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168581#429785</link>
      <author>David Doria</author>
      <description>syms x k;&lt;br&gt;
&lt;br&gt;
solve('int(x^2,0,k)=2','k')&lt;br&gt;
&lt;br&gt;
matlab wont run this... why can I not solve that equation??</description>
    </item>
    <item>
      <pubDate>Thu, 01 May 2008 17:36:12 -0400</pubDate>
      <title>Re: solve equations for integral limits?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168581#429808</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;fvcopf$mfa$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
David Doria &amp;lt;daviddoria@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;syms x k;&lt;br&gt;
&lt;br&gt;
&amp;gt;solve('int(x^2,0,k)=2','k')&lt;br&gt;
&lt;br&gt;
&amp;gt;matlab wont run this... why can I not solve that equation??&lt;br&gt;
&lt;br&gt;
I cannot test that myself as the symbolic toolbox isn't available for&lt;br&gt;
Linux systems.&lt;br&gt;
&lt;br&gt;
When, though, I test it in maple directly, maple quickly returns:&lt;br&gt;
&lt;br&gt;
[6^(1/3), ...&lt;br&gt;
&amp;nbsp;-1/2*6^(1/3)+1/2*I*3^(1/2)*6^(1/3), ...&lt;br&gt;
&amp;nbsp;-1/2*6^(1/3)-1/2*I*3^(1/2)*6^(1/3)]&lt;br&gt;
&lt;br&gt;
Maple would run the int() before attempting to solve(), so this&lt;br&gt;
is equivilent to asking maple to solve(k^3/3=2)&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&quot;To burn always with this hard, gem-like flame, to maintain this&lt;br&gt;
&amp;nbsp;&amp;nbsp;ecstasy, is success in life.&quot;               -- Walter Pater</description>
    </item>
    <item>
      <pubDate>Thu, 01 May 2008 17:51:03 -0400</pubDate>
      <title>Re: solve equations for integral limits?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168581#429814</link>
      <author>David Doria</author>
      <description>so realizing that solve() uses maple... I used maple syntax:&lt;br&gt;
&lt;br&gt;
solve('int(x,x=0..k)=1/2','k')&lt;br&gt;
&lt;br&gt;
and it kind of works... the problem is that it returns [1,&lt;br&gt;
-1].  1 is clearly the correct solution, and -1 seems to be&lt;br&gt;
wrong... because if you integrate from 0 to -1, you have to&lt;br&gt;
switch the limits and change the sign... so you actually get&lt;br&gt;
-1/2, not 1/2 as requested...&lt;br&gt;
&amp;nbsp;&lt;br&gt;
thoughts?</description>
    </item>
    <item>
      <pubDate>Thu, 01 May 2008 18:06:23 -0400</pubDate>
      <title>Re: solve equations for integral limits?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168581#429816</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;fvcvu6$ld4$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
David Doria &amp;lt;daviddoria@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;so realizing that solve() uses maple... I used maple syntax:&lt;br&gt;
&lt;br&gt;
&amp;gt;solve('int(x,x=0..k)=1/2','k')&lt;br&gt;
&lt;br&gt;
&amp;gt;and it kind of works... the problem is that it returns [1,&lt;br&gt;
&amp;gt;-1].  1 is clearly the correct solution, and -1 seems to be&lt;br&gt;
&amp;gt;wrong... because if you integrate from 0 to -1, you have to&lt;br&gt;
&amp;gt;switch the limits and change the sign... so you actually get&lt;br&gt;
&amp;gt;-1/2, not 1/2 as requested...&lt;br&gt;
&lt;br&gt;
Recall what I said about maple doing the int() before it does the&lt;br&gt;
solve. The int() is going to be k^2/2, and solving k^2/2=1/2 &lt;br&gt;
is going to give +/- 1.&lt;br&gt;
-- &lt;br&gt;
'Roberson' is my family name; my given name is 'Walter'.</description>
    </item>
    <item>
      <pubDate>Thu, 01 May 2008 18:12:39 -0400</pubDate>
      <title>Re: solve equations for integral limits?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168581#429820</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;fvcvu6$ld4$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
David Doria &amp;lt;daviddoria@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;so realizing that solve() uses maple... I used maple syntax:&lt;br&gt;
&lt;br&gt;
&amp;gt;solve('int(x,x=0..k)=1/2','k')&lt;br&gt;
&lt;br&gt;
&amp;gt;and it kind of works... the problem is that it returns [1,&lt;br&gt;
&amp;gt;-1].  1 is clearly the correct solution, and -1 seems to be&lt;br&gt;
&amp;gt;wrong... because if you integrate from 0 to -1, you have to&lt;br&gt;
&amp;gt;switch the limits and change the sign... so you actually get&lt;br&gt;
&amp;gt;-1/2, not 1/2 as requested...&lt;br&gt;
&lt;br&gt;
int(x,x=a..b) is b^2/2-a^2/2&lt;br&gt;
so int(x,x=-1..0) is 0^2/2-(-1)^2/2 = -1/2&lt;br&gt;
so int(x,x=0..-1) is the negative of that, and -(-1/2) is 1/2.&lt;br&gt;
Thus k=-1 is a correct solution to the problem.&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;No one has the right to destroy another person's belief by&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;demanding empirical evidence.&quot;                -- Ann Landers</description>
    </item>
    <item>
      <pubDate>Thu, 01 May 2008 18:19:02 -0400</pubDate>
      <title>Re: solve equations for integral limits?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168581#429822</link>
      <author>David Doria</author>
      <description>right - but that is not very useful because if I'm unsure of&lt;br&gt;
the domain of the correct answer then I still don't know the&lt;br&gt;
answer! Surely there is a function that can do this properly??</description>
    </item>
    <item>
      <pubDate>Thu, 01 May 2008 18:35:36 -0400</pubDate>
      <title>Re: solve equations for integral limits?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168581#429830</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;fvd1im$oli$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
David Doria &amp;lt;daviddoria@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;right - but that is not very useful because if I'm unsure of&lt;br&gt;
&amp;gt;the domain of the correct answer then I still don't know the&lt;br&gt;
&amp;gt;answer! Surely there is a function that can do this properly??&lt;br&gt;
&lt;br&gt;
You haven't defined what you mean by &quot;properly&quot;. k = -1 *is*&lt;br&gt;
a correct answer for the problem you asked Matlab to solve,&lt;br&gt;
int(x,x=0..k)=1/2 . If k &amp;lt; 0 is not feasible for your overall&lt;br&gt;
task then that infeasibility knowledge must come from your knowledge&lt;br&gt;
of the task, not from your asking Matlab to filter out solutions&lt;br&gt;
that it cannot know are wrong because you are unable to tell it what&lt;br&gt;
&quot;wrong&quot; means.&lt;br&gt;
&lt;br&gt;
If you know the valid range of k, then you can add it as an&lt;br&gt;
assumption or you can add the knowledge to the solve() call.&lt;br&gt;
For example in maple directly,&lt;br&gt;
&lt;br&gt;
&amp;gt; solve({int(x,x=0..k)=1/2,k&amp;gt;0});&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{k = 1}&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;I was very young in those days, but I was also rather dim.&quot;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;-- Christopher Priest</description>
    </item>
    <item>
      <pubDate>Thu, 01 May 2008 18:36:03 -0400</pubDate>
      <title>Re: solve equations for integral limits?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168581#429831</link>
      <author>David Doria</author>
      <description>hahahahhaa man oh man - maybe I should write these things&lt;br&gt;
down instead of just thinking about it - looks like I forgot&lt;br&gt;
a minus sign!</description>
    </item>
    <item>
      <pubDate>Fri, 02 May 2008 14:39:20 -0400</pubDate>
      <title>Re: solve equations for integral limits?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168581#429942</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;Walter Roberson&quot; &amp;lt;roberson@ibd.nrc-cnrc.gc.ca&amp;gt; wrote in message &lt;br&gt;
news:fvcv2c$h04$1@canopus.cc.umanitoba.ca...&lt;br&gt;
&amp;gt; In article &amp;lt;fvcopf$mfa$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
&amp;gt; David Doria &amp;lt;daviddoria@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;&amp;gt;syms x k;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;solve('int(x^2,0,k)=2','k')&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;matlab wont run this... why can I not solve that equation??&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I cannot test that myself as the symbolic toolbox isn't available for&lt;br&gt;
&amp;gt; Linux systems.&lt;br&gt;
&lt;br&gt;
Symbolic Math Toolbox is supported on both 32-bit and 64-bit Linux systems, &lt;br&gt;
although the 64-bit Linux support was (if I remember correctly) introduced &lt;br&gt;
only a few releases ago.&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/products/symbolic/requirements.html&quot;&gt;http://www.mathworks.com/products/symbolic/requirements.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
*checking* Yes, it looks like this toolbox was supported on 64-bit Linux &lt;br&gt;
starting with Release R2007a.&lt;br&gt;
&lt;br&gt;
&amp;gt; When, though, I test it in maple directly, maple quickly returns:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; [6^(1/3), ...&lt;br&gt;
&amp;gt; -1/2*6^(1/3)+1/2*I*3^(1/2)*6^(1/3), ...&lt;br&gt;
&amp;gt; -1/2*6^(1/3)-1/2*I*3^(1/2)*6^(1/3)]&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Maple would run the int() before attempting to solve(), so this&lt;br&gt;
&amp;gt; is equivilent to asking maple to solve(k^3/3=2)&lt;br&gt;
&lt;br&gt;
When I used this code in Release R2008a, I received the same result as you &lt;br&gt;
received from Maple:&lt;br&gt;
&lt;br&gt;
syms x k&lt;br&gt;
solve(int(x^2, 0, k)-2, k)&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com </description>
    </item>
    <item>
      <pubDate>Fri, 02 May 2008 16:08:51 -0400</pubDate>
      <title>Re: solve equations for integral limits?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168581#429959</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;fvf92o$n3t$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
Steven Lord &amp;lt;slord@mathworks.com&amp;gt; wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt;&quot;Walter Roberson&quot; &amp;lt;roberson@ibd.nrc-cnrc.gc.ca&amp;gt; wrote in message &lt;br&gt;
&amp;gt;news:fvcv2c$h04$1@canopus.cc.umanitoba.ca...&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; I cannot test that myself as the symbolic toolbox isn't available for&lt;br&gt;
&amp;gt;&amp;gt; Linux systems.&lt;br&gt;
&lt;br&gt;
&amp;gt;&lt;a href=&quot;http://www.mathworks.com/products/symbolic/requirements.html&quot;&gt;http://www.mathworks.com/products/symbolic/requirements.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&amp;gt;*checking* Yes, it looks like this toolbox was supported on 64-bit Linux &lt;br&gt;
&amp;gt;starting with Release R2007a.&lt;br&gt;
&lt;br&gt;
Looking further into ver, it looks like for some reason&lt;br&gt;
we have the R2006b Symbolic and Extended Symbolic toolboxs installed.&lt;br&gt;
Might be an artifact of the initial demo installation process. I'll&lt;br&gt;
ask whether we have the R2007a licenses.&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&quot;I like to build things, I like to do things. I am having&lt;br&gt;
&amp;nbsp;&amp;nbsp;a lot of fun.&quot;                              -- Walter Chrysler</description>
    </item>
  </channel>
</rss>

