In [1]:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt

In [ ]:


In [2]:
#1

In [45]:
#2
L = 1
N = int(1e3)
a = np.linspace(L * 0.1 , L * 0.9, N)
E = (2 / ((L - a) ** 2) + 1 / (a ** 2))
plt.plot(a, E, '.')
plt.show()



In [52]:
L/(1+ 2 ** (1/3))


Out[52]:
0.4424933340244421

In [47]:
np.argmin(E)


Out[47]:
428

In [31]:
2 ** (1/3)


Out[31]:
1.2599210498948732

In [ ]: