<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, if statement: Error, cannot determine if this expression is true or false</title>
    <link>http://www.mapleprimes.com/questions/141085-If-Statement-Error-Cannot-Determine</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 11:14:09 GMT</lastBuildDate>
    <pubDate>Tue, 09 Jun 2026 11:14:09 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, if statement: Error, cannot determine if this expression is true or false</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, if statement: Error, cannot determine if this expression is true or false</title>
      <link>http://www.mapleprimes.com/questions/141085-If-Statement-Error-Cannot-Determine</link>
    </image>
    <item>
      <title>if condition</title>
      <link>http://www.mapleprimes.com/questions/141085-If-Statement-Error-Cannot-Determine?ref=Feed:MaplePrimes:if statement: Error, cannot determine if this expression is true or false:Comments#answer141087</link>
      <itunes:summary>&lt;p&gt;It works after replacing U(tk) &amp;lt;= 4 by is (U(tk) - 4 &amp;lt;= 0).&lt;/p&gt;
&lt;p&gt;PS. See &lt;a href="http://www.mapleprimes.com/maplesoftblog/102311-More-Gems-From-The-Little-Red-Book-Of-Maple-Magic"&gt;http://www.mapleprimes.com/maplesoftblog/102311-More-Gems-From-The-Little-Red-Book-Of-Maple-Magic&lt;/a&gt; .&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;It works after replacing U(tk) &amp;lt;= 4 by is (U(tk) - 4 &amp;lt;= 0).&lt;/p&gt;
&lt;p&gt;PS. See &lt;a href="http://www.mapleprimes.com/maplesoftblog/102311-More-Gems-From-The-Little-Red-Book-Of-Maple-Magic"&gt;http://www.mapleprimes.com/maplesoftblog/102311-More-Gems-From-The-Little-Red-Book-Of-Maple-Magic&lt;/a&gt; .&lt;/p&gt;</description>
      <guid>141087</guid>
      <pubDate>Tue, 04 Dec 2012 10:45:07 Z</pubDate>
      <itunes:author>Markiyan Hirnyk</itunes:author>
      <author>Markiyan Hirnyk</author>
    </item>
    <item>
      <title>U not known</title>
      <link>http://www.mapleprimes.com/questions/141085-If-Statement-Error-Cannot-Determine?ref=Feed:MaplePrimes:if statement: Error, cannot determine if this expression is true or false:Comments#answer141094</link>
      <itunes:summary>&lt;p&gt;U as such is not known ever, but V is defined to be the value of U at tk. &lt;br&gt;Change 'if U(tk) &amp;lt;=4 to 'V &amp;lt;= 4 &amp;acute;. &lt;br&gt;&lt;br&gt;restart;&lt;br&gt;k := 0; B[1] := 0.001/365; B[2] :=0.002/365:&lt;br&gt;ode := diff(U(t), t) = -(A[1]+A[2]*U(t))*U(t);&lt;br&gt;ic[0] := U(365*k) = 1000;&lt;br&gt;sol[0] := dsolve({ic[0], subs(A[1] = B[1], A[2] = B[2], ode)}, U(t), numeric);&lt;br&gt;sigma := .5;&lt;br&gt;for k to 4 do &lt;br&gt;tk := 365*k; &lt;br&gt;V := rhs(sol[k-1](tk)[2]); &lt;br&gt;if&amp;nbsp; V &amp;lt;= 4 then ic[k] := U(tk) =0&lt;br&gt;else ic[k] := U(tk) = sigma*V&lt;br&gt;end if; &lt;br&gt;sol[k] := dsolve({ic[k], subs(A[1] = B[1], A[2] = B[2], ode)}, U(t), numeric)&lt;br&gt;end do;&lt;br&gt;&lt;br&gt;#Plot:&lt;br&gt;&lt;br&gt;for k to 5 do p[k-1]:=plots:-odeplot(sol[k-1],[t,U(t)],365*(k-1)..365*k) end do:&lt;br&gt;plots:-display(seq(p[k],k=0..4),thickness=2);&lt;br&gt;&lt;br&gt;To see the effect of the 'if' clause you can replace the 4 by e.g. 40.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;U as such is not known ever, but V is defined to be the value of U at tk. &lt;br&gt;Change 'if U(tk) &amp;lt;=4 to 'V &amp;lt;= 4 &amp;acute;. &lt;br&gt;&lt;br&gt;restart;&lt;br&gt;k := 0; B[1] := 0.001/365; B[2] :=0.002/365:&lt;br&gt;ode := diff(U(t), t) = -(A[1]+A[2]*U(t))*U(t);&lt;br&gt;ic[0] := U(365*k) = 1000;&lt;br&gt;sol[0] := dsolve({ic[0], subs(A[1] = B[1], A[2] = B[2], ode)}, U(t), numeric);&lt;br&gt;sigma := .5;&lt;br&gt;for k to 4 do &lt;br&gt;tk := 365*k; &lt;br&gt;V := rhs(sol[k-1](tk)[2]); &lt;br&gt;if&amp;nbsp; V &amp;lt;= 4 then ic[k] := U(tk) =0&lt;br&gt;else ic[k] := U(tk) = sigma*V&lt;br&gt;end if; &lt;br&gt;sol[k] := dsolve({ic[k], subs(A[1] = B[1], A[2] = B[2], ode)}, U(t), numeric)&lt;br&gt;end do;&lt;br&gt;&lt;br&gt;#Plot:&lt;br&gt;&lt;br&gt;for k to 5 do p[k-1]:=plots:-odeplot(sol[k-1],[t,U(t)],365*(k-1)..365*k) end do:&lt;br&gt;plots:-display(seq(p[k],k=0..4),thickness=2);&lt;br&gt;&lt;br&gt;To see the effect of the 'if' clause you can replace the 4 by e.g. 40.&lt;/p&gt;</description>
      <guid>141094</guid>
      <pubDate>Tue, 04 Dec 2012 20:13:52 Z</pubDate>
      <itunes:author>Preben Alsholm</itunes:author>
      <author>Preben Alsholm</author>
    </item>
    <item>
      <title>FAIL</title>
      <link>http://www.mapleprimes.com/questions/141085-If-Statement-Error-Cannot-Determine?ref=Feed:MaplePrimes:if statement: Error, cannot determine if this expression is true or false:Comments#comment141095</link>
      <itunes:summary>&lt;p&gt;U is not known. The output from is(U(tk)-4&amp;lt;=0) is FAIL (try inserting a print(is(U(tk)-4&amp;lt;=0));&amp;nbsp; ).&lt;/p&gt;
&lt;p&gt;Notice the result of&lt;/p&gt;
&lt;p&gt;if FAIL then F else G end if;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;U is not known. The output from is(U(tk)-4&amp;lt;=0) is FAIL (try inserting a print(is(U(tk)-4&amp;lt;=0));&amp;nbsp; ).&lt;/p&gt;
&lt;p&gt;Notice the result of&lt;/p&gt;
&lt;p&gt;if FAIL then F else G end if;&lt;/p&gt;</description>
      <guid>141095</guid>
      <pubDate>Tue, 04 Dec 2012 20:17:59 Z</pubDate>
      <itunes:author>Preben Alsholm</itunes:author>
      <author>Preben Alsholm</author>
    </item>
    <item>
      <title>You are right</title>
      <link>http://www.mapleprimes.com/questions/141085-If-Statement-Error-Cannot-Determine?ref=Feed:MaplePrimes:if statement: Error, cannot determine if this expression is true or false:Comments#comment141097</link>
      <itunes:summary>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/141085-If-Statement-Error-Cannot-Determine#comment141095"&gt;@Preben Alsholm&lt;/a&gt; Many thanks from me to you for the indication.&amp;nbsp; &lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/141085-If-Statement-Error-Cannot-Determine#comment141095"&gt;@Preben Alsholm&lt;/a&gt; Many thanks from me to you for the indication.&amp;nbsp; &lt;/p&gt;</description>
      <guid>141097</guid>
      <pubDate>Tue, 04 Dec 2012 21:07:09 Z</pubDate>
      <itunes:author>Markiyan Hirnyk</itunes:author>
      <author>Markiyan Hirnyk</author>
    </item>
    <item>
      <title>@Markiyan Hirnyk&amp;nbsp;
Thank you</title>
      <link>http://www.mapleprimes.com/questions/141085-If-Statement-Error-Cannot-Determine?ref=Feed:MaplePrimes:if statement: Error, cannot determine if this expression is true or false:Comments#comment141126</link>
      <itunes:summary>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/141085-If-Statement-Error-Cannot-Determine#comment141097"&gt;@Markiyan Hirnyk&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/141085-If-Statement-Error-Cannot-Determine#comment141097"&gt;@Markiyan Hirnyk&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;</description>
      <guid>141126</guid>
      <pubDate>Wed, 05 Dec 2012 11:45:16 Z</pubDate>
      <itunes:author>reemeaaaah</itunes:author>
      <author>reemeaaaah</author>
    </item>
    <item>
      <title>Don't</title>
      <link>http://www.mapleprimes.com/questions/141085-If-Statement-Error-Cannot-Determine?ref=Feed:MaplePrimes:if statement: Error, cannot determine if this expression is true or false:Comments#comment141127</link>
      <itunes:summary>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/141085-If-Statement-Error-Cannot-Determine#comment141126"&gt;@reemeaaaah&lt;/a&gt; mention it.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/141085-If-Statement-Error-Cannot-Determine#comment141126"&gt;@reemeaaaah&lt;/a&gt; mention it.&lt;/p&gt;</description>
      <guid>141127</guid>
      <pubDate>Wed, 05 Dec 2012 12:54:11 Z</pubDate>
      <itunes:author>Markiyan Hirnyk</itunes:author>
      <author>Markiyan Hirnyk</author>
    </item>
  </channel>
</rss>