Re: How do I get Mathematica to Simplify this to 1?
- To: mathgroup at smc.vnet.net
- Subject: [mg104478] Re: How do I get Mathematica to Simplify this to 1?
- From: Peter Breitfeld <phbrf at t-online.de>
- Date: Sun, 1 Nov 2009 04:02:58 -0500 (EST)
- References: <hcgpkt$egn$1@smc.vnet.net>
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?
>
I'll name your expression expr. If you want to simplify with all
variables supposed to be Reals, then use:
Simplify[Norm[expr], Element[_, Reals]]
Out= 1
> 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
>
May be this little palette is a starter:
CreatePalette[{
Grid[{
{" f @ x", "f[x]"},
{" x // f", "f[x]"},
{" x ~ f ~ y", "f[x, y]"},
{" f /@ x", "Map[f, x]"},
{" f //@ x", "MapAll[f, x]"},
{" f @@ x", "Apply[f, x]"},
{" f @@@ x", "Apply[f, x, {1}]"},
{" a && b", "And[a, b]"},
{" a \[And] b", "And[a, b]"},
{" a || b", "Or[a, b]"},
{" a \[Or] b", "Or[a, b]"},
{" ! a", "Not[a]"},
{" \[Not] a", "Not[a]"},
{" a \[Union] b", "Union[a, b]"},
{" a \[Intersection] b", "Intersection[a, b]"},
{" a <> b", "StringJoin[a, b]"},
{" a /. b", "ReplaceAll[a, b]"},
{" a //. b", "ReplaceRepeated[a, b] "},
{" a /; b", "Condition[a ,b]"},
{" a /: x=y", "TagSet[a, x, y]"},
{" a /: x:=y", "TagSetDelayed[a, x, y] "}
},
Alignment -> Left,
BaseStyle -> {FontFamily -> "Palatino", FontSize -> 12},
Dividers -> {False, {4 -> Black, 6 -> Black, 8 -> Black,
14 -> Black, 16 -> Black, 17 -> Black, 19 -> Black,
20 -> Black}}
]
}]
--
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de