integral command fails: copy, paste and run. Then exchange m(x,y) and n(x,y) and rerun. I get Maxima error

asked 2017-10-29 17:54:06 +0200

meirsamel gravatar image

updated 2017-10-29 19:06:00 +0200

show("G.2.a singularity across sinks and swirls from Mathematica Text")

show("second try to enter workable code that can be copied, pasted and run")

var('y a b q t r')




replacments get Maxima error in integrate command



I have other examples of m(x,y) and n(x,y) that fail







show("singularity=(a,b), when a==x and b==y")


show("constructing small circle centered at singularity (a,b) with radius 'r'")

show("aiming to determine if the singularity is a source of flow, sink or neither")







show("xrprime(t)=",xrprime(t)," = derivative(xr(t),t)")

show("yrprime(t)=",yrprime(t)," = derivative(yr(t),t)")


show("measure flow across the circle surrounding the singularity")

show("integral=integral(-n(xr(t),yr(t)) * xrprime(t)+m(xr(t),yr(t)) * yrprime(t),(t,0,2*pi))")

integral=integral(-n(xr(t),yr(t)) * xrprime(t)+m(xr(t),yr(t)) * yrprime(t),(t,0,2*pi))


show("q>0 then singularity at (a,b) is a source of flow ")

show("q<0 then singularity at (a,b) is a sink for flow")

show("q=0 then no net flow at singularity (a,b)")


show("now try to run the above with the replacement m(x,y), n(x,y) :")

show("I get an error in Maxima, see below")

show("these m(x,y) and n(x,y) do not work for me")



show("In sage I get RuntimeError: ECL says: Error executing code in Maxima: atanh: argument 1 isn't in the")

show("domain of atanh.")

show("Mathematica's correct answer is: integral=flow=10pisqrt(r^2)")

show("thank you")

edit retag flag offensive close merge delete


This the same as

isn't it?

  • Please never post again the same question in a different place (with a different name). Edit first post.
  • Please formulate the question directly to the point. Just give the integral that is not evaluated.
  • Using the variable $r$ "as a human" does not mean that maxima or some other symbolic engine also assumes it is a (non-zero) real number.
  • sage as many other computer algebra systems is not the solution to all mathematical problems, at least i do not expect so. A good ratio of human interaction is always welcome. So why not help help the machine?
  • Never redefine an existing funciton, e.g. integral. (Except you know what you are doing...)
dan_fulea gravatar imagedan_fulea ( 2017-10-29 19:02:26 +0200 )edit

dan; I do not know how to write the integral that is not evaluated, that is; how to plug in (what is plugged in) into the mix,m(x,y) and n(x,y) terms in the integral command. Mathematica handles the problem and sage does not in the way I wrote the code. I assume my code is at fault ;but do not know where. I lost my Mathematica when I went to a 64 bit machine and too expensive to buy again on SS pension; hence I am learning sage. I am not a mathematician. I am nearly 80 and math is a hobby. So, perhaps I don't know what I am doing. If I did I maybe I would not need 'ask.sagemath

meirsamel gravatar imagemeirsamel ( 2017-10-29 19:47:05 +0200 )edit

I did not know about reposting. I used no other name. I did not know how to write sage code for predator/model and I came to ask.sagemath and now I know.

meirsamel gravatar imagemeirsamel ( 2017-10-29 19:52:43 +0200 )edit