       Re: Re: Newbie Question About An Error Message

• To: mathgroup at smc.vnet.net
• Subject: [mg55476] Re: [mg55463] Re: [mg55443] Newbie Question About An Error Message
• From: Mitch.Stonehocker at sungard.com
• Date: Fri, 25 Mar 2005 05:48:17 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Hi,
Your function
abs[x1_, x2_, x3_]
specifies three arguments.  With
D[(abs[{x-xi}])^2,x]
you only give it one argument.  If you include the two remaining
arguments
D[(abs[{x - xi}, x2, x3])^2, x]
you get
2 (x - xi)

Cheers,

Mitch Stonehocker

-----Original Message-----
From: Matthias Bode [mailto:lvsaba at hotmail.com]
To: mathgroup at smc.vnet.net
Subject: [mg55476] [mg55463] Re: [mg55443] Newbie Question About An Error Message

Hello Adam:

1.
INPUT:

abs[x1_, x2_, x3_] := Sqrt[x1^2 + x2^2 + x3^2]

INPUT:

abs[1, 2, 3]

OUTPUT:

Sqrt

2.

D[(abs[{x-xi}])^2,x] does NOT give the answer you know but:

INPUT:

D[abs[{x - xi}]^2, x] yields:

OUTPUT:

2*abs[{x - xi}]*Derivative[{1}][abs][{x - xi}]

whereas

INPUT:

D[Abs[(x - xi)^2], x] yields:

OUTPUT:

2*Abs[x - xi]*Derivative[Abs][x - xi], with [Abs] absolutely unequal
to
[abs]!

Finally

D[(x - xi)^2, x] gives:

2*(x - xi), the answer you know.

MATHEMATICA which I have been using since version 2 does work really
fine if
the user deigns to heed its syntax rules; insofar it is VERY similar to
ALL
other programming languages.

Best regards,

MATTHIAS BODE
Torres Sofer III, depto. 9 A
Pedro Borda #1072
esq. Ismael Vasquez
COCHABAMBA/BOLIVIA

CEL: +591-70 71 56 64
TEL/FAX: +591-4-4 53 34 17
LVSABA at HOTMAIL.COM
Time indicated: UTC (=GMT).

----- Original Message -----
From: "Adam Hartshorne" <oracle3001 at yahoo.com>
To: mathgroup at smc.vnet.net
Subject: [mg55476] [mg55463] [mg55443] Newbie Question About An Error Message

> Hi All,
>
> I am a real newbie to mathematica and have just encountered the
> following error message and I have no idea why and what it means.
>
> I have written a function to calculate the abs of a vector as follows
>
> abs[x_] := Sqrt[x[]^2+x[]^2+x[]^2]
>
> then i was doing the following fine until a few moments ago and
> mathematica starting complaining. I am to my knowledge not asking
> anything different to what I asked it before, but I don't know enough
> about mathematica to know much more.
>
> Ok then I try
>
> D[(abs[{x-xi}])^2,x]
>
> Which is know the answer to is 2(x-xi), and mathematica has given me
the
> answer. However now it is saying, maybe I have changed my input and no
> am typing something wrong.
>
> Part::partw: Part 2 of {x - xi} does not exist.
>
> Part::partw: Part 3 of {x - xi} does not exist.
>
> Any help will be much appreciated,
>
> Adam
>
>

```

• Prev by Date: Re: Why is the Arrow routine so poor?
• Next by Date: Mathematica max, min
• Previous by thread: Re: Newbie Question About An Error Message
• Next by thread: using Mathematica to plot in visual studio 2005