Simplification of vector norms, logs and fractions
Subject: Simplification of vector norms, logs and fractions
From: Freddie Witherden
Date: Thu, 06 Oct 2011 11:30:35 +0100
Hello,
I have two vectors, R = [x, y]^T and ri = [xi, yi]^T and wish to Taylor
expand the function:
log(abs(R - ri))
about ri = [0,0]^T where abs(v) == sqrt(v.v). So:
(%i1) R : matrix([x],[y]); ri : matrix([xi],[yi]);
[ x ]
(%o1) [ ]
[ y ]
[ xi ]
(%o2) [ ]
[ yi ]
(%i3) taylor(log(sqrt((R-ri).(R-ri))),[xi,yi],[0,0],2);
2 2
log(y + x ) x xi + y yi
(%o3)/T/ ------------ - -----------
2 2 2
x + y
2 2 2 2 2 2
(x - y ) xi + 4 y x yi xi + (- x + y ) yi
- ---------------------------------------------
4 2 2 4
2 x + 4 y x + 2 y
I am wondering how I can simplify the result so that 1/2*log(x^2+y^2) =>
log(abs(R)), x^2 + y^2 => abs(R)^2. It would be nice if the last term
could be broken up as:
2 2
2 1 2 y 2 1 2 x
yi (-- - ----) xi (-- - ----)
2 4 2 4
R R R R 2 x xi y yi
--------------- + --------------- - -----------
2 2 4
R
I have played around with the various expand/contract/ratsimp options
but can find nothing that does that kind of expansion. Can anyone point
me in the correct direction?
Regards, Freddie.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20111006/20acfe50/attachment.pgp>