level 2
星尘日落🌙💫🌟
楼主
Clear["Global`*"]
V[x_, y_] := {Integrate[\[Lambda]/Sqrt[(x - l)^2 + y^2],
l] /. {l -> L}} - {Integrate[\[Lambda]/Sqrt[(x - l)^2 + y^2],
l] /. {l -> -L}}
Ex[x_, y_] = -Div[V[x, y], x] // Simplify
Ey[x_, y_] = -Div[V[x, y], y] // Simplify
L := 1; \[Lambda] := 1;
P=ContourPlot[V[x, y], {x, -5, 5}, {y, -5, 5}, Contours -> 10,AxesLabel->Automatic]
G=VectorPlot[{Ex[x, y],Ey[x, y]},{x, -5, 5}, {y, -5, 5}]
Show[P,G]

2024年03月15日 02点03分
1
V[x_, y_] := {Integrate[\[Lambda]/Sqrt[(x - l)^2 + y^2],
l] /. {l -> L}} - {Integrate[\[Lambda]/Sqrt[(x - l)^2 + y^2],
l] /. {l -> -L}}
Ex[x_, y_] = -Div[V[x, y], x] // Simplify
Ey[x_, y_] = -Div[V[x, y], y] // Simplify
L := 1; \[Lambda] := 1;
P=ContourPlot[V[x, y], {x, -5, 5}, {y, -5, 5}, Contours -> 10,AxesLabel->Automatic]
G=VectorPlot[{Ex[x, y],Ey[x, y]},{x, -5, 5}, {y, -5, 5}]
Show[P,G]
