maxima-bounces at math.utexas.edu wrote on 06/22/2007 02:23:47 AM:
> Hi!
>
> Here is an example that shows how dot product of complex vectors is
defined in
> Maxima.
>
> (%i2) declare(x1, complex)$
> (%i3) declare(x2, complex)$
> (%i4) declare(y1, complex)$
> (%i5) declare(y2, complex)$
> (%i6) declare(c, complex)$
> (%i9) a : columnvector([x1,y1])$
> (%i10) b : columnvector([x2,y2])$
> (%i12) dotproduct(c*a, b);
> (%o12) conjugate(c) conjugate(y1) y2 + conjugate(c) conjugate(x1) x2
>
> I wonder, why it is so, and how can I redefine it to:
> dotproduct(c*a, b) = c * y1 * conjugate(y2)+ c * x1 * x2?
Maybe you would like:
(%i15) mydot(a,b) := conjugate(dotproduct(a,b))$
(%i16) mydot(c*a,b);
(%o16) c*y1*conjugate(y2)+c*x1*conjugate(x2)
This differs from your (%o12). Was this a typo?
> How can I declare that some variable is complex vector?
Maybe declare(x, nonscalar), declare(x,complex) will work for you.
> I have a complicated system of differential equations, where some terms
are
> complex vectors. I can't specify all these vectors by elements,
> because it seems
> to me that after such declaration system will become be unreadable.
>
> And one more question about substitution and assupmtion:
> I need to assume that f(x) >> r(x) + t(x). I.e. that f(x) + r(x) + t(x)
~=
> f(x), and f(x) - r(x) - t(x) ~=f(x).
What does >> and ~= mean?
Barton