ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 25 May 2017 05:40:59 -0500exponential inequalityhttp://ask.sagemath.org/question/37692/exponential-inequality/Hi all, I am trying to solve, using sage, the inequality `exp(x) >= 5`, but this is what I get
sage: solve(exp(x)>=5,x)
#0: solve_rat_ineq(ineq=%e^_SAGE_VAR_x >= 5)
[[e^x - 5 == 0], [e^x - 5 > 0]]
Can anyone tell me what's wrong and how to solve this kind of inequalities?
Thanks
sorry for the presentation of the code, I am new on this plateform.Thu, 25 May 2017 02:56:44 -0500http://ask.sagemath.org/question/37692/exponential-inequality/Comment by soking for <p>Hi all, I am trying to solve, using sage, the inequality <code>exp(x) >= 5</code>, but this is what I get </p>
<pre><code>sage: solve(exp(x)>=5,x)
#0: solve_rat_ineq(ineq=%e^_SAGE_VAR_x >= 5)
[[e^x - 5 == 0], [e^x - 5 > 0]]
</code></pre>
<p>Can anyone tell me what's wrong and how to solve this kind of inequalities?</p>
<p>Thanks</p>
<p>sorry for the presentation of the code, I am new on this plateform.</p>
http://ask.sagemath.org/question/37692/exponential-inequality/?comment=37694#post-id-37694ok, thanks for the comment, but I still don't have an answer to my question^^Thu, 25 May 2017 03:39:00 -0500http://ask.sagemath.org/question/37692/exponential-inequality/?comment=37694#post-id-37694Comment by tmonteil for <p>Hi all, I am trying to solve, using sage, the inequality <code>exp(x) >= 5</code>, but this is what I get </p>
<pre><code>sage: solve(exp(x)>=5,x)
#0: solve_rat_ineq(ineq=%e^_SAGE_VAR_x >= 5)
[[e^x - 5 == 0], [e^x - 5 > 0]]
</code></pre>
<p>Can anyone tell me what's wrong and how to solve this kind of inequalities?</p>
<p>Thanks</p>
<p>sorry for the presentation of the code, I am new on this plateform.</p>
http://ask.sagemath.org/question/37692/exponential-inequality/?comment=37693#post-id-37693Instead of starting the lines of coes with `>`, you just have to start each line with 4 spaces. This can be done automatically by selecting your code bloc with the mouse/trackpad and then click on the 101010 icon.Thu, 25 May 2017 03:22:02 -0500http://ask.sagemath.org/question/37692/exponential-inequality/?comment=37693#post-id-37693Answer by tmonteil for <p>Hi all, I am trying to solve, using sage, the inequality <code>exp(x) >= 5</code>, but this is what I get </p>
<pre><code>sage: solve(exp(x)>=5,x)
#0: solve_rat_ineq(ineq=%e^_SAGE_VAR_x >= 5)
[[e^x - 5 == 0], [e^x - 5 > 0]]
</code></pre>
<p>Can anyone tell me what's wrong and how to solve this kind of inequalities?</p>
<p>Thanks</p>
<p>sorry for the presentation of the code, I am new on this plateform.</p>
http://ask.sagemath.org/question/37692/exponential-inequality/?answer=37695#post-id-37695You can use `sympy`:
sage: import sympy
sage: x = sympy.Symbol('x')
sage: ineq = sympy.exp(x) >= 5
sage: ineq
exp(x) >= 5
sage: type(ineq)
<class 'sympy.core.relational.StrictGreaterThan'>
sage: sympy.solve_univariate_inequality(ineq,x)
And(log(5) <= x, x < oo)
Thu, 25 May 2017 03:50:40 -0500http://ask.sagemath.org/question/37692/exponential-inequality/?answer=37695#post-id-37695Comment by soking for <p>You can use <code>sympy</code>:</p>
<pre><code>sage: import sympy
sage: x = sympy.Symbol('x')
sage: ineq = sympy.exp(x) >= 5
sage: ineq
exp(x) >= 5
sage: type(ineq)
<class 'sympy.core.relational.StrictGreaterThan'>
sage: sympy.solve_univariate_inequality(ineq,x)
And(log(5) <= x, x < oo)
</code></pre>
http://ask.sagemath.org/question/37692/exponential-inequality/?comment=37696#post-id-37696Great, it works. Thanks a lot.Thu, 25 May 2017 05:40:59 -0500http://ask.sagemath.org/question/37692/exponential-inequality/?comment=37696#post-id-37696