MathGroup Archive 2006

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

Search the Archive

Re: Formal operations with vectors and scalars

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70239] Re: [mg70226] Formal operations with vectors and scalars
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Mon, 9 Oct 2006 01:55:53 -0400 (EDT)
  • References: <200610080604.CAA11855@smc.vnet.net>

If you really want to do symbolic linear algebra, look at the
Tensorial package on David Park's website. It has facilities for
making this stuff easier to do in Mathematica.

On 10/8/06, Dr. Wolfgang Hintze <weh at snafu.de> wrote:
> Hello group,
> I'm trying - unsuccessfully - to derive formally simple relations with
> vectors and scalars using Mathematica.
>
> As an example consider the reflexion of a ray of light with initial
> direction av (unit vector) from a surface at a point with a normal unit
> vector nv.
> As ist well known the reflected (unit) vector rv will be given by
>
> rv = av - 2 nv (av.nv)
>
> where av.nv is the scalar product of av and nv.
>
> My question is: how do I derive this relation using Mathematica?
>
> (Sorry for bothering you with the derivation, but I need this exposition
> to show the points where I have difficulties.)
>
> With pencil and paper I would start by writing rv as a linaer
> combination of av and nv, using two scalar constants A and B to be
> determined,  i.e.
>
> (1)
> rv = A av + B nv
>
> Now the condition of reflexion can be written
>
> (2)
> nv.(av+rv) = 0
>
> Using (1) to replace rv this reads (remembering also that (nv.nv) = 1)
>
> (2')
> 0 = (nv.av) + A (nv.av) + B
>
> Solving for B gives B = - (nv.av) (1+A). Putting this into (1) leads to
>
> (1')
> rv = A av - nv (nv.av) (1+A)
>
> Squaring this should give 1:
>
> rv.rv
> = 1 = A^2 + (nv.av)^2 (1+A)^2 - 2 A (1+A) (nv.av)^2
> = A^2  + (nv.av)^2 ( 1 + A^2 + 2 A -2 A - 2 A^2)
> = A^2 + (nv.av)^2 (1-A^2)
> = A^2 (1-(nv.av)^2) + (nv.av)^2
>
> or
>
> (1-(nv.av)^2) = A^2 (1-(nv.av)^2)
>
> giving
>
> A = +- 1
>
> in view of (1') we must select the positive sign.
>
> Now, how would I proceed in Mathematica?
> I would write down (1) as well, would next impose (2).
> Here the first difficulty appears because Mathematica does not know that av, nv
> and rv designate vectors, the dot product is not distributed, the
> scalars A and B are not recognized either.
> I tried Simplify with conditions but this didn't help...
>
> Can you please outline how to tackle this derivation with Mathematica?
>
> Many thanks in advance.
>
> Wolfgang
>
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: Re: Re: Google Mathematica code search
  • Next by Date: a simple product, but with "i = 1...n AND i != x"
  • Previous by thread: Formal operations with vectors and scalars
  • Next by thread: RE: Formal operations with vectors and scalars