Ask Your Question
1

Logarithms and desolve

asked 2015-12-14 15:41:29 +0100

AndersM gravatar image

updated 2015-12-16 20:48:46 +0100

More questions about desolve results: Using

 y = function('y', x)
desolve(diff(y,x) == y*(100-y), y)

results in the solution:

-1/100*log(y(x) - 100) + 1/100*log(y(x)) == _C + x

But that solution does not work for y<100. But it is correct if you assume that it should be log(abs(y(x)-100)) in the first term. Is the abs() implicit?

(The log terms actually comes from the integral of 1/y and 1/(100-y) so it should be absolute values.)

edit retag flag offensive close merge delete

Comments

1

Testing:

assume(x<0)

integral(1/x,x)

And the result is log(x). Hm...

AndersM gravatar imageAndersM ( 2015-12-16 20:51:09 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-12-17 04:29:06 +0100

kcrisman gravatar image

updated 2015-12-17 18:33:24 +0100

log is a multivalued function. Most CASes will return log(x) and not log(abs(x)) as the antiderivative of 1/x. So that is probably the situation here - it is true in the multivalued sense?

Edit: here's how to set that maxima variable - but you have to do it in the "calculus" copy of Maxima inside Sage.

sage: integral(1/x,x)
log(x)
sage: maxima.eval(" logabs:true")
'true'
sage: integral(1/x,x)
log(x)
sage: maxima_calculus.eval(" logabs:true")
'true'
sage: integral(1/x,x)
log(abs(x))
edit flag offensive delete link more

Comments

I found that it is possible to set a option variable in Maxima to get the log(abs(x)) answer when doing integrals http://maxima.sourceforge.net/docs/ma... . Can you set that variable to True in Sage.

AndersM gravatar imageAndersM ( 2015-12-17 09:36:44 +0100 )edit

Thanks! It even worked in Sage Cell Server.

AndersM gravatar imageAndersM ( 2015-12-17 19:19:28 +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: 2015-12-14 15:41:29 +0100

Seen: 733 times

Last updated: Dec 17 '15