# Revision history [back]

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

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')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

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

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')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

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

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')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------") show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" """ replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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))

yrprime(t),(t,0,2*pi)) show("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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")

""" when you copy and paste you or at least I have to edit the lines

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("integral=",integral)

for some reason 'ask sagemath deletes the multiply sign * and writes

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("integral=",integral)

a puzzle to me

"""

var('y a b q t r')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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")

""" """

when you copy and paste you or at least I have to edit the lines

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("integral=",integral)

for some reason 'ask sagemath deletes the multiply sign * and writes

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("integral=",integral)

a puzzle to me

"""

var('y a b q t r')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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)) yrprime(t),(t,0,2*pi))

show("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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")

"""

when you copy and paste you or at least I have to edit the lines

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("integral=",integral)

for some reason 'ask sagemath deletes the multiply sign * and writes

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("integral=",integral)

a puzzle to me

"""

var('y a b q t r')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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")

"""

when you copy and paste you or at least I have to edit the lines

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("integral=",integral)

for some reason 'ask sagemath 'asksagemath deletes the multiply sign * and writes

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("integral=",integral)

a puzzle to me

"""

var('y a b q t r')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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")

"""

""" when you copy and paste you or at least I have to edit the lines

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("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("integral=",integral)

for some reason 'asksagemath 'ask sagemath deletes the multiply sign * and writes

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("integral=",integral)

a puzzle to me

"""

var('y a b q t r')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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))yrprime(t),(t,0,2*pi))

show("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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")

""" when you copy and paste you or at least I have to edit the lines

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("integral=",integral)

for some reason 'ask sagemath deletes the multiply sign * and writes

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("integral=",integral)

a puzzle to me

"""

var('y a b q t r')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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

show("add multp symbols in front of the xprime and yprime. asksage is dropping them every time I edit")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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")

""" show("on line 77 asksage drops the mulp symbols in front of the xprime and yprime")

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

show("you have to go in and manually correct to:")

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

""" when you copy and paste you or at least I have to edit the lines

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("integral=",integral)

for some reason 'ask sagemath deletes the multiply sign * and writes

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("integral=",integral)

a puzzle to me

"""

var('y a b q t r')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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

show("add multp symbols in front of the xprime and yprime. asksage is dropping them every time I edit")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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")

show("on line 77 asksage drops the mulp symbols in front of the xprime and yprime")

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

show("you have to go in and manually correct to:")

integral=integral(-n(xr(t),yr(t))xrprime(t)+m(xr(t),yr(t))yrprime(t),(t,0,2*pi))put in the multp symbol * in front of the xprime and yprime:")

""" when you copy and paste you or at least I have to edit the lines

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("integral=",integral)

for some reason 'ask sagemath deletes the multiply sign * and writes

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("integral=",integral)

a puzzle to me

"""

var('y a b q t r')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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

show("add multp symbols in front of the xprime and yprime. asksage is dropping them every time I edit")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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")

show("on line 77 asksage drops the mulp mulpt symbols in front of the xprime and yprime")

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

show("you have to go in and manually put in the multp symbol * in front of the xprime and yprime:")

""" show("see below")

"""

when you copy and paste you or at least I have to edit the lines

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("integral=",integral)

for some reason 'ask sagemath deletes the multiply sign * and writes

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("integral=",integral)

a puzzle to me

"""

var('y a b q t r')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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

show("add multp symbols in front of the xprime and yprime. asksage is dropping them every time I edit")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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")

show("on line 77 asksage drops the mulpt symbols in front of the xprime and yprime")

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

show("you have to go in and manually put in the multp symbol * in front of the xprime and yprime:")

show("see below")

"""

when you copy and paste you or at least I have to edit the lines

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("integral=",integral)

for some reason 'ask sagemath deletes the multiply sign * and writes

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("integral=",integral)

a puzzle to me

"""

var('y a b q t r')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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

show("add multp symbols in front of the xprime and yprime. asksage is dropping them every time I edit")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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")

"""

when you copy and paste you or at least I have to edit the lineslines 78 and 79

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("integral=",integral)

for some reason 'ask sagemath deletes 'word' drops the multiply sign * and writes

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("integral=",integral)

a puzzle to me

Even in these comment lines asksage word drops the mulpt symbol in front of xprime and yprime

"""

var('y a b q t r')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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

show("add multp symbols in front of the xprime and yprime. asksage is dropping them every time I edit")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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")

"""

when you copy and paste you or at least I have to edit the lines 78 and 7980 81

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("integral=",integral)

for some reason 'ask sagemath 'word' drops the multiply sign * and writes

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("integral=",integral)

a puzzle to me

Even in these comment lines asksage word drops the mulpt symbol in front of xprime and yprime

"""

var('y a b q t r')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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

show("add multp symbols in front of the xprime and yprime. asksage is dropping them every time I edit")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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")

"""

when you copy and paste you or at least I have to edit the lines 80 81

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("integral=",integral)

for some reason 'ask sagemath 'word' drops the multiply sign * and writes

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("integral=",integral)

a puzzle to me

Even in these comment lines asksage word drops the mulpt symbol in front of xprime and yprime

"""

var('y a b q t r')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

""" replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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

show("add multp symbols in front of the xprime and yprime. asksage is dropping them every time I edit")

show("integral=integral(-n(xr(t),yr(t))xrprime(t)+m(xr(t),yr(t))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))integral=integral(-n(xr(t),yr(t)) * xrprime(t)+m(xr(t),yr(t)) * yrprime(t),(t,0,2*pi))

show("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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")

"""

when you copy and paste you or at least I have to edit the lines 80 81

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("integral=",integral)

for some reason 'ask sagemath 'word' drops the multiply sign * and writes

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("integral=",integral)

a puzzle to me

Even in these comment lines asksage word drops the mulpt symbol in front of xprime and yprime

"""

var('y a b q t r')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

"""

replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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

show("add multp symbols in front of the xprime and yprime. asksage is dropping them every time I edit")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

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

"""

replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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

show("add multp symbols in front of the xprime and yprime. asksage is dropping them every time I edit")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

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

"""

replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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

show("add multp symbols in front of the xprime and yprime. asksage is dropping them every time I edit")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

"""

replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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

show("add multp symbols in front of the xprime and yprime. asksage is dropping them every time I edit")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

"""

replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

"""

replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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

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

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

show("domain of atanh.")

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

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')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

"""

replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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")

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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("integral=",integral)

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("----------------")

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")

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)show("m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)")

show("n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)")

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

show("domain of atanh.")

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

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')

m(x,y)=q*(x-a)/((x-a)^2+(y-b)^2)

n(x,y)=q*(y-b)/((x-a)^2+(y-b)^2)

"""

replacments get Maxima error in integrate command

m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)

n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)

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

"""

show("n(x,y)=",n(x,y))

show("Field(x,y)=(m(x,y),n(x,y))")

Field=(m(x,y),n(x,y))

show("Field=",Field)

singularity=(a,b)

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

show("----------------")

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")

xr(t)=singularity[0]+r*cos(t)

yr(t)=singularity[1]+r*sin(t)

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

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

xrprime(t)=diff(xr(t),t)

yrprime(t)=diff(yr(t),t)

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

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

show("----------------")

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("integral=",integral)

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("----------------")

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("m(x,y)=5*(x-a)/sqrt((x-a)^2+(y-b)^2)")

show("n(x,y)=5*(y-b)/sqrt((x-a)^2+(y-b)^2)")

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

show("domain of atanh.")