ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 11 Nov 2021 00:38:22 +0100Solving an inequality over the natural numbershttps://ask.sagemath.org/question/59665/solving-an-inequality-over-the-natural-numbers/I am trying to find the smallest natural number k such that exp(k)+exp(-k)>193875.
Here's my code:
k = var('k')
assume(k, 'integer')
assume(k>0)
S = solve(exp(k)+exp(-k) > 193875, k)
S
Unfortunately, the output is [[e^(2*k) - 193875*e^k + 1 > 0]]
What can I do to solve this inequality?Tue, 09 Nov 2021 21:13:53 +0100https://ask.sagemath.org/question/59665/solving-an-inequality-over-the-natural-numbers/Answer by Max Alekseyev for <p>I am trying to find the smallest natural number k such that exp(k)+exp(-k)>193875.</p>
<p>Here's my code:</p>
<p>k = var('k')</p>
<p>assume(k, 'integer')</p>
<p>assume(k>0)</p>
<p>S = solve(exp(k)+exp(-k) > 193875, k)</p>
<p>S</p>
<p>Unfortunately, the output is [[e^(2<em>k) - 193875</em>e^k + 1 > 0]]</p>
<p>What can I do to solve this inequality?</p>
https://ask.sagemath.org/question/59665/solving-an-inequality-over-the-natural-numbers/?answer=59683#post-id-59683It's $\lceil\log(193875)\rceil=13$.Thu, 11 Nov 2021 00:38:22 +0100https://ask.sagemath.org/question/59665/solving-an-inequality-over-the-natural-numbers/?answer=59683#post-id-59683