Gravity

> R:=vector([x,y,z]);

[Maple Math]

R is the position vector in 3 dimensional space. Let's take its norm, that is, its length:

> r:=norm(R,2);

[Maple Math]

The "norm" command is quite general, and we need to use the "2" to specify the 2-norm, which is the square root of the sum of the squares of the components. If you forget the "2", Maple will use the "infinity norm", which is a horse of a different colour.

> F_grav:=evalm(-R/r^3);

[Maple Math]

The force of gravity is proportional to R divided by its norm cubed. The "evalm" command tells Maple to evaluate the expression as a matrix or a vector, in this case a vector. This is because R is a vector whereas r^3 is a scalar, and "evalm" knows that a scalar mulitiplies each component of a vector.

>

Plotting the Gravitational Force Field in 3-Dimensions

Plotting the Gravitational Force Field in an Octant Excluding the Origin