1 | initial version |

Note that `solve`

is usually used to solve *algebraic equations*. (The examples of the doc string of `solve`

also contain some trigonometric equations, but mixing them with more variables... I also try it in some specific non-algebraic cases, but do not hope to be successful...)

To get the system solved i am using two variables $s=\sin\theta$, $c=\cos\theta$ instead of the one variable $\theta$. This moves the system into the algebraich world. The code

```
# i am using s, c for sin(theta), cos(theta)...
Fs, Na, Nb, s, c = var('Fs Na Nb s c')
eq1 = 0 == Fs + 0.16*Na - 10.0*s
eq2 = 0 == Na - 10.0*c
eq3 = 0 == -Fs + 0.26*Nb - 6.0*s
eq4 = 0 == Nb - 6.0*c
eq5 = 1 == s^2 + c^2
solns = solve( [eq1, eq2, eq3, eq4, eq5]
, Fs, Na, Nb, s, c
, solution_dict=True)
for sol in solns:
for key in sol:
print "%2s = %s" % ( key, sol[key].n(30) )
print
```

then delivers

```
c = 0.98104950
s = 0.19375728
Nb = 5.8862970
Na = 9.8104950
Fs = 0.36789356
c = -0.98104950
s = -0.19375728
Nb = -5.8862970
Na = -9.8104950
Fs = -0.36789356
```

(Getting $\theta$ now should be one more code line.)

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.