Gröbner-Motivation
system:sage


<h1>L&ouml;sen algebraischer Gleichungssysteme</h1>

{{{id=12|
R=PolynomialRing(QQ,'l_1,l_2,p_x,p_y,p_z,s_p,s_t,s_f,c_f,c_t,c_p,s_2,s_1,c_2,c_1',order='invlex')
///
}}}

{{{id=13|
R.inject_variables()
///
Defining l_1, l_2, p_x, p_y, p_z, s_p, s_t, s_f, c_f, c_t, c_p, s_2, s_1, c_2, c_1
}}}

{{{id=3|
eqs=(c_1*c_2-c_f*c_t*c_p+s_f*s_p, 
    s_1*c_2-s_f*c_t*c_p-c_f*s_p, 
    s_2+s_t*c_p,-c_1*s_2-c_f*c_t*s_p+s_f*c_p,
    -s_1*s_2+s_f*c_t*s_p-c_f*c_p,
    c_2-s_t*s_p,
    s_1-c_f*s_t,
    c_1+s_f*s_t,
    c_t, 
    l_2*c_1*c_2-p_x,
    l_2*s_1*c_2-p_y,
    l_2*s_2+l_1-p_z,
    c_1^2+s_1^2-1,
    c_2^2+s_2^2-1,
    c_f^2+s_f^2-1,
    c_p^2+s_p^2-1,
    c_t^2+s_t^2-1)
///
}}}

{{{id=33|
B=(eqs*R).groebner_basis();B
///
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}\left[c_{1} + s_{t} s_{f}, c_{2} - s_{p} s_{t}, s_{1} - s_{t} c_{f}, s_{2} + s_{t} c_{p}, c_{p}^{2} + s_{p}^{2} - 1, p_{z} c_{p} - l_{1} c_{p} - l_{2} s_{p}^{2} s_{t} + l_{2} s_{t}, p_{y} c_{p} + p_{z} s_{p} s_{t} c_{f} - l_{1} s_{p} s_{t} c_{f}, p_{x} c_{p} - p_{z} s_{p} s_{t} s_{f} + l_{1} s_{p} s_{t} s_{f}, l_{2} c_{p} + p_{z} s_{t} - l_{1} s_{t}, c_{t}, c_{f}^{2} + s_{f}^{2} - 1, l_{2} s_{p} c_{f} - p_{y}, p_{y} c_{f} + l_{2} s_{p} s_{f}^{2} - l_{2} s_{p}, p_{x} c_{f} + p_{y} s_{f}, l_{2} s_{p} s_{f} + p_{x}, p_{y}^{2} s_{f} + p_{x}^{2} s_{f} + l_{2} p_{x} s_{p}, s_{t}^{2} - 1, l_{2}^{2} s_{p}^{2} + p_{z}^{2} - 2 l_{1} p_{z} - l_{2}^{2} + l_{1}^{2}, p_{z}^{2} - 2 l_{1} p_{z} + p_{y}^{2} + p_{x}^{2} - l_{2}^{2} + l_{1}^{2}\right]</span></html>
}}}

{{{id=34|
for p in B:
    p
///
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}c_{1} + s_{t} s_{f}</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}c_{2} - s_{p} s_{t}</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}s_{1} - s_{t} c_{f}</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}s_{2} + s_{t} c_{p}</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}c_{p}^{2} + s_{p}^{2} - 1</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}p_{z} c_{p} - l_{1} c_{p} - l_{2} s_{p}^{2} s_{t} + l_{2} s_{t}</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}p_{y} c_{p} + p_{z} s_{p} s_{t} c_{f} - l_{1} s_{p} s_{t} c_{f}</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}p_{x} c_{p} - p_{z} s_{p} s_{t} s_{f} + l_{1} s_{p} s_{t} s_{f}</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}l_{2} c_{p} + p_{z} s_{t} - l_{1} s_{t}</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}c_{t}</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}c_{f}^{2} + s_{f}^{2} - 1</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}l_{2} s_{p} c_{f} - p_{y}</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}p_{y} c_{f} + l_{2} s_{p} s_{f}^{2} - l_{2} s_{p}</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}p_{x} c_{f} + p_{y} s_{f}</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}l_{2} s_{p} s_{f} + p_{x}</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}p_{y}^{2} s_{f} + p_{x}^{2} s_{f} + l_{2} p_{x} s_{p}</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}s_{t}^{2} - 1</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}l_{2}^{2} s_{p}^{2} + p_{z}^{2} - 2 l_{1} p_{z} - l_{2}^{2} + l_{1}^{2}</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}p_{z}^{2} - 2 l_{1} p_{z} + p_{y}^{2} + p_{x}^{2} - l_{2}^{2} + l_{1}^{2}</span></html>
}}}

<h1>Implizitmachen von Gleichungen</h1>

{{{id=14|
R.<x,y,t>=PolynomialRing(QQ,3,'xyt',order='invlex')
///
}}}

{{{id=20|
eqs=(x-(2+t^2)/(1+t^2), y-(t-t/(1+t^2)));eqs
///
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\frac{x t^{2} - t^{2} + x - 2}{t^{2} + 1}, \frac{- t^{3} + y t^{2} + y}{t^{2} + 1}\right)</span></html>
}}}

{{{id=35|
B=(map(lambda x:x.numerator(),eqs)*R).groebner_basis();B
///
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}\left[t^{2} - y t + x - 2, y t - y^{2} - x^{2} + 4 x - 4, x t - 2 t + y, x y^{2} - y^{2} + x^{3} - 6 x^{2} + 12 x - 8\right]</span></html>
}}}

{{{id=36|
for p in B:
    p
///
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}t^{2} - y t + x - 2</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}y t - y^{2} - x^{2} + 4 x - 4</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}x t - 2 t + y</span></html>
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}x y^{2} - y^{2} + x^{3} - 6 x^{2} + 12 x - 8</span></html>
}}}

<h1>Simplify mit Nebenbedingungen</h1>

{{{id=24|
R.<a,b,c,z>=PolynomialRing(QQ,4)
///
}}}

{{{id=41|
var('a b c')
///
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}\left(a, b, c\right)</span></html>
}}}

{{{id=32|
eqs=(a+b+c-3,a^2+b^2+c^2-9,a^3+b^3+c^3-24)
///
}}}

{{{id=37|
eqs
///
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}\left(a + b + c - 3, a^{2} + b^{2} + c^{2} - 9, a^{3} + b^{3} + c^{3} - 24\right)</span></html>
}}}

{{{id=38|
(R*(eqs+(a^4+b^4+c^4-z,))).groebner_basis()
///
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}\left[c^{3} - 3 c^{2} + 1, b^{2} + b c + c^{2} - 3 b - 3 c, a + b + c - 3, z - 69\right]</span></html>
}}}

{{{id=39|
map(lambda x: (a^4+b^4+c^4).subs(x),solve(eqs,(a,b,c),solution_dict=True))
///
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}\left[68.9999991062, 68.9999991062, 68.9999991062, 68.9999991062, 68.9999991062, 68.9999991062\right]</span></html>
}}}

{{{id=40|

///
}}}

{{{id=42|

///
}}}