       • To: mathgroup at smc.vnet.net
• Subject: [mg49106] RE: [mg49080] A question about derivatives of quadratic products
• From: "David Park" <djmp at earthlink.net>
• Date: Thu, 1 Jul 2004 05:25:59 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```As a new user you are jumping too quickly to your problem without bothering
to learn Mathematica syntax. It is difficult to even fathom what you are
calculating because your statement is so far from Mathematica syntax.

I would strongly suggest reading through most of Part I of the Mathematica
book, which is part of Help, and actually typing in the various commands.
That way you will be familiar with Mathematica syntax and some of the basic
commands.

As to some of the things in your expression:

1) You shouldn't use D as a symbol because it is reserved in Mathematica for
a derivative function. Built-in Mathematica commands always begin with
capital letters. Begin your symbols with a small case letter and you will be
safe.

2) So sum and sqrt should be Sum and Sqrt - or you can use the BasicInput
palette.

3) Arguments of functions are enclosed in square brackets, [], not round
brackets (). [], () and {} are used for different purposes and can't be
interchanged.

4) &#945 can't be used for a symbol. It is meaningless. Symbols must begin
with a letter.

5) A Sum would be written Sum[f[i],{i,1,n}] or again you could use the
BasicInput palette.

6) If you are having difficulty writing and evaluating an expression make
sure you can write and evaluate the parts first. Make sure you can evaluate
w.x and w.M.w, and then larger subexpressions.

But most of all, spend some time learning the Mathematica fundamentals. It
will save you time in the long run.

David Park

From: afh [mailto:yangjq at soton.ac.uk]
To: mathgroup at smc.vnet.net

Hello,
I am a new user of mathematica. I met a question about derivatives as
following:
D = Norm[w, 2]^2/2+sum(&#945;i(yi(w.x+b+sqrt(w.M.w))-1)) (which i=1 to
n)
w and x are two-dimension vectors, yi is a number either -1 or 1, b is
a number, M is a 2*2 matrix, &#945;i is a lagrange coefficient.
I want to get the value of w when D's derivative on w is equal to
zero.
But many errors happen, and it seems mathematica does not know what it
should do next. Can somebody help me? Many thanks for your kind help.

```

• Prev by Date: Re: Accuracy problem in Mathematica
• Next by Date: Re: Accuracy problem in Mathematica