Path: blob/master/exams/Examen_2018_1_02_solucion.ipynb
934 views
Kernel: Python 3

entre y que corresponden a elongaciones m y m
y donde
con
Para la trayectoria que minimize la acción encuentre y grafique todas la cantidades físicas como velocidad, aceleración y energía.
In [1]:
Out[1]:
Populating the interactive namespace from numpy and matplotlib
In [2]:
In [3]:
La solución analítica corresponde a la ecuación de movimiento: y será usada para comparar con el resultado numérico obtenido
In [4]:
Out[4]:
<matplotlib.legend.Legend at 0x7fd87bff6b70>
In [5]:
In [6]:
Out[6]:
Optimization terminated successfully.
Current function value: -0.199974
Iterations: 64
Function evaluations: 32066
In [7]:
Out[7]:
<matplotlib.legend.Legend at 0x7fd87c00af98>
Equation of motion
In [8]:
for
In [9]:
In [10]:
In [11]:
Out[11]:
((51,), (51,))
In [19]:
In [20]:
In [21]:
In [22]:
Out[22]:
array([0.39985953, 0.39984749, 0.39985763, 0.3998457 , 0.39984897,
0.39984727, 0.39984723, 0.3998489 , 0.39984774, 0.39984946,
0.39984875, 0.39984953, 0.3998494 , 0.39984952, 0.3998496 ,
0.39984955, 0.39984967, 0.39984962, 0.39984968, 0.39984963,
0.39984964, 0.39984959, 0.3998496 , 0.39984963, 0.39984963,
0.39984963, 0.39984963, 0.39984975, 0.39984976, 0.39984955,
0.39984957, 0.39984926, 0.39984926, 0.39985097, 0.39985098,
0.39984836, 0.39984839, 0.39984611, 0.39984611, 0.39985736,
0.39985736, 0.39985112, 0.39985112, 0.39983962, 0.39983962,
0.39984599, 0.39984599, 0.39985989, 0.39985516, 0.39985517])
In [17]:
In [18]:
In [19]:
In [24]:
Out[24]:
4.0
In [25]:
Out[25]:
array([ 4.00384403, 3.99674356, 4.00386907, 3.99892387, 4.00057013,
4.00001362, 3.99941265, 4.00042042, 3.99935043, 4.00027949,
3.99967687, 4.00005971, 3.99994145, 3.999961 , 4.00002761,
3.99992639, 4.00003862, 3.9999509 , 4.00004568, 3.99998345,
4.00006482, 3.99998883, 3.99992221, 4.00000587, 3.99992156,
4.00001006, 4.00029585, 4.00001859, 3.99973623, 4.00001922,
3.99972679, 3.99999932, 4.00113165, 4.00000639, 3.99858417,
4.00001272, 3.99893989, 3.99999993, 4.00464793, 4.00000001,
3.99764861, 4. , 3.99595114, 4. , 4.00213185,
4. , 4.00450912, 3.99848053, 4.00000309])
In [26]:
Out[26]:
<matplotlib.text.Text at 0x7fc3ced57e48>
In [27]:
Out[27]:
(0, 1)
Appendix:
Starting at time 0s
In [28]:
In [29]:
Out[29]:
<matplotlib.legend.Legend at 0x7fc3ced57c18>
In [203]: