8. Extrémy funkcí#

Naimportujeme si knihovny potřebné pro následující příklady:

import numpy as np
import matplotlib.pyplot as plt

8.1. Hledání extrémů funkce jedné proměnné#

  • Pro ohraničení minima/maxima musíme znát hodnoty funkce ve třech bodech \(a, b, c\)

  • Budeme se zabývat hledáním minima

  • Nechť $\( a < b < c \wedge f(a) > f(b) < f(c), \)\( pak existuje minimum funkce \)f(x)\( na intervalu \)(a,c)$.

  • Ke zúženı́ intervalu ohraničujı́cı́ho minimum potřebujeme čtvrtý bod

8.1.1. Metoda zlatého řezu#

  • Vzdálenost čtvrtého bodu od krajů je v poměru zlatého řezu: \(d=a + \dfrac{3-\sqrt{5}}{2}(c-a)\)

Cvičení 08.01: Najděte minimum funkce $f(x)=-\sin(x)$ metodou zlatého řezu.
#
# priklad minimalizace funkce jedne promenne metodou zlateho rezu

# zadejme si funkci -sin(x)
def f(x):
    return -np.sin(x)

# na zacatku nastavme uvodni body metody a < c , minimum by melo byt nekde
# kolem pi/2=1.5708, a bude mezi temito dvema body, bod b budeme dopocitavat
a = 0
c = np.pi

# nastavme presnost, se kterou chceme nalezt minimum
presnost = 1e-3

# ulozime si zlaty rez
zlatyRez = (3-np.sqrt(5))/2 # ~0.38

# napocteme prvni nastrel bodu b
b = a+zlatyRez*(c-a)

# hledani probiha v cyklu
while True:
    if (c-a) < presnost: # skoncime, pokud je minimum urceno dostatecne presne
        break
    
    if (b-a)/(c-a)<0.5:
        # nyni mame body a<b<c, pokud bod b je v leve casti intervalu < a,c >,
        # ponechame ho tam, a dopocitame bod d
        d = a+(1-zlatyRez)*(c-a) # 1-zlatyRez ~ 0.62
    else:
        # pokud je bod b v prave casti intervalu < a,c > (tzn vznikl v prubehu
        # iteraci), preznacime ho na d a dopocteme polohu bodu b
        d = b
        b = a+zlatyRez*(c-a)
    # nyni mame a<b<d<c, zjistime ve kterem intervalu je minimum
    if f(a)>=f(b) and f(b)<=f(d): # minimum je v intervalu < a,d >, ten navic obsahuje bod b
        c = d # presuneme pravy konec intervalu do bodu d, bod b nechame na svem miste
    else: #minimum je v intervalu < b,c >, ten navic obsahuje bod d
        tmp = b
        b = d # bod d se stane novym bodem b
        a = tmp # levy okraj presuneme do puvodniho bodu b
    #[a c]

print('Minimum je v intervalu <',a,',',c,'>')
Minimum je v intervalu < 1.5701884334977818 , 1.5710681849419796 >

8.1.2. Metoda parabolické interpolace#

  • Odhad minima je určen vztahem: $\( d = b-\dfrac{1}{2}\dfrac{(b-a)^{2}[f(b)-f(c)]-(b-c)^{2}\left[f(b)-f(a)\right]}{(b-a)\left[f(b)-f(c)\right]-(b-c)\left[f(b)-f(a)\right]} \)$

Cvičení 08.02: Najděte minimum funkce $f(x)=-\sin(x)$ metodou parabolické interpolace.
#
#
# hledani minima parabolickou interpolaci

# zadejme si funkci -sin(x)
def f(x):
    return -np.sin(x)

# na zacatku nastavme uvodni body metody a < b < c , minimum by melo byt nekde
# kolem pi/2=1.5708
a = 0
b = 0.3
c = np.pi

# nastavme presnost, se kterou chceme nalezt minimum
presnost = 1e-3

# hledani probiha v cyklu
while True:
    if (c-a) < presnost: # skoncime, pokud je minimum urceno dostatecne presne
        break
    
    # z a,b,c odhadneme polohu d minima paraboly, kterou jsme prolozili body
    # a,b,c
    d = b-0.5*((b-a)**2*(f(b)-f(c))-(b-c)**2*(f(b)-f(a)))/((b-a)*(f(b)-f(c))-(b-c)*(f(b)-f(a)))
    
    # zjistime, zda nastala situace a < d < b < c nebo a < b < d < c
    if d < b: # nastala situace a < d < b < c
        # zjistime, na kterem intervalu je minimum
        if f(a) > f(d) and f(d) < f(b): # minimum je na intervalu  < a,b > , ktery obsahuje bod d
            c = b # posuneme pravy okraj do bodu b
            b = d # treti bod uprostred bude tvoren bodem d
        else: # minimum je na intervalu  < d,c > , ktery obsahuje bod b
            a = d # posuneme levy okraj do bodu d
    else: # nastala situace a < b < d < c
        # zjistime, na kterem intervalu je minimum
        if f(a) > f(b) and f(b) < f(d): # minimum je na intervalu  < a,d >  obsahujicim bod b
            c = d # posuneme pravy okraj do bodu d
        else: # minimum je na intervalu  < b,c >  obsahujicim bod d
            a = b # posuneme levy okraj do bodu b
            b = d # treti bod uprostred bude tvoren bodem d

print('Minimum je v intervalu <',a,',',c,'>')
Minimum je v intervalu < 1.5707963267948968 , 1.5707963749762517 >

8.2. Hledání extrémů funkce více proměnných#

8.2.1. Nelder-Mead (simplex) metoda#

  • Využívá (N + 1)-simplex v N-dimenzionálním prostoru

  • Simplex posunujeme tak, aby ohraničil minimum

  • Pak se zmenšuje, dokud není minimum známo s dostatečnou přesností

  • Animace

  • Postup při hledání minima funkce o dvou proměnných:

  1. Zajistíme, aby \(f(W=\mathrm{Worst})>f(G=\mathrm{Good})>f(B=\mathrm{Best})\)

  2. Reflexe vrcholu \(W\) na \(R\):

  3. \(M=\dfrac{B+G}{2}\)

  4. \(R=M+(M-W)\)

  5. Pokud \(f(R)<f(W)\), přesuneme sem bod \(W\)

  6. Expanze vrocholu \(R\):

  7. \(R\) posuneme o \(M-W\) do \(E\)

  8. Pokud \(f(E)<f(R)\), přesuneme sem bod \(W\)

  9. Pokud nelze splnit kroky 2. a 3., provedeme kontrakci:

  10. Vytvoříme \(C\) uprostřed úsečky \(\lvert WM\rvert\)

  11. Pokud \(f(C)<f(W)\), přesuneme sem bod \(W\)

  12. Pokud nelze splnit krok 4., provedeme zmenšení:

  13. Vytvoříme \(S\) uprostřed úsečky \(\lvert WB\rvert\)

  14. Bod \(W\) přesuneme do \(S\)

  15. Bod \(G\) přesuneme do \(M\)

Cvičení 08.03: Najděte minimum funkcí $f_{1}(x)=x^{2}+y^{2}$ a $f_{2}(x)=100(x-y^{2})^{2}+(1-x)^{2}$ simplexovou metodou.
#
# Nelder-Mead

def f(x1,x2):
    return x1**2+x2**2
    #return 100*(x1-x2**2)**2+(1-x1)**2    


x1 = np.arange(0, 3, 0.1)
x2 = np.arange(-2, 2, 0.1)

xx1,xx2 = np.meshgrid(x1,x2);

z = xx1**2+xx2**2
#z = 100*(xx1-xx2**2)**2+(1-xx1)**2

h = plt.contourf(xx1,xx2,z)


alpha = 1 # koeficient zmeny velikosti pri reflexi
gamma = 2 # koeficient zvetseni
rho = 0.5 # koeficient zmenseni

c = np.zeros((2,1))

# 3 pocatecni body (ve 2D prostoru)
x = np.array([[0.1, -15.2], [4.7, 19], [14.8, 5.9]])
y = np.zeros((3,1))

# funkcni hodnoty v pocatecnich bodech
y[0] = f(x[0,0],x[0,1])
y[1] = f(x[1,0],x[1,1])
y[2] = f(x[2,0],x[2,1])

# volna pole pro ukladani mezivysledku
xt = np.zeros((3,1))
yt = np.zeros((3,1))
xc = np.zeros((3,1))
yc = np.zeros((3,1))
xe = np.zeros((3,1))

for k in range(100):
    # body chceme mit serazene y(0) < y(1) < y(2) (B < G < W)
    if y[2] < y[1]: # prohozeni
        x[1,0], x[2,0] = x[2,0], x[1,0]
        x[1,1], x[2,1] = x[2,1], x[1,1]
        y[1], y[2] = y[2], y[1]
    if y[1] < y[0]: #  prohozeni
        x[0,0], x[1,0] = x[1,0], x[0,0]
        x[0,1], x[1,1] = x[1,1], x[0,1]
        y[0], y[1] = y[1], y[0]
        if y[2] < y[1]: # prohozeni
            x[1,0], x[2,0] = x[2,0], x[1,0]
            x[1,1], x[2,1] = x[2,1], x[1,1]
            y[1], y[2] = y[2], y[1]
    
    # ve tretim bode (tj. bod W) je nejvyšší hodnota funkce z daných trech bodu = Worst
    # vypis hodnot
    print('Krok: ',k)
    print('souradnice bodu = ',x)
    print('funkcni hodnoty bodu = ',y)

    # vypocet x0 (c(i)) v polovine spojnice vsech bodu krome posledniho
    for i in range(2):
        c[i] = 0
        for j in range(2):
            c[i] = c[i] + x[j,i]/2

    # reflexe, ziskame souradnice reflektovaneho noveho bodu
    for i in range(2):
        xt[i] = c[i] + alpha*( c[i]-x[2,i] )

    yt = f(xt[0], xt[1])

    if yt<y[2]: # pokud je funkcni hodnota zrcadleneho bodu nizsi nez nas nejvyssi bod
        for i in range(2): # nahradime tento bod nove nalezenym bodem
            x[2,i] = xt[i]

        y[2] = yt
        if yt<y[0]:# pokud je bod nizsi, nez nas nejnizsi
            for i in range(2): # provedeme reflexi se zvetsenim s koeficientem gamma
                xe[i] = c[i] + gamma*( xt[i]-c[i] )
            ye = f(xe[0], xe[1])
            if ye<yt: # pokud je vysledek lepsi, nez samotna reflexe
                for i in range(2): # nahradime posledni bod novym
                    x[2,i] = xe[i]
                y[2] = ye


    if yt>y[1]: # pokud je ozrcadleny bod vetsi, nez nas prostredni
        for i in range(2): # provedeme zmenseni s koeficientem rho
            xc[i] = c[i]+rho*( x[2,i]-c[i] )
        yc = f(xc[0],xc[1])
        if yc<y[2]: # pokud je novy bod nizsi, nez nas nejvyssi
            for i in range(2): # vymenime je
                x[2,i] = xc[i]
            y[2] = yc
        else: # v opacnem pripade provedeme zmenseni ve vsech smerech (1,2) k minimu (0)
            for i in range(1,3): # zmensujeme smery 1 a 2, na minimum nesahame
                for j in range(2): # zmenseni (v puvodnich smerech) s koeficientem rho
                    x[i,j] = x[0,j] + rho*( x[i,j]-x[0,j] )
                y[i] = f( x[i,0], x[i,1] )
Krok:  0
souradnice bodu =  [[  0.1 -15.2]
 [ 14.8   5.9]
 [  4.7  19. ]]
funkcni hodnoty bodu =  [[231.05]
 [253.85]
 [253.85]]
Krok:  1
souradnice bodu =  [[  6.075   7.175]
 [  0.1   -15.2  ]
 [ 14.8     5.9  ]]
funkcni hodnoty bodu =  [[88.38625]
 [88.38625]
 [88.38625]]
Krok:  2
souradnice bodu =  [[  8.94375   0.94375]
 [  6.075     7.175  ]
 [  0.1     -15.2    ]]
funkcni hodnoty bodu =  [[80.88132812]
 [80.88132812]
 [80.88132812]]
Krok:  3
souradnice bodu =  [[ 3.8046875 -5.5703125]
 [ 8.94375    0.94375  ]
 [ 6.075      7.175    ]]
funkcni hodnoty bodu =  [[45.50402832]
 [45.50402832]
 [45.50402832]]
Krok:  4
souradnice bodu =  [[ 6.22460938  2.43085938]
 [ 3.8046875  -5.5703125 ]
 [ 8.94375     0.94375   ]]
funkcni hodnoty bodu =  [[44.65483917]
 [44.65483917]
 [44.65483917]]
Krok:  5
souradnice bodu =  [[ 1.08554688 -4.08320312]
 [ 6.22460938  2.43085938]
 [ 3.8046875  -5.5703125 ]]
funkcni hodnoty bodu =  [[17.85095978]
 [17.85095978]
 [17.85095978]]
Krok:  6
souradnice bodu =  [[ 3.65507813 -0.82617187]
 [ 1.08554688 -4.08320312]
 [ 2.44511719 -4.82675781]]
funkcni hodnoty bodu =  [[14.04215607]
 [14.04215607]
 [29.27618904]]
Krok:  7
souradnice bodu =  [[ 2.29550781 -0.08261719]
 [ 3.65507813 -0.82617187]
 [ 1.08554688 -4.08320312]]
funkcni hodnoty bodu =  [[5.27618172]
 [5.27618172]
 [5.27618172]]
Krok:  8
souradnice bodu =  [[ 2.29550781 -0.08261719]
 [ 1.69052734 -2.08291016]
 [ 2.97529297 -0.45439453]]
funkcni hodnoty bodu =  [[5.27618172]
 [7.19639742]
 [7.19639742]]
Krok:  9
souradnice bodu =  [[ 1.01074219 -1.71113281]
 [ 2.29550781 -0.08261719]
 [ 1.69052734 -2.08291016]]
funkcni hodnoty bodu =  [[3.94957527]
 [3.94957527]
 [3.94957527]]
Krok:  10
souradnice bodu =  [[ 1.61572266  0.28916016]
 [ 1.01074219 -1.71113281]
 [ 2.29550781 -0.08261719]]
funkcni hodnoty bodu =  [[2.6941733]
 [2.6941733]
 [2.6941733]]
Krok:  11
souradnice bodu =  [[ 0.33095703 -1.33935547]
 [ 1.61572266  0.28916016]
 [ 1.01074219 -1.71113281]]
funkcni hodnoty bodu =  [[1.90340563]
 [1.90340563]
 [1.90340563]]
Krok:  12
souradnice bodu =  [[ 0.9359375   0.6609375 ]
 [ 0.33095703 -1.33935547]
 [ 1.61572266  0.28916016]]
funkcni hodnoty bodu =  [[1.31281738]
 [1.31281738]
 [1.31281738]]
Krok:  13
souradnice bodu =  [[-0.34882812 -0.96757812]
 [ 0.9359375   0.6609375 ]
 [ 0.33095703 -1.33935547]]
funkcni hodnoty bodu =  [[1.05788849]
 [1.05788849]
 [1.05788849]]
Krok:  14
souradnice bodu =  [[ 0.31225586 -0.74633789]
 [-0.34882812 -0.96757812]
 [ 0.9359375   0.6609375 ]]
funkcni hodnoty bodu =  [[0.65452397]
 [0.65452397]
 [0.65452397]]
Krok:  15
souradnice bodu =  [[ 0.45882568 -0.09801025]
 [ 0.31225586 -0.74633789]
 [-0.34882812 -0.96757812]]
funkcni hodnoty bodu =  [[0.22012702]
 [0.22012702]
 [0.22012702]]
Krok:  16
souradnice bodu =  [[ 0.45882568 -0.09801025]
 [ 0.05499878 -0.53279419]
 [ 0.38554077 -0.42217407]]
funkcni hodnoty bodu =  [[0.22012702]
 [0.28689451]
 [0.28689451]]
Krok:  17
souradnice bodu =  [[-3.44848633e-04 -1.01858521e-01]
 [ 4.58825684e-01 -9.80102539e-02]
 [ 5.49987793e-02 -5.32794189e-01]]
funkcni hodnoty bodu =  [[0.01037528]
 [0.01037528]
 [0.01037528]]
Krok:  18
souradnice bodu =  [[-0.00034485 -0.10185852]
 [ 0.22924042 -0.09993439]
 [ 0.02732697 -0.31732635]]
funkcni hodnoty bodu =  [[0.01037528]
 [0.06253805]
 [0.10144278]]
Krok:  19
souradnice bodu =  [[-0.00034485 -0.10185852]
 [ 0.2015686   0.11553345]
 [ 0.22924042 -0.09993439]]
funkcni hodnoty bodu =  [[0.01037528]
 [0.05397788]
 [0.05397788]]
Krok:  20
souradnice bodu =  [[-0.00034485 -0.10185852]
 [-0.02801666  0.11360931]
 [ 0.2015686   0.11553345]]
funkcni hodnoty bodu =  [[0.01037528]
 [0.01369201]
 [0.01369201]]
Krok:  21
souradnice bodu =  [[-0.00034485 -0.10185852]
 [ 0.09369392  0.06070442]
 [-0.02801666  0.11360931]]
funkcni hodnoty bodu =  [[0.01037528]
 [0.01246358]
 [0.01246358]]
Krok:  22
souradnice bodu =  [[ 0.00932894  0.04651613]
 [-0.00034485 -0.10185852]
 [ 0.09369392  0.06070442]]
funkcni hodnoty bodu =  [[0.00225078]
 [0.00225078]
 [0.00225078]]
Krok:  23
souradnice bodu =  [[ 0.00449204 -0.02767119]
 [ 0.00932894  0.04651613]
 [ 0.05151143  0.05361028]]
funkcni hodnoty bodu =  [[0.00078587]
 [0.00078587]
 [0.00552749]]
Krok:  24
souradnice bodu =  [[-0.01538998 -0.01267143]
 [ 0.00449204 -0.02767119]
 [ 0.00932894  0.04651613]]
funkcni hodnoty bodu =  [[0.00039742]
 [0.00039742]
 [0.00039742]]
Krok:  25
souradnice bodu =  [[ 0.00193999  0.01317241]
 [-0.01538998 -0.01267143]
 [ 0.00449204 -0.02767119]]
funkcni hodnoty bodu =  [[0.00017728]
 [0.00017728]
 [0.00017728]]
Krok:  26
souradnice bodu =  [[-0.006725    0.00025049]
 [ 0.00193999  0.01317241]
 [ 0.00321601 -0.00724939]]
funkcni hodnoty bodu =  [[4.52883266e-05]
 [4.52883266e-05]
 [6.28964438e-05]]
Krok:  27
souradnice bodu =  [[ 0.00041175 -0.00026897]
 [-0.006725    0.00025049]
 [ 0.00193999  0.01317241]]
funkcni hodnoty bodu =  [[2.41887841e-07]
 [2.41887841e-07]
 [2.41887841e-07]]
Krok:  28
souradnice bodu =  [[ 4.11754474e-04 -2.68972293e-04]
 [-3.15662120e-03 -9.24263149e-06]
 [ 1.17586982e-03  6.45171832e-03]]
funkcni hodnoty bodu =  [[2.41887841e-07]
 [9.96434280e-06]
 [4.30073391e-05]]
Krok:  29
souradnice bodu =  [[ 4.11754474e-04 -2.68972293e-04]
 [-3.15662120e-03 -9.24263149e-06]
 [-9.82817728e-05  3.15630543e-03]]
funkcni hodnoty bodu =  [[2.41887841e-07]
 [9.96434280e-06]
 [9.97192328e-06]]
Krok:  30
souradnice bodu =  [[ 4.11754474e-04 -2.68972293e-04]
 [-7.35357567e-04  1.50859898e-03]
 [-3.15662120e-03 -9.24263149e-06]]
funkcni hodnoty bodu =  [[2.41887841e-07]
 [2.81662165e-06]
 [2.81662165e-06]]
Krok:  31
souradnice bodu =  [[ 0.00041175 -0.00026897]
 [-0.0001618   0.00061981]
 [-0.00137243 -0.00013911]]
funkcni hodnoty bodu =  [[2.41887841e-07]
 [4.10348324e-07]
 [1.90292422e-06]]
Krok:  32
souradnice bodu =  [[ 4.11754474e-04 -2.68972293e-04]
 [-6.23728448e-04  1.81565323e-05]
 [-1.61801546e-04  6.19813346e-04]]
funkcni hodnoty bodu =  [[2.41887841e-07]
 [3.89366837e-07]
 [3.89366837e-07]]
Krok:  33
souradnice bodu =  [[-1.33894267e-04  2.47202733e-04]
 [ 4.11754474e-04 -2.68972293e-04]
 [-6.23728448e-04  1.81565323e-05]]
funkcni hodnoty bodu =  [[7.90368658e-08]
 [7.90368658e-08]
 [7.90368658e-08]]
Krok:  34
souradnice bodu =  [[-2.42399172e-04  3.63587624e-06]
 [-1.33894267e-04  2.47202733e-04]
 [ 4.11754474e-04 -2.68972293e-04]]
funkcni hodnoty bodu =  [[5.87705784e-08]
 [5.87705784e-08]
 [5.87705784e-08]]
Krok:  35
souradnice bodu =  [[ 1.11803877e-04 -7.17764940e-05]
 [-2.42399172e-04  3.63587624e-06]
 [-1.33894267e-04  2.47202733e-04]]
funkcni hodnoty bodu =  [[1.76519721e-08]
 [1.76519721e-08]
 [1.76519721e-08]]
Krok:  36
souradnice bodu =  [[-6.52976476e-05 -3.40703089e-05]
 [ 1.11803877e-04 -7.17764940e-05]
 [-1.10451948e-05  8.77131194e-05]]
funkcni hodnoty bodu =  [[5.42456873e-09]
 [5.42456873e-09]
 [7.81558765e-09]]
Krok:  37
souradnice bodu =  [[ 6.10396003e-06  1.73948590e-05]
 [-6.52976476e-05 -3.40703089e-05]
 [ 1.11803877e-04 -7.17764940e-05]]
funkcni hodnoty bodu =  [[3.39839448e-10]
 [3.39839448e-10]
 [3.39839448e-10]]
Krok:  38
souradnice bodu =  [[ 6.10396003e-06  1.73948590e-05]
 [-2.95968438e-05 -8.33772494e-06]
 [ 5.89539186e-05 -2.71908175e-05]]
funkcni hodnoty bodu =  [[3.39839448e-10]
 [9.45490818e-10]
 [4.21490508e-09]]
Krok:  39
souradnice bodu =  [[ 6.10396003e-06  1.73948590e-05]
 [ 2.36037384e-05 -1.13311252e-05]
 [-2.95968438e-05 -8.33772494e-06]]
funkcni hodnoty bodu =  [[3.39839448e-10]
 [6.85530865e-10]
 [6.85530865e-10]]
Krok:  40
souradnice bodu =  [[-7.37149728e-06 -2.65292903e-06]
 [ 6.10396003e-06  1.73948590e-05]
 [ 2.36037384e-05 -1.13311252e-05]]
funkcni hodnoty bodu =  [[6.13770046e-11]
 [6.13770046e-11]
 [6.13770046e-11]]
Krok:  41
souradnice bodu =  [[-6.33768624e-07  7.37096498e-06]
 [-7.37149728e-06 -2.65292903e-06]
 [ 8.11612055e-06 -6.99202713e-06]]
funkcni hodnoty bodu =  [[5.47327875e-11]
 [5.47327875e-11]
 [1.14759856e-10]]
Krok:  42
souradnice bodu =  [[ 2.05674380e-06 -2.31650458e-06]
 [-6.33768624e-07  7.37096498e-06]
 [-7.37149728e-06 -2.65292903e-06]]
funkcni hodnoty bodu =  [[9.59638851e-12]
 [9.59638851e-12]
 [9.59638851e-12]]
Krok:  43
souradnice bodu =  [[ 7.11487587e-07  2.52723020e-06]
 [ 2.05674380e-06 -2.31650458e-06]
 [-2.65737674e-06 -2.48471680e-06]]
funkcni hodnoty bodu =  [[6.89310709e-12]
 [6.89310709e-12]
 [1.32354687e-11]]
Krok:  44
souradnice bodu =  [[-6.36630524e-07 -1.18967700e-06]
 [ 7.11487587e-07  2.52723020e-06]
 [ 2.05674380e-06 -2.31650458e-06]]
funkcni hodnoty bodu =  [[1.82062978e-12]
 [1.82062978e-12]
 [1.82062978e-12]]
Krok:  45
souradnice bodu =  [[ 1.04708617e-06 -8.23863987e-07]
 [-6.36630524e-07 -1.18967700e-06]
 [ 7.11487587e-07  2.52723020e-06]]
funkcni hodnoty bodu =  [[1.77514131e-12]
 [1.77514131e-12]
 [1.77514131e-12]]
Krok:  46
souradnice bodu =  [[ 4.58357704e-07  7.60229856e-07]
 [ 1.04708617e-06 -8.23863987e-07]
 [-6.36630524e-07 -1.18967700e-06]]
funkcni hodnoty bodu =  [[7.88041219e-13]
 [7.88041219e-13]
 [7.88041219e-13]]
Krok:  47
souradnice bodu =  [[ 5.80457054e-08 -6.10747031e-07]
 [ 4.58357704e-07  7.60229856e-07]
 [ 1.04708617e-06 -8.23863987e-07]]
funkcni hodnoty bodu =  [[3.76381239e-13]
 [3.76381239e-13]
 [3.76381239e-13]]
Krok:  48
souradnice bodu =  [[ 2.58201705e-07  7.47414126e-08]
 [ 5.80457054e-08 -6.10747031e-07]
 [ 5.52565935e-07 -7.17305509e-07]]
funkcni hodnoty bodu =  [[7.22543991e-14]
 [7.22543991e-14]
 [8.19856306e-13]]
Krok:  49
souradnice bodu =  [[-3.90974101e-08 -4.33514591e-08]
 [ 2.58201705e-07  7.47414126e-08]
 [ 5.80457054e-08 -6.10747031e-07]]
funkcni hodnoty bodu =  [[3.40795648e-15]
 [3.40795648e-15]
 [3.40795648e-15]]
Krok:  50
souradnice bodu =  [[-3.90974101e-08 -4.33514591e-08]
 [ 1.09552147e-07  1.56949768e-08]
 [ 9.47414767e-09 -3.27049245e-07]]
funkcni hodnoty bodu =  [[3.40795648e-15]
 [1.22480053e-14]
 [1.07050968e-13]]
Krok:  51
souradnice bodu =  [[-3.90974101e-08 -4.33514591e-08]
 [ 1.09552147e-07  1.56949768e-08]
 [ 4.81039791e-08  1.42782261e-07]]
funkcni hodnoty bodu =  [[3.40795648e-15]
 [1.22480053e-14]
 [2.27007668e-14]]
Krok:  52
souradnice bodu =  [[-3.90974101e-08 -4.33514591e-08]
 [ 4.16656739e-08  6.44770098e-08]
 [ 1.09552147e-07  1.56949768e-08]]
funkcni hodnoty bodu =  [[3.40795648e-15]
 [5.89331317e-15]
 [5.89331317e-15]]
Krok:  53
souradnice bodu =  [[ 5.54181396e-08  1.31288761e-08]
 [-3.90974101e-08 -4.33514591e-08]
 [ 4.16656739e-08  6.44770098e-08]]
funkcni hodnoty bodu =  [[3.24353759e-15]
 [3.24353759e-15]
 [3.24353759e-15]]
Krok:  54
souradnice bodu =  [[ 2.49130193e-08  2.46828591e-08]
 [ 5.54181396e-08  1.31288761e-08]
 [-3.90974101e-08 -4.33514591e-08]]
funkcni hodnoty bodu =  [[1.22990207e-15]
 [1.22990207e-15]
 [1.22990207e-15]]
Krok:  55
souradnice bodu =  [[ 5.34084704e-10 -1.22227957e-08]
 [ 2.49130193e-08  2.46828591e-08]
 [ 5.54181396e-08  1.31288761e-08]]
funkcni hodnoty bodu =  [[1.49681982e-16]
 [1.49681982e-16]
 [1.49681982e-16]]
Krok:  56
souradnice bodu =  [[ 5.34084704e-10 -1.22227957e-08]
 [ 1.27235520e-08  6.23003170e-09]
 [ 2.79761122e-08  4.53040164e-10]]
funkcni hodnoty bodu =  [[1.49681982e-16]
 [2.00702071e-16]
 [7.82868097e-16]]
Krok:  57
souradnice bodu =  [[-4.04482854e-09 -4.72109311e-09]
 [ 5.34084704e-10 -1.22227957e-08]
 [ 1.27235520e-08  6.23003170e-09]]
funkcni hodnoty bodu =  [[3.86493581e-17]
 [3.86493581e-17]
 [3.86493581e-17]]
Krok:  58
souradnice bodu =  [[ 5.48409005e-09 -1.12095636e-09]
 [-4.04482854e-09 -4.72109311e-09]
 [ 5.34084704e-10 -1.22227957e-08]]
funkcni hodnoty bodu =  [[3.13317868e-17]
 [3.13317868e-17]
 [3.13317868e-17]]
Krok:  59
souradnice bodu =  [[ 7.19630754e-10 -2.92102473e-09]
 [ 5.48409005e-09 -1.12095636e-09]
 [ 3.00908738e-09 -6.67187605e-09]]
funkcni hodnoty bodu =  [[9.05025392e-18]
 [9.05025392e-18]
 [5.35685368e-17]]
Krok:  60
souradnice bodu =  [[ 7.19630754e-10 -2.92102473e-09]
 [ 5.48409005e-09 -1.12095636e-09]
 [ 3.14824691e-09  3.04452202e-10]]
funkcni hodnoty bodu =  [[9.05025392e-18]
 [9.05025392e-18]
 [1.00041498e-17]]
Krok:  61
souradnice bodu =  [[ 1.93393883e-09 -1.30828627e-09]
 [ 7.19630754e-10 -2.92102473e-09]
 [ 3.10186040e-09 -2.02099055e-09]]
funkcni hodnoty bodu =  [[5.45173237e-18]
 [5.45173237e-18]
 [5.45173237e-18]]
Krok:  62
souradnice bodu =  [[-4.48290814e-10 -2.20832045e-09]
 [ 1.93393883e-09 -1.30828627e-09]
 [ 7.19630754e-10 -2.92102473e-09]]
funkcni hodnoty bodu =  [[5.07764388e-18]
 [5.07764388e-18]
 [5.07764388e-18]]
Krok:  63
souradnice bodu =  [[ 7.66017266e-10 -5.95581985e-10]
 [-4.48290814e-10 -2.20832045e-09]
 [ 1.93393883e-09 -1.30828627e-09]]
funkcni hodnoty bodu =  [[9.41500352e-19]
 [9.41500352e-19]
 [9.41500352e-19]]
Krok:  64
souradnice bodu =  [[ 7.66017266e-10 -5.95581985e-10]
 [ 1.58863226e-10 -1.40195122e-09]
 [ 1.34997805e-09 -9.51934126e-10]]
funkcni hodnoty bodu =  [[9.41500352e-19]
 [1.99070475e-18]
 [2.72861931e-18]]
Krok:  65
souradnice bodu =  [[ 7.66017266e-10 -5.95581985e-10]
 [-4.25097558e-10 -1.04559908e-09]
 [ 1.58863226e-10 -1.40195122e-09]]
funkcni hodnoty bodu =  [[9.41500352e-19]
 [1.27398537e-18]
 [1.27398537e-18]]
Krok:  66
souradnice bodu =  [[ 1.82056482e-10 -2.39229844e-10]
 [ 7.66017266e-10 -5.95581985e-10]
 [-4.25097558e-10 -1.04559908e-09]]
funkcni hodnoty bodu =  [[9.03754809e-20]
 [9.03754809e-20]
 [9.03754809e-20]]
Krok:  67
souradnice bodu =  [[ 1.82056482e-10 -2.39229844e-10]
 [ 4.74036874e-10 -4.17405914e-10]
 [-1.21520538e-10 -6.42414461e-10]]
funkcni hodnoty bodu =  [[9.03754809e-20]
 [3.98938655e-19]
 [4.27463581e-19]]
Krok:  68
souradnice bodu =  [[ 1.82056482e-10 -2.39229844e-10]
 [ 1.03263070e-10 -4.85366170e-10]
 [ 4.74036874e-10 -4.17405914e-10]]
funkcni hodnoty bodu =  [[9.03754809e-20]
 [2.46243581e-19]
 [2.46243581e-19]]
Krok:  69
souradnice bodu =  [[ 1.82056482e-10 -2.39229844e-10]
 [-1.88717322e-10 -3.07190100e-10]
 [ 1.03263070e-10 -4.85366170e-10]]
funkcni hodnoty bodu =  [[9.03754809e-20]
 [1.29979985e-19]
 [1.29979985e-19]]
Krok:  70
souradnice bodu =  [[-1.09923910e-10 -6.10537735e-11]
 [ 1.82056482e-10 -2.39229844e-10]
 [-1.88717322e-10 -3.07190100e-10]]
funkcni hodnoty bodu =  [[1.58108292e-20]
 [1.58108292e-20]
 [1.58108292e-20]]
Krok:  71
souradnice bodu =  [[-1.09923910e-10 -6.10537735e-11]
 [ 3.60662861e-11 -1.50141809e-10]
 [-1.49320616e-10 -1.84121937e-10]]
funkcni hodnoty bodu =  [[1.58108292e-20]
 [2.38433397e-20]
 [5.61975339e-20]]
Krok:  72
souradnice bodu =  [[ 7.54629921e-11 -2.70736457e-11]
 [-1.09923910e-10 -6.10537735e-11]
 [ 3.60662861e-11 -1.50141809e-10]]
funkcni hodnoty bodu =  [[6.42764547e-21]
 [6.42764547e-21]
 [6.42764547e-21]]
Krok:  73
souradnice bodu =  [[-1.72304589e-11 -4.40637096e-11]
 [ 7.54629921e-11 -2.70736457e-11]
 [ 5.57646391e-11 -8.86077272e-11]]
funkcni hodnoty bodu =  [[2.23849922e-21]
 [2.23849922e-21]
 [1.09610243e-20]]
Krok:  74
souradnice bodu =  [[ 2.46789414e-12  1.74703719e-11]
 [-1.72304589e-11 -4.40637096e-11]
 [ 7.54629921e-11 -2.70736457e-11]]
funkcni hodnoty bodu =  [[3.11304397e-22]
 [3.11304397e-22]
 [3.11304397e-22]]
Krok:  75
souradnice bodu =  [[-7.38128236e-12 -1.32966688e-11]
 [ 2.46789414e-12  1.74703719e-11]
 [ 3.89654431e-11 -4.80163686e-12]]
funkcni hodnoty bodu =  [[2.31284731e-22]
 [2.31284731e-22]
 [1.54136147e-21]]
Krok:  76
souradnice bodu =  [[-7.38128236e-12 -1.32966688e-11]
 [ 2.46789414e-12  1.74703719e-11]
 [ 1.82543745e-11 -1.35739265e-12]]
funkcni hodnoty bodu =  [[2.31284731e-22]
 [2.31284731e-22]
 [3.35064704e-22]]
Krok:  77
souradnice bodu =  [[ 7.89884020e-12  3.64729451e-13]
 [-7.38128236e-12 -1.32966688e-11]
 [ 2.46789414e-12  1.74703719e-11]]
funkcni hodnoty bodu =  [[6.25247041e-23]
 [6.25247041e-23]
 [6.25247041e-23]]
Krok:  78
souradnice bodu =  [[ 1.36333653e-12  5.50220112e-12]
 [ 7.89884020e-12  3.64729451e-13]
 [-7.38128236e-12 -1.32966688e-11]]
funkcni hodnoty bodu =  [[3.21329037e-23]
 [3.21329037e-23]
 [3.21329037e-23]]
Krok:  79
souradnice bodu =  [[-1.37509700e-12 -5.18160177e-12]
 [ 1.36333653e-12  5.50220112e-12]
 [ 7.89884020e-12  3.64729451e-13]]
funkcni hodnoty bodu =  [[2.87398887e-23]
 [2.87398887e-23]
 [2.87398887e-23]]
Krok:  80
souradnice bodu =  [[ 3.94647998e-12  2.62514564e-13]
 [-1.37509700e-12 -5.18160177e-12]
 [ 1.36333653e-12  5.50220112e-12]]
funkcni hodnoty bodu =  [[1.56436181e-23]
 [1.56436181e-23]
 [1.56436181e-23]]
Krok:  81
souradnice bodu =  [[ 1.32451401e-12  1.52132876e-12]
 [ 3.94647998e-12  2.62514564e-13]
 [-1.37509700e-12 -5.18160177e-12]]
funkcni hodnoty bodu =  [[4.06877856e-24]
 [4.06877856e-24]
 [4.06877856e-24]]
Krok:  82
souradnice bodu =  [[-2.52914942e-14 -1.83013651e-12]
 [ 1.32451401e-12  1.52132876e-12]
 [ 2.63549700e-12  8.91921662e-13]]
funkcni hodnoty bodu =  [[3.35003929e-24]
 [3.35003929e-24]
 [3.35003929e-24]]
Krok:  83
souradnice bodu =  [[-1.33627448e-12 -1.20072941e-12]
 [-2.52914942e-14 -1.83013651e-12]
 [ 1.32451401e-12  1.52132876e-12]]
funkcni hodnoty bodu =  [[3.2273806e-24]
 [3.2273806e-24]
 [3.2273806e-24]]
Krok:  84
souradnice bodu =  [[ 3.21865512e-13  2.94790205e-15]
 [-1.33627448e-12 -1.20072941e-12]
 [-2.52914942e-14 -1.83013651e-12]]
funkcni hodnoty bodu =  [[1.03606098e-25]
 [1.03606098e-25]
 [1.03606098e-25]]
Krok:  85
souradnice bodu =  [[ 3.21865512e-13  2.94790205e-15]
 [-5.07204484e-13 -5.98890753e-13]
 [ 1.48287009e-13 -9.13594302e-13]]
funkcni hodnoty bodu =  [[1.03606098e-25]
 [6.15926522e-25]
 [8.56643585e-25]]
Krok:  86
souradnice bodu =  [[ 3.21865512e-13  2.94790205e-15]
 [-3.33625981e-13  3.17651451e-13]
 [-5.07204484e-13 -5.98890753e-13]]
funkcni hodnoty bodu =  [[1.03606098e-25]
 [2.12208740e-25]
 [2.12208740e-25]]
Krok:  87
souradnice bodu =  [[ 3.21865512e-13  2.94790205e-15]
 [-2.56542359e-13 -2.19295538e-13]
 [-3.33625981e-13  3.17651451e-13]]
funkcni hodnoty bodu =  [[1.03606098e-25]
 [1.13904515e-25]
 [1.13904515e-25]]
Krok:  88
souradnice bodu =  [[-1.50482203e-13  1.04738817e-13]
 [ 3.21865512e-13  2.94790205e-15]
 [-2.56542359e-13 -2.19295538e-13]]
funkcni hodnoty bodu =  [[3.3615113e-26]
 [3.3615113e-26]
 [3.3615113e-26]]
Krok:  89
souradnice bodu =  [[-8.54253524e-14 -8.27260893e-14]
 [-1.50482203e-13  1.04738817e-13]
 [ 3.21865512e-13  2.94790205e-15]]
funkcni hodnoty bodu =  [[1.41410967e-26]
 [1.41410967e-26]
 [1.41410967e-26]]
Krok:  90
souradnice bodu =  [[ 1.01955867e-13  6.97713286e-15]
 [-8.54253524e-14 -8.27260893e-14]
 [-1.50482203e-13  1.04738817e-13]]
funkcni hodnoty bodu =  [[1.04436792e-26]
 [1.04436792e-26]
 [1.04436792e-26]]
Krok:  91
souradnice bodu =  [[-7.11084726e-14  3.34321692e-14]
 [ 1.01955867e-13  6.97713286e-15]
 [-8.54253524e-14 -8.27260893e-14]]
funkcni hodnoty bodu =  [[6.17412481e-27]
 [6.17412481e-27]
 [6.17412481e-27]]
Krok:  92
souradnice bodu =  [[-3.50008276e-14 -3.12607191e-14]
 [-7.11084726e-14  3.34321692e-14]
 [ 1.01955867e-13  6.97713286e-15]]
funkcni hodnoty bodu =  [[2.20229049e-27]
 [2.20229049e-27]
 [2.20229049e-27]]
Krok:  93
souradnice bodu =  [[ 2.44506085e-14  4.03142895e-15]
 [-3.50008276e-14 -3.12607191e-14]
 [-7.11084726e-14  3.34321692e-14]]
funkcni hodnoty bodu =  [[6.14084678e-28]
 [6.14084678e-28]
 [6.14084678e-28]]
Krok:  94
souradnice bodu =  [[-5.27510950e-15 -1.36146451e-14]
 [ 2.44506085e-14  4.03142895e-15]
 [-2.33289320e-14  1.87317991e-14]]
funkcni hodnoty bodu =  [[2.13185341e-28]
 [2.13185341e-28]
 [8.95119365e-28]]
Krok:  95
souradnice bodu =  [[-6.87059124e-15  6.97009550e-15]
 [-5.27510950e-15 -1.36146451e-14]
 [ 2.44506085e-14  4.03142895e-15]]
funkcni hodnoty bodu =  [[9.57872553e-29]
 [9.57872553e-29]
 [9.57872553e-29]]
Krok:  96
souradnice bodu =  [[ 9.18887909e-15  3.54577076e-16]
 [-6.87059124e-15  6.97009550e-15]
 [-5.27510950e-15 -1.36146451e-14]]
funkcni hodnoty bodu =  [[8.45612238e-29]
 [8.45612238e-29]
 [8.45612238e-29]]
Krok:  97
souradnice bodu =  [[-2.05798279e-15 -4.97615440e-15]
 [ 9.18887909e-15  3.54577076e-16]
 [-6.87059124e-15  6.97009550e-15]]
funkcni hodnoty bodu =  [[2.89974058e-29]
 [2.89974058e-29]
 [2.89974058e-29]]
Krok:  98
souradnice bodu =  [[-1.65257155e-15  2.32965342e-15]
 [-2.05798279e-15 -4.97615440e-15]
 [ 9.18887909e-15  3.54577076e-16]]
funkcni hodnoty bodu =  [[8.15827777e-30]
 [8.15827777e-30]
 [8.15827777e-30]]
Krok:  99
souradnice bodu =  [[-1.85527717e-15 -1.32325049e-15]
 [-1.65257155e-15  2.32965342e-15]
 [ 3.76815377e-15  1.34211525e-15]]
funkcni hodnoty bodu =  [[5.19304523e-30]
 [5.19304523e-30]
 [1.60002562e-29]]
_images/Cviceni08vyplnene_13_1.png