       • To: mathgroup at smc.vnet.net
• Subject: [mg39406] Re: [mg39372] Problems evaluating Grad
• From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
• Date: Fri, 14 Feb 2003 03:18:56 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```I think you should read the documentation for the package. Actually,
even without that one can guess what must be wrong. You are asking
Mathematica to evaluate Grad[a+b]. How is it to know what are the
variables and what are the constants?
If you look at the package documentation you see that you that the
answer you get must depend on the coordiante system you are working
with. The default coordinate system is:

In:=
<<Calculus`VectorAnalysis`

In:=
{CoordinateSystem,Coordinates[]}

Out=
{Cartesian,{Xx,Yy,Zz}}

So if we use your definition:

In:=
f[x_,y_]:=x+y

In:=

Out=
{1,1,0}

On the other hand

In:=

Out=
{0,0,0}

because a and b are treated as constants. (This of course brings up the
question: how did you get Mathematica to return the input at this
point? It sounds like you never managed to load the package in in the
first place.)

Of course if you suitably change the names of the coordinates you will

In:=

Out=
{1,1,0}

Andrzej Kozlowski
Yokohama, Japan
http://www.mimuw.edu.pl/~akoz/
http://platon.c.u-tokyo.ac.jp/andrzej/

On Thursday, February 13, 2003, at 06:52 PM, Konrad Den Ende wrote:

> I'd like to detrmine Grad to a function so i go:
> <<Calculus`VectorAnalysis`
> f[x_,y_]:=x+y
>
>
> I get no errors, but the answer is simply the same thing
> that i asked, as if no computation was done. What do i
> do wrong?
>
> Also - when i evaluated the examples in Help i got the same
> to something else upon my evaluation. Namely, the question
> itself. What is that?!
>
> --
>
> Vänligen
> ---------------------------------------------------
> phone #1:  (+46/0) 708 - 70 73 92
> phone #2: (+46/0) 704 - 79 96 95
> -----------------------------------
>
> Sleep - thing used by ineffective people
>             as a substitute for coffee
>
> Ambition - a poor excuse for not having
>                  enough sence to be lazy
> ---------------------------------------------------
>
>
>
>
>
>
>
>
>

```

• Prev by Date: Re: Problems evaluating Grad
• Next by Date: Re: Problems evaluating Grad