Ask Your Question
0

integrate constantly asks for "zero or nonzero"

asked 2024-04-17 02:14:32 +0100

thethinker gravatar image

I've had this problem like several times today, doing integrals of the form

I=1/sqrt(1+(z-z1)^2)
from sage.symbolic.integration.integral import indefinite_integral
indefinite_integral(I,z)

Long error follows, ending with

ValueError: Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(z1>0)', see `assume?` for more details)
Is z1 zero or nonzero?

So I get that Maxima might want to know if z1 happens to be zero, but unfortunately:

", ".join(map(str, maxima("features")._sage_()))
'integer, noninteger, even, odd, rational, irrational, real, imaginary, complex, analytic, increasing, decreasing, oddfun, evenfun, posfun, constant, commutative, lassociative, rassociative, symmetric, antisymmetric, integervalued'

So how am I supposed to tell Maxima this is "nonzero" if....I can't assume something is nonzero?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
5

answered 2024-04-17 02:43:22 +0100

Max Alekseyev gravatar image

assume(z1!=0) will do the job.

edit flag offensive delete link more

Comments

Ok I did swear I tried that....but yes that works, thanks!

thethinker gravatar imagethethinker ( 2024-04-29 17:44:58 +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: 2024-04-17 02:14:32 +0100

Seen: 158 times

Last updated: Apr 17