Plotting Dirac Delta Function in Maple14: Troubleshooting

Click For Summary
The discussion revolves around troubleshooting the plotting of a vector field in Maple14, specifically the function v = r^(-2) * r-hat. The user encounters an error when attempting to plot the vector field using the command fieldplot3d, which suggests a potential syntax issue or that the function is poorly defined due to its behavior near the axes. It is clarified that the correct representation of the vector field should involve the expression r = (x^2 + y^2 + z^2)^(3/2) rather than the initially attempted components. Additionally, it is suggested that plotting this function may not require Maple and could be more effectively approached using polar coordinates. The conversation emphasizes the need for correct function representation and the potential for manual plotting methods.
misterpickle
Messages
9
Reaction score
0

Homework Statement


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

**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.
 
Physics news on Phys.org
The vector field you're trying to plot is

\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 .

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.
 

Similar threads

Replies
0
Views
2K
Replies
5
Views
4K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 0 ·
Replies
0
Views
1K
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K