Re: How do I get Mathematica to Simplify this to 1?
- To: mathgroup at smc.vnet.net
- Subject: [mg104474] Re: [mg104437] How do I get Mathematica to Simplify this to 1?
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Sun, 1 Nov 2009 04:02:13 -0500 (EST)
- References: <200910310654.BAA13353@smc.vnet.net>
Norm assumes that all the entries are complex. The quickest way to get
what you want is probably:
v = {(X - w Cos[k z])/
Sqrt[z^2 + (X - w Cos[k z])^2 + (Y - w Sin[k z])^2], (Y -
w Sin[k z])/
Sqrt[z^2 + (X - w Cos[k z])^2 + (Y - w Sin[k z])^2], -(z/
Sqrt[w^2 + X^2 + Y^2 + z^2 - 2 w X Cos[k z] - 2 w Y Sin[k z]])};
Simplify[Sqrt[v.v]]
1
Alternatively you can use Norm and apply Simplify with the assumption
that everything is real:
Simplify[Norm[v], Element[_, Reals]]
1
Andrzej Kozlowski
On 31 Oct 2009, at 15:54, dushan wrote:
> After initially declaring that {w>0, k>0, {z,X,Y} el Reals}, a matrix-
> vector multiplication produces the vector
>
> {(X - w Cos[k z])/Sqrt[z^2 + (X - w Cos[k z])^2 + (Y - w Sin[k z])^2],
> (Y - w Sin[k z])/Sqrt[z^2 + (X - w Cos[k z])^2 + (Y - w Sin[k z])^2],
> -(z/Sqrt[ w^2 + X^2 + Y^2 + z^2 - 2 w X Cos[k z] - 2 w Y Sin[k z]])}
>
> The denominators are in fact identical. When I ask for Norm[%] I get
>
> \[Sqrt](
> Abs[z/Sqrt[w^2 + X^2 + Y^2 + z^2 - 2 w X Cos[k z] - 2 w Y Sin[k z]]]
> ^2 +
> Abs[(X - w Cos[k z])/Sqrt[z^2 + (X - w Cos[k z])^2 + (Y - w Sin[k z])
> ^2]]^2 +
> Abs[(Y - w Sin[k z])/Sqrt[z^2 + (X - w Cos[k z])^2 + (Y - w Sin[k z])
> ^2]]^2
> )
>
> and Simplify[%] reproduces this identical result instead of supplying
> the correct answer 1.
>
> What am I doing wrong that prevents Mathematica from delivering the
> right answer?
>
> A separate question: Is there available somewhere a short list of
> symbols (such as '!!', '&&', "=.", '/@', etc.) and their meanings? A
> Mathematica book index would generally start with such a list, but
> having it available as a 1-page crib-sheet would be very helpful to
> newbies like me.
>
> Thanks.
>
> - Dushan
>