Plotting Dirac Delta Function in Maple14: Troubleshooting

Click For Summary
SUMMARY

The discussion focuses on troubleshooting the plotting of the Dirac Delta function in Maple 14, specifically the vector field defined as \(\vec{v} = \frac{1}{\vec{r^{2}}} \hat{r}\). The user encounters an error when using the command fieldplot3d due to an invalid first argument in the Vectorfield function. The error arises because the vector field is incorrectly defined as \(\langle 1/x^2, 1/y^2, 1/z^2 \rangle\) instead of the correct form \(\frac{\vec{r}}{|\vec{r}|^3}\). The discussion suggests that the function's behavior near the axes may also contribute to the plotting issues.

PREREQUISITES
  • Familiarity with Maple 14 syntax and commands
  • Understanding of vector fields and their mathematical representation
  • Knowledge of polar coordinates and their application in vector calculus
  • Basic troubleshooting skills for programming errors in Maple
NEXT STEPS
  • Review the correct syntax for defining vector fields in Maple 14
  • Learn how to use the Vectorfield function properly
  • Explore the implications of singularities in vector fields
  • Study the conversion between Cartesian and polar coordinates in vector calculus
USEFUL FOR

This discussion is beneficial for students and educators in mathematics and physics, particularly those working with vector calculus in Maple 14. It is also useful for anyone troubleshooting plotting issues in mathematical software.

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.
 
Physics news on Phys.org
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.
 

Similar threads

Replies
0
Views
2K
Replies
5
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · 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