MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How do I get Mathematica to Simplify this to 1?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104460] Re: How do I get Mathematica to Simplify this to 1?
  • From: Erik Max Francis <max at alcyone.com>
  • Date: Sun, 1 Nov 2009 03:59:33 -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've never been quite sure why Norm stick the Abs calls in there, since 
it's squared anyway.  In these cases I've found it's better to do 
Sqrt[%.%] rather than Norm[%]:

In[12]:= Sqrt[%.%] // Simplify

Out[12]= 1

-- 
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
  San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
   It's hard to say what I want my legacy to be when I'm long gone.
    -- Aaliyah


  • Prev by Date: Re: plotting with dotted lines, not dashed
  • Next by Date: Re: Using Mathematica 5.2 and 7.01 with separate
  • Previous by thread: Re: plotting with dotted lines, not dashed
  • Next by thread: Re: How do I get Mathematica to Simplify this to 1?