Ask Your Question
0

Solve command with assumptions

asked 2025-09-03 00:43:57 +0200

Hi,

I'm trying to solve the following inequality $$ ce ^{-kt} - 1 < 0 $$ where, c and k are positive real numbers.

Expected result is $$ t < -\frac{1}{k} \ln({\frac{1}{c})} $$

But sage is returning $$ -c + e^{kt} > 0 $$

Code is as follows:

c, k = var('c k')
assume(c > 0, k > 0)
eq3 = (c*e^(-k*t)) -1 < 0
solve(eq3, t)

Is there something wrong with my code? Thanks in advance.

edit retag flag offensive close merge delete

Comments

"Expected result" has wrong inequality sign.

Max Alekseyev gravatar imageMax Alekseyev ( 2025-09-03 21:43:13 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2025-09-04 00:16:15 +0200

Emmanuel Charpentier gravatar image

"Manual" (and atrociously heavy) solution :

(foo:=(((((c*e^(-k*t))-1)/c).expand()<0)+1/c)).operator()(*map(lambda u:lo
....: g(u).log_expand(), foo.operands()))/-k
t < log(c)/k

HTH (but doubting it),

edit flag offensive delete link more

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: 2025-09-03 00:43:57 +0200

Seen: 14 times

Last updated: 44 mins ago