Ask Your Question
1

exponential inequality

asked 2017-05-25 09:56:44 +0100

soking gravatar image

updated 2017-05-25 10:37:54 +0100

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.

edit retag flag offensive close merge delete

Comments

Instead 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.

tmonteil gravatar imagetmonteil ( 2017-05-25 10:22:02 +0100 )edit

ok, thanks for the comment, but I still don't have an answer to my question^^

soking gravatar imagesoking ( 2017-05-25 10:39:00 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-05-25 10:50:40 +0100

tmonteil gravatar image

You 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)
edit flag offensive delete link more

Comments

Great, it works. Thanks a lot.

soking gravatar imagesoking ( 2017-05-25 12:40:59 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-05-25 09:56:44 +0100

Seen: 775 times

Last updated: May 25 '17