[Date Index]
[Thread Index]
[Author Index]
Re: A question about derivatives of quadratic products
*To*: mathgroup at smc.vnet.net
*Subject*: [mg49114] Re: A question about derivatives of quadratic products
*From*: Paul Abbott <paul at physics.uwa.edu.au>
*Date*: Thu, 1 Jul 2004 05:26:32 -0400 (EDT)
*Organization*: The University of Western Australia
*References*: <cbu35t$5m1$1@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
In article <cbu35t$5m1$1 at smc.vnet.net>, yangjq at soton.ac.uk (afh) wrote:
> I met a question about derivatives as following:
> D = Norm[w, 2]^2/2+sum(α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, αi is a lagrange coefficient.
A little hard to decode. I assume you are working with
w = {w1, w2}; x = {x1, x2}; m = {{m11, m12}, {m21, m22}};
and, along with b, all are independent of i. Then your sum can be written
d = 1/2 Norm[w, 2]^2 - Sum[lambda[i], {i, 1, n}] +
(b + w . x + Sqrt[w . m . w]) Sum[lambda[i] y[i] , {i, 1, n}]
and simplifies slightly for real w,
d = Simplify[d, w \[Element] Reals]
> I want to get the value of w when D's derivative on w is equal to
> zero.
I assume that you are computing derivatives with respect to w1 and w2
separately and then want to solve for w1 and w2? I.e.,
Solve[{D[d,w1]==0,D[d,w2]==0}, w]
The solution of these equations is likely to be more complicated than
you expect, and probably not of much use to you ...
> But many errors happen, and it seems mathematica does not know what it
> should do next.
I think that _you_ need to tell Mathematica what to do ...
Cheers,
Paul
--
Paul Abbott Phone: +61 8 9380 2734
School of Physics, M013 Fax: +61 8 9380 1014
The University of Western Australia (CRICOS Provider No 00126G)
35 Stirling Highway
Crawley WA 6009 mailto:paul at physics.uwa.edu.au
AUSTRALIA http://physics.uwa.edu.au/~paul
Prev by Date:
**$LinkError in Excel Link**
Next by Date:
**Re: Accuracy problem in Mathematica**
Previous by thread:
**Re: A question about derivatives of quadratic products**
Next by thread:
**RE: A question about derivatives of quadratic products**
| |