1
$\begingroup$
Clear["Global'*"]
dipole = 1/Sqrt[(x - .5)^2 + y^2] - 1/Sqrt[(x - .5)^2 + y^2];
plot1 = VectorPlot[{x/CubeRoot[(x - .5)^2 + y^2], y/
    CubeRoot[(x - .5)^2 + y^2]},
   {x, -3, 3}, {y, -3, 3}, VectorPoints \[RightArrow] 8, 
   VectorScale \[RightArrow] Small];
plot2 = CoutourPlot[dipole, {x, -3, 3}, {y, -3, 3},
   CoutourShading \[RightArrow] False, 
   DisplayFunction \[RightArrow] Identity,
   PlotPoints \[RightArrow] 20, Contours \[RightArrow] 5];
Show[{plot1, plot2}],
Epilog \[RightArrow] {{Rue[0.3], Disk[{.5, 0}, 0.1]},
  {Rue[0.95], Disk[{.5, 0}, 0.1]}},
DisplayFunction \[RightArrow] $DisplayFunction

This returns the error: "VectorPlot: Options expected beyond position 3." I'm not 100% sure what I did wrong (this is my first time using Mathematica), and I'd appreciate some help!

$\endgroup$

closed as off-topic by m_goldberg, Henrik Schumacher, Sektor, Brett Champion, bbgodfrey Nov 9 '18 at 5:49

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – m_goldberg, Henrik Schumacher, Sektor, Brett Champion, bbgodfrey
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    $\begingroup$ Replace \[RightArrow]s with ->? $\endgroup$ – kglr Nov 7 '18 at 21:01
1
$\begingroup$
V = 1/Sqrt[(x - .5)^2 + y^2] - 
  1/Sqrt[(x + .5)^2 + y^2]; EV = -Grad[V, {x, y}];

plot1 = VectorPlot[{(-0.5` + x)/((-0.5` + x)^2 + y^2)^(3/2) - (
     0.5` + x)/((0.5` + x)^2 + y^2)^(3/2), 
    y/((-0.5` + x)^2 + y^2)^(3/2) - y/((0.5` + x)^2 + y^2)^(
     3/2)}, {x, -3, 3}, {y, -3, 3}, StreamPoints -> Fine, 
   VectorPoints -> Fine, StreamStyle -> LightGray];
plot2 = ContourPlot[
   1/Sqrt[(x - .5)^2 + y^2] - 1/Sqrt[(x + .5)^2 + y^2], {x, -2, 
    2}, {y, -2, 2}, Contours -> 120, 
   ColorFunction -> "BlueGreenYellow", PlotRange -> {-10, 10}];
Show[{plot2, plot1, 
  Graphics[{{Hue[0.3], Disk[{.5, 0}, 0.1]}, {Hue[0.95], 
     Disk[{-.5, 0}, 0.1]}}]}]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.