Re: solving for 2 angles
- To: mathgroup at smc.vnet.net
- Subject: [mg89820] Re: [mg89788] solving for 2 angles
- From: "W_Craig Carter" <ccarter at mit.edu>
- Date: Sat, 21 Jun 2008 05:32:14 -0400 (EDT)
- References: <200806201015.GAA21484@smc.vnet.net>
Hello Steve, Are you asking how to do this in Mathematica? If so, this gives you *some* solutions, but perhaps not all. eq1 = jj*Cos[az]*Sin[el] + kk*Sin[az]*Sin[el] + ll*Cos[el] eq2 = mm*Cos[az]*Sin[el] + nn*Sin[az]*Sin[el] + pp*Cos[el] Solve[{eq1 == 0, eq2 == 0}, {az, el}] (*produces a long list of solution-replacement rules, and a warning about inverse functions, and advice about using Reduce*) Craig On Fri, Jun 20, 2008 at 6:15 AM, Steve <srjm72499 at gmail.com> wrote: > I have two equations with unknown angles az and el: > > J*cos(az)*sin(el)+K*sin(az)*sin(el)+L*cos(el)=0; > M*cos(az)*sin(el)+N*sin(az)*sin(el)+P*cos(el)=0; > > Is it a simple matter to solve for the angles? > > I tried taking the first equation, and re-writing as: > > sin(el)*[J*cos(az)+K*sin(az) ] = -L*cos(el) > > which leads to > > el= atan(-L / [J*cos(az)+K*sin(az)]) > > I then subsituted this into the second equation, but was not able to > isolate the az variable. > > I would appreciate any help... > > Thanks. > > -Steve > > -- W. Craig Carter