Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Just a first step:

var('x1 x2 v1 v2')

xmin = -2
xmax = 3
ymin = -2
ymax = 2

E1=vector([x1,x2])/(sqrt(x1^2+x2^2))^3
E2=E1.subs(x1=x1-1)
E= E1-E2

limit = 0.8
EE = (lambda x,y: norm(E(x,y)) < limit and E(x,y)[0] or 0,lambda x,y: norm(E(x,y)) < limit and E(x,y)[1] or 0)
vector_field = plot_vector_field(EE,(x1,xmin,xmax),(x2,ymin,ymax))
vector_field.show()

output