1

I'm trying to solve for a certain set of trig identities in terms of other trig identities. I saw this and this, but in my example, I have two tries:

Solve[{al == Sin[b] Cos[a], 
  am == Sin[b] Sin[a], an == Cos[b]}, 
 Cos[b], {a, b}]
Solve[{am == Sin[b] Sin[a], an == Cos[b]}, 
 Cos[b], {a, b}]

In the first example, I get a null solution. In the second, Mathematica recognizes that the expression is just 'an'. Apparently I need to building the rule set up from scratch for solve to use, any suggestions here? The actual expressions I plan to use will be more complex, so it failing here isn't giving me much confidence... In the meantime, I'll be trying to generalize the Weierstrass approach.

Edit:

A fuller example might be:

Solve[{al == Sin[b] Cos[a], 
  am == Sin[b] Sin[a], an == Cos[b]}, 
 Sin[b] Cos[a] + Cos[b]^2, {a, b}]

Giving the result

al+an^2
Gavin Nop
  • 11
  • 2

1 Answers1

0

Generally you can not solve for a function of a variable (b in the first example) and at the same time try to eliminate that variable. Eliminate the other variables or functions of that.

Solutions to the first example

Solve[{al == Sin[b] Cos[a], am == Sin[b] Sin[a], an == Cos[b]}, 
 Cos[b], {Sin[a], Sin[b], Cos[a]}]

Don't know why second example works, it should not.

Third example: give the expression you are looking for a name and solve for that, eliminating other functions.

Solve[{al == Sin[b] Cos[a], am == Sin[b] Sin[a], an == Cos[b], 
  fin == Sin[b] Cos[a] + Cos[b]^2}, fin, {Sin[a], Cos[a], Sin[b], 
  Cos[b]}]

(* {{fin -> al + an^2}} *)

Akku14
  • 17,287
  • 14
  • 32