Plotting 1/r^2 vector field in Maple 14

1 reply · 3K views · last reply
misterpickle
Messages
9
Reaction score
0

Homework Statement


I want to plot the following function into Maple14. [tex]\vec{v}=frac{1}{\vec{r^{2}}} \hat{r}[/tex]

**In case the latex is screwed this says v=r^(-2) *r-hat

The Attempt at a Solution


My code for Maple is the following, but it doesn't seem to work.restart; with(LinearAlgebra); with(VectorCalculus); with(plots);

SetCoordinates('cartesian'[x, y, z]);

vec := Vectorfield(<1/x^2, 1/y^2, 1/z^2>)

fieldplot3d(vec, x = -1 .. 1, y = -1 .. 1, z = -1 .. 1, axes = normal)

For which I get the following error (Maple website has no information on this error);Error, (in plots/fieldplot3d) invalid 1st argument (the function) Vectorfield(Vector(2, {(1) = 1/x^2, (2) = 1/y^2}, attributes = [coords = cartesian[x, y]]))

Basically I need someone to explain why Maple will not plot this vectorfield.
 
The vector field you're trying to plot is

[tex]\frac{ \hat{r}}{|\vec{r}|^2}=\frac{\vec{r}}{|\vec{r}|^3} = \frac{1}{(x^2+y^2+z^2)^{3/2}} \langle x,y,z\rangle \neq \langle 1/x^2, 1/y^2, 1/z^2 \rangle .[/tex]

That said, I'm not sure that is the source of your Maple error. It looks like a syntax error, but is also might be that the function you're plotting is very poorly behaved (blows up on all of the axes).

Also, you don't really need Maple for this, and it's probably a bit more instructive to do it by hand anyway. Just think in terms of polar coordinates.