I want to plot the field lines of an electric field, take for example that of an electric dipole. How can I do this in sage?

1 | initial version |

I want to plot the field lines of an electric field, take for example that of an electric dipole. How can I do this in sage?

2 | reformulation of the question in mathematical terms |

I want to plot the field lines of an electric field, take for example that of an electric dipole. How can I do this in sage?

**Edit**: Perhaps my question was formulated too much in physicist slang... Mathematically I just want to plot the integral curves of a vector field.

3 | No.3 Revision |

**Edit**: Perhaps my question was formulated too much in physicist slang... Mathematically I just want to plot the integral curves of a vector ~~field.~~field for example: let $\vec{r}(x,y) = (x,y)$, $\vec{E_1} = \frac{\vec{r}}{|r|^{\frac{3}{2}}}$ and $\vec{E_2}(x,y) = \vec{E_1}(x-1,y)$

Then I want to plot the field lines of $\vec{E} = \vec{E_1} + \vec{E_2}$

4 | added image |

**Edit**: Perhaps my question was formulated too much in physicist slang... Mathematically I just want to plot the integral curves of a vector field for example: let $\vec{r}(x,y) = (x,y)$, $\vec{E_1} = \frac{\vec{r}}{|r|^{\frac{3}{2}}}$ and $\vec{E_2}(x,y) = \vec{E_1}(x-1,y)$

Then I want to plot the field lines of $\vec{E} = \vec{E_1} + \vec{E_2}$

The field line plot should look similar to this one:

5 | fixed some typos in the example |

**Edit**: Perhaps my question was formulated too much in physicist slang... Mathematically I just want to plot the integral curves of a vector field for example: let $\vec{r}(x,y) = (x,y)$, $\vec{E_1} = ~~\frac{\vec{r}}{|r|^{\frac{3}{2}}}$ ~~\frac{\vec{r}}{|r|^{3}}$ and $\vec{E_2}(x,y) = \vec{E_1}(x-1,y)$

Then I want to plot the field lines of $\vec{E} = \vec{E_1} ~~+ ~~- \vec{E_2}$

The field line plot should look similar to this one:

6 | No.6 Revision |

**Edit**: Perhaps my question was formulated too much in physicist slang... Mathematically I just want to plot the integral curves of a vector field for example: let $\vec{r}(x,y) = (x,y)$, $\vec{E_1} = \frac{\vec{r}}{|r|^{3}}$ and $\vec{E_2}(x,y) = \vec{E_1}(x-1,y)$

Then I want to plot the field lines of $\vec{E} = \vec{E_1} - \vec{E_2}$

The field line plot should look similar to this one:

I think in mathematica this is called a stream plot: http://reference.wolfram.com/mathematica/ref/StreamPlot.html

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.