First time here? Check out the FAQ!

Ask Your Question
1

exponential inequality

asked 7 years ago

soking gravatar image

updated 7 years ago

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.

Preview: (hide)

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 ( 7 years ago )

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

soking gravatar imagesoking ( 7 years ago )

1 Answer

Sort by » oldest newest most voted
2

answered 7 years ago

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)
Preview: (hide)
link

Comments

Great, it works. Thanks a lot.

soking gravatar imagesoking ( 7 years ago )

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: 7 years ago

Seen: 917 times

Last updated: May 25 '17