MathGroup Archive 1998

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

Search the Archive

Re: Q. about Solve as applied to vector equations


  • To: mathgroup@smc.vnet.net
  • Subject: [mg12177] Re: Q. about Solve as applied to vector equations
  • From: Paul Abbott <paul@physics.uwa.edu.au>
  • Date: Fri, 1 May 1998 03:08:29 -0400
  • Organization: University of Western Australia
  • References: <6hpb4f$d43@smc.vnet.net>

Rajarishi S Sinha wrote:

> I'm trying to solve the following vector expression for the vector 'r':
> 
> x*n1 X r1 + (1-x)*n2 X r2 = (1/norm2(x*n1 + (1-x)*n2))*(x+n1 + (1-x)*n2)
> X r 0<=x<=1

I think there an error in this expression.  Should it not read

 x*n1 X r1 + (1-x)*n2 X r2 = (1/norm2(x*n1 + (1-x)*n2))*(x*n1 +
(1-x)*n2) X r

Since you can work with typeset expressions in Mathematica Notebooks
perhaps the following is a better way of expressing this:

Cell[BoxData[\(TraditionalForm
    \`x\ n\_1\[Cross]r\_1 + \ \((1 - x)\) n\_2\[Cross]\ r\_2 == 
      \(\(x\ n\_1 + \((1 - x)\)\ n\_2\ 
            \)\/\[LeftDoubleBracketingBar]x\ n\_1 + 
                \((1 - x)\) n\_2\[RightDoubleBracketingBar]\)\[Cross]\
r\)], 
  "Input"]

(select Cell[...] and paste into a Mathematica Notebook to view this
Cell).

As far as I can see, what you are trying to do is, for fixed x, n1, n2,
r1, r2, effectively solve the vector equation a = x X r for r with a
and x supplied. In terms of components,

In[1]:= eqn = {a, b, c} == Cross[{x, y, z}, {r, s, t}] Out[1]=
{a,b,c}=={t y-s z,r z-t x,s x-r y}

Solve does not work 

In[2]:= Solve[%,{r,s,t}]
Out[2]= {}

for a good reason.  If you eliminate r and s,

In[3]:= Eliminate[%%,{r,s}]
Out[3]= c z==-a x-b y

you see that there, for a solution to exist, there needs to be a
relationship between the vectors a={a,b,c} and x={x,y,z}.  If this
relationship holds, then 

In[4]:= eqn/.First[%]
Out[4]=
	                    s (a x + b y)         r (a x + b y)
	{a, b, c} == {t y + -------------, -t x - -------------, s x - r y}
	                          c                     c

and you can now solve for two of the components of r

In[5]:= Solve[%,{r,s}]
Out[5]=
	         b c + t x c        c (a - t y)
	{{r -> -(-----------), s -> -----------}}
	          a x + b y          a x + b y
   
Cheers,
	Paul 

____________________________________________________________________ 
Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia            Nedlands WA  6907       
mailto:paul@physics.uwa.edu.au  AUSTRALIA                            
http://www.pd.uwa.edu.au/~paul

            God IS a weakly left-handed dice player
____________________________________________________________________



  • Prev by Date: Re: Solving for coefficients...
  • Next by Date: Re: Solving for coefficients...
  • Prev by thread: Re: Re: Solving for coefficients...
  • Next by thread: Re: Calculating eigenvector for zero eigenvalue