MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Newbie Question About An Error Message

  • To: mathgroup at
  • Subject: [mg55463] Re: [mg55443] Newbie Question About An Error Message
  • From: "Matthias Bode" <lvsaba at>
  • Date: Thu, 24 Mar 2005 03:42:05 -0500 (EST)
  • References: <>
  • Sender: owner-wri-mathgroup at

Hello Adam:


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


abs[1, 2, 3]




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


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


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



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


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


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,

Torres Sofer III, depto. 9 A
Pedro Borda #1072
esq. Ismael Vásquez

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

----- Original Message ----- 
From: "Adam Hartshorne" <oracle3001 at>
To: mathgroup at
Subject: [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[[1]]^2+x[[2]]^2+x[[3]]^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: Why is the Arrow routine so poor?
  • Next by Date: Re: Correct errors on fit parameter ?
  • Previous by thread: Re: Newbie Question About An Error Message
  • Next by thread: Re: Newbie Question About An Error Message