Cómo resolver un sistema de ecuaciones que contiene funciones trigonométricas complicadas (Necesita pasos / algoritmo, usando álgebra simbólica)

EDITAR: Olvidé mencionar mi uso de las ideas de Abhimanyu Susobhanan.

La biblioteca de sympy de Python ofrece cierto alivio al realizar los cálculos simbólicos:

de importación sympy *
var (‘t1 t2 t3’)
eq1 = (1 – 2 * cos (t1) + 2 * cos (t2) – 2 * cos (t3) + 0.8) .expand (trig = True)
eq2 = (1 – 2 * cos (5 * t1) + 2 * cos (5 * t2) – 2 * cos (5 * t3)) .expand (trig = True)
eq3 = (1 – 2 * cos (7 * t1) + 2 * cos (7 * t2) – 2 * cos (7 * t3)) .expand (trig = True)
imprimir (eq1)
imprimir (eq2)
imprimir (eq3)
eq1 = str (eq1) .replace (‘cos (t1)’, ‘x1’). replace (‘cos (t2)’, ‘x2’). replace (‘cos (t3)’, ‘x3’)
eq2 = str (eq2) .replace (‘cos (t1)’, ‘x1’). replace (‘cos (t2)’, ‘x2’). replace (‘cos (t3)’, ‘x3’)
eq3 = str (eq3) .replace (‘cos (t1)’, ‘x1’). replace (‘cos (t2)’, ‘x2’). replace (‘cos (t3)’, ‘x3’)
imprimir (eq1)
imprimir (eq2)
imprimir (eq3)
para root en solve ([sympify (eq1), sympify (eq2), sympify (eq3)]):
imprimir (raíz)

Aquí está la salida:

> pythonw -u “http://temp.py”
-2 * cos (t1) + 2 * cos (t2) – 2 * cos (t3) + 1.8
-32 * cos (t1) ** 5 + 40 * cos (t1) ** 3-10 * cos (t1) + 32 * cos (t2) ** 5-40 * cos (t2) ** 3 + 10 * cos (t2) – 32 * cos (t3) ** 5 + 40 * cos (t3) ** 3-10 * cos (t3) + 1
-128 * cos (t1) ** 7 + 224 * cos (t1) ** 5 – 112 * cos (t1) ** 3 + 14 * cos (t1) + 128 * cos (t2) ** 7 – 224 * cos (t2) ** 5 + 112 * cos (t2) ** 3-14 * cos (t2) – 128 * cos (t3) ** 7 + 224 * cos (t3) ** 5 – 112 * cos (t3 ) ** 3 + 14 * cos (t3) + 1
-2 * x1 + 2 * x2 – 2 * x3 + 1.8
-32 * x1 ** 5 + 40 * x1 ** 3-10 * x1 + 32 * x2 ** 5-40 * x2 ** 3 + 10 * x2 – 32 * x3 ** 5 + 40 * x3 ** 3 – 10 * x3 + 1
-128 * x1 ** 7 + 224 * x1 ** 5 – 112 * x1 ** 3 + 14 * x1 + 128 * x2 ** 7 – 224 * x2 ** 5 + 112 * x2 ** 3 – 14 * x2 – 128 * x3 ** 7 + 224 * x3 ** 5 – 112 * x3 ** 3 + 14 * x3 + 1
> Código de salida: 0

Sin embargo, se ahoga cuando pide encontrar las raíces. Recurrí al uso de Sage en SageMathCloud. Esto es lo que hice con el resultado.

Método algebraico:

Hay identidades trigonométricas para escribir y [math] cos (n \ theta) [/ math] en términos de [math] sin (\ theta) [/ math] y [math] cos (\ theta). [/ Math]

Sustituya esos en las ecuaciones y sustituya [matemáticas] x = cos (\ theta), \ sqrt {1-x ^ 2} = sen (\ theta) [/ matemáticas] y obtendrá un sistema de ecuaciones polinomiales.

Elimine [math] x_2 [/ math] y [math] x_3 [/ math] de la primera ecuación usando las ecuaciones segunda y tercera. Del mismo modo, elimine [math] x_1 [/ math] y [math] x_3 [/ math] de la segunda ecuación y [math] x_1 [/ math] y [math] x_2 [/ math] de la tercera ecuación.

Estas ecuaciones pueden (en realidad no lo resolví. Por lo tanto, no estoy seguro) tener poderes de x mayores que 3, por lo que pueden no tener una solución de forma cerrada. En cualquier caso, intente factorizar los polinomios resultantes y resolverlos. Cada ecuación polinómica puede dar múltiples valores de [matemática] x_i [/ ​​matemática], pero desde [matemática] | cos (\ theta) | <= 1 [/ matemática], solo soluciones con [matemática] | x | <= 1 [ / math] son ​​válidos.

Aplique [math] cos ^ {- 1} [/ math] para obtener las respuestas finales.

Método numérico:

Puede resolverlos muy fácilmente utilizando el Método Newton-Raphson (Varianza múltiple). Es una generalización del método de Newton para una sola variable. Tendrá que escribir un programa corto (~ 20 líneas) para hacer esto.

La mejor de las suertes.

Aquí hay una manera. Supongo que el -0.8 es precisamente -4/5 aquí.

Primero, use identidades de suma de ángulos para expandir cosas como [math] \ cos (5 \ theta_3) [/ math] en polinomios en [math] \ sin (\ theta_3) [/ math] y [math] \ cos (\ theta_3) [/ math]. Deberías obtener:

[matemáticas] -2 \ cos \ left (\ theta _1 \ right) +2 \ cos \ left (\ theta _2 \ right) -2 \ cos \ left (\ theta_3 \ right) +1 = \ dfrac {-4} {5} [/ matemáticas]

[matemáticas] -2 \ cos ^ 5 \ left (\ theta _1 \ right) +2 \ cos ^ 5 \ left (\ theta _2 \ right) -2 \ cos ^ 5 \ left (\ theta _3 \ right) +20 \ sin ^ 2 \ left (\ theta _1 \ right) \ cos ^ 3 \ left (\ theta_1 \ right) -20 \ sin ^ 2 \ left (\ theta _2 \ right) \ cos ^ 3 \ left (\ theta _2 \ right) +20 \ sin ^ 2 \ left (\ theta _3 \ right) \ cos ^ 3 \ left (\ theta _3 \ right) -10 \ sin ^ 4 \ left (\ theta _1 \ right) \ cos \ left (\ theta _1 \ right) +10 \ sin ^ 4 \ left (\ theta_2 \ right) \ cos \ left (\ theta _2 \ right) -10 \ sin ^ 4 \ left (\ theta _3 \ right) \ cos \ left (\ theta _3 \ right) + 1 = 0 [/ math]

[matemáticas] -2 \ cos ^ 7 \ left (\ theta _1 \ right) +2 \ cos ^ 7 \ left (\ theta _2 \ right) -2 \ cos ^ 7 \ left (\ theta _3 \ right) +42 \ sin ^ 2 \ left (\ theta _1 \ right) \ cos ^ 5 \ left (\ theta_1 \ right) -42 \ sin ^ 2 \ left (\ theta _2 \ right) \ cos ^ 5 \ left (\ theta _2 \ right) +42 \ sin ^ 2 \ left (\ theta _3 \ right) \ cos ^ 5 \ left (\ theta _3 \ right) -70 \ sin ^ 4 \ left (\ theta _1 \ right) \ cos ^ 3 \ left (\ theta _1 \ right) +70 \ sin ^ 4 \ left (\ theta_2 \ right) \ cos ^ 3 \ left (\ theta _2 \ right) -70 \ sin ^ 4 \ left (\ theta _3 \ right ) \ cos ^ 3 \ left (\ theta _3 \ right) +14 \ sin ^ 6 \ left (\ theta _1 \ right) \ cos \ left (\ theta_1 \ right) -14 \ sin ^ 6 \ left (\ theta _2 \ right) \ cos \ left (\ theta _2 \ right) +14 \ sin ^ 6 \ left (\ theta _3 \ right) \ cos \ left (\ theta _3 \ right) + 1 = 0 [/ math]

Ahora observe que, dado que 5 y 7 son impares, [math] \ sin (\ theta_i) [/ math] siempre aparece con un exponente par. Esto significa que podemos sustituir [math] x_i = \ cos (\ theta_i) [/ math] y obtener un polinomio en [math] x_i [/ ​​math] ‘s, porque entonces [math] \ sin ^ 2 (\ theta_i) = 1 – x_i ^ 2 [/ matemáticas]. Cuando haces esto, obtienes:

[matemáticas] -2 x_1 + 2 x_2-2 x_3 + 1 = \ dfrac {-4} {5} [/ matemáticas]

[matemáticas] -32 x_1 ^ 5 + 40 x_1 ^ 3-10 x_1 + 32 x_2 ^ 5-32 x_3 ^ 5-40 x_2 ^ 3 + 40 x_3 ^ 3 + 10 x_2-10 x_3 + 1 = 0 [/ matemáticas]

[matemáticas] -128 x_1 ^ 7 + 224 x_1 ^ 5-112 x_1 ^ 3 + 14 x_1 + 128 x_2 ^ 7-128 x_3 ^ 7-224 x_2 ^ 5 + 224 x_3 ^ 5 + 112 x_2 ^ 3-112 x_3 ^ 3-14 x_2 + 14 x_3 + 1 = 0 [/ matemáticas]

Ahora, resolver un sistema de ecuaciones polinómicas no es exactamente sencillo, pero se puede hacer a través de métodos básicos de Groebner. Calculé una base de Groebner aquí, y da una descripción concisa de las soluciones: [matemáticas] x_3 [/ matemáticas] es una de las raíces del polinomio irreducible de noveno grado

en general. ]

Habiendo elegido [math] x_3 [/ math], [math] x_2 [/ math] es entonces una raíz de la cuadrática

[Matemáticas] 157415574206075150 x_2 ^ 2 + \ left (141674016785467635-157415574206075150 x_3 \ right) x_2 + (-9122024017968750000 x_3 ^ 8 + 16419643232343750000 x_3 ^ 7 + 8916240158083125000 x_3 ^ 6-20229093108665437500 x_3 ^ 5-2040509184748059375 x_3 ^ 4 + 6629981099774130000 x_3 ^ 3-73395994436560600 x_3 ^ 2-457457311406778480 x_3 + 11558978705814424) [/ matemáticas]

y finalmente

[matemáticas] x_1 = x_2 – x_3 + \ dfrac {9} {10} [/ matemáticas]

Las nueve raíces del polinomio que dan x_3 son reales y se encuentran entre -1 y 1. Además, al conectar cada una de ellas en la definición cuadrática x_2 se obtienen soluciones reales entre -1 y 1.

Por supuesto, no hay una manera visiblemente más simple de describir nuestras soluciones exactamente que “el coseno inverso de un cierto número algebraico de noveno grado”. Sin embargo, si aproximamos estas soluciones, obtenemos

[matemáticas] \ begin {array} {ccc} \ theta _1 \ approx 0.759441 & \ theta _2 \ approx 2.88862 & \ theta _3 \ approx 2.48716 \\ \ theta _1 \ approx 0.252972 y \ theta _2 \ approx 2.38215 y \ theta _3 \ aprox. 2.48716 \\ \ theta _1 \ aprox 1.4003 & \ theta _2 \ aprox 2.9857 & \ theta _3 \ aprox 1.83127 \\ \ theta _1 \ aprox 0.155894 & \ theta _2 \ aprox 1.74129 & \ theta _3 \ aprox 1.83127 \\\ theta _1 \ aprox 1.25446 & \ theta _2 \ aprox 2.25617 & \ theta _3 \ aprox 1.61486 \\ \ theta _1 \ aprox 0.885427 & \ theta _2 \ aprox 1.88714 & \ theta _3 \ aprox 1.61486 \\ \ theta _1 \ aprox 1.83127 & \ theta _2 \ approx 2.9857 & \ theta _3 \ approx 1.4003 \\ \ theta _1 \ approx 0.155894 & \ theta _2 \ approx 1.31032 & \ theta _3 \ approx 1.4003 \\ \ theta _1 \ approx 1.61486 y \ theta _2 \ approx 2.25617 & \ theta _3 \ aprox 1.25446 \\ \ theta _1 \ aprox 0.885427 & \ theta _2 \ aprox 1.52673 y \ theta _3 \ aprox 1.25446 \\ \ theta _1 \ aprox 1.61486 & \ theta _2 \ aprox 1.88714 & \ theta _3 \ aprox 0.885427 \\ \ theta _1 \ aprox 1.25446 y \ theta _2 \ aprox 1.52673 y \ theta _3 \ aprox 0.88 5427 \\ \ theta _1 \ approx 2.48716 & \ theta _2 \ approx 2.88862 & \ theta _3 \ aprox 0.759441 \\ \ theta _1 \ aprox 0.252972 & \ theta _2 \ aprox 0.654432 & \ theta _3 \ aprox 0.759441 \\ \ theta _1 \ approx 2.48716 & \ theta _2 \ approx 2.38215 & \ theta _3 \ approx 0.252972 \\ \ theta _1 \ approx 0.759441 & \ theta _2 \ approx 0.654432 & \ theta _3 \ approx 0.252972 \\ \ theta _1 \ approx 1.83127 y \ theta _2 \ aprox 1.74129 & \ theta _3 \ aprox 0.155894 \\ \ theta _1 \ aprox 1.4003 & \ theta _2 \ aprox 1.31032 & \ theta _3 \ aprox 0.155894 \\ \ end {array} [/ math]

Hice estos cálculos en Mathematica usando TrigExpand , TrigExpand , GroebnerBasis , CountRoots , las instalaciones básicas de sustitución y programación funcional del lenguaje, TeXForm para salida y NSolve para las soluciones aproximadas. En una situación en la que el sistema de ecuaciones era más complicado, habría utilizado Mathematica para hacer los cálculos iniciales y luego poner el cálculo de la base de Groebner en singular .