Re: Vectors,Norms and assumptions
- To: mathgroup at smc.vnet.net
- Subject: [mg82786] Re: Vectors,Norms and assumptions
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Wed, 31 Oct 2007 06:06:30 -0500 (EST)
- Organization: The Open University, Milton Keynes, UK
- References: <fg6rjo$e89$1@smc.vnet.net>
sapsi wrote:
> I have a question in mathematica (actually 3).
>
> 1. Let v be v={av1,av2} , then Norm[v]=Sqrt[Abs[av1]^2 + Abs[av2]^2]
> Q: How do indicate to mathematica that av1 and av2 belong to reals?
<snip>
You could use *Simplify* with the *Assumptions* option as in the
following example.
In[1]:= v = {av1, av2};
Norm@v
Norm@v // Simplify[#, Assumptions -> Element[v, Reals]] &
Out[2]= Sqrt[Abs[av1]^2 + Abs[av2]^2]
Out[3]= Sqrt[av1^2 + av2^2]
Regards,
--
Jean-Marc