Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Formal operations with vectors and scalars

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70226] Formal operations with vectors and scalars
  • From: "Dr. Wolfgang Hintze" <weh at snafu.de>
  • Date: Sun, 8 Oct 2006 02:04:30 -0400 (EDT)

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


  • Prev by Date: Convert from String to variable
  • Next by Date: Re: Closed-form Integral Solution without Hypergeometric2F1Regularized ! ! !
  • Previous by thread: Re: Convert from String to variable
  • Next by thread: Re: Formal operations with vectors and scalars