MathGroup Archive 2002

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

Search the Archive

Re: solving vector equations in mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34366] Re: solving vector equations in mathematica
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 17 May 2002 06:30:46 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <abvu3q$m4b$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

x[[i]] is not a indexd symbol it is the *part* of an existing
expression.


you mean

Solve[Sum[Subscript[x, i], {i, 1, 5}] == 0, Subscript[x, 2]]


Regards
  Jens

Hal Daume III wrote:
> 
> Hi All,
> 
> I'm somewhat new to mathematica, at least in the world of vectors, and
> I'm having trouble getting it to solve an equation for me.
> 
> I basically want to solve:
> 
> \sum_{i=1}^n x_i = 0
> 
> for x_k
> 
> I tried:
> 
> Solve[Sum[x[[i]],{i,1,5}] == 0, x[[2]]]
> 
> as an example, but mathematica complains:
> 
> In[118]:= Solve[Sum[w[[i]],{i=1,5}] == 0, w[[1]]]
> 
> Sum::write: Tag Set in i = 1 is Protected.
> 
> Part::partd: Part specification w[[1]] is longer than depth of object.
> 
> Part::partd: Part specification w[[1]] is longer than depth of object.
> 
> Part::partd: Part specification w[[1]] is longer than depth of object.
> 
> General::stop: Further output of Part::partd
>      will be suppressed during this calculation.
> 
> Out[118]= {{w[[1]] -> 0}}
> 
> I'm not exactly sure what this means.
> 
> I could write it out:
> 
> In[119]:= Solve[w1+w2+w3+w4+w5==0, w1]
> 
> Out[119]= {{w1 -> -w2 - w3 - w4 - w5}}
> 
> But this isn't very helpful in my situation (my equations are huge*), and
> doesn't reflect the vector quality of the situation.
> 
> If such a thing is possible, I'd appreciate some pointers (I read the
> mathematica docs on the wolfram site, but couldn't find anything talking
> about this).
> 
> Thanks!
> 
>  - Hal
> 
> * the equation i'm working with is something like:
> 
> sum_{C,x,y,y'} (wx . wy) (wx . wy') (|wx * wy'| (wx . wy) - |wx * wy| (wx
> . wy')) / (|wx|^4 |wy|^2 |wy'|^2) == 0
> 
> where
> 
>   .   is dot product
>   *   is cross product
>   |x| is magnitude of x
> and
>   for vectors w=<w1,w2,...,wn>, x=<x1,x2,...,xn>,
>   wx = <w1*x1,w2*x2,...,wn*xn>
> 
> Thanks again.
> 
> --
> Hal Daume III
> 
>  "Computer science is no more about computers    | hdaume at isi.edu
>   than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume


  • Prev by Date: Re: ParametricPlot3D without black lines
  • Next by Date: silly newbie questions
  • Previous by thread: solving vector equations in mathematica
  • Next by thread: RE: solving vector equations in mathematica