Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
| Download
Project: My First Project
Views: 16Image: ubuntu2204
Kernel: SageMath 10.1
In [1]:
In [2]:
Out[2]:
The coordinates for the system are: [(0.000000000000000, 0.000000000000000), (1.20220840214171, -1.30005327605324), (-1.69200563086119, 0.155982019198385), (-1.15445283070817, 1.07210478838143)]
In [3]:
Out[3]:
In [4]:
Out[4]:
U(x,y)= 0.475000000000000*e^(-sqrt((x + 1.69200563086119)^2 + (y - 0.155982019198385)^2)) + 0.280000000000000*e^(-sqrt((x + 1.15445283070817)^2 + (y - 1.07210478838143)^2)) + 0.0850000000000000*e^(-sqrt((x - 1.20220840214171)^2 + (y + 1.30005327605324)^2))
In [5]:
Out[5]:
In [6]:
Out[6]:
In [7]:
Out[7]:
-(0.475*x + 0.8037026746590642)*e^(-sqrt((x + 1.692005630861188)^2 + (y - 0.1559820191983854)^2))/sqrt((x + 1.692005630861188)^2 + (y - 0.1559820191983854)^2) - (0.28*x + 0.32324679259828665)*e^(-sqrt((x + 1.154452830708167)^2 + (y - 1.072104788381431)^2))/sqrt((x + 1.154452830708167)^2 + (y - 1.072104788381431)^2) - (0.085*x - 0.10218771418204578)*e^(-sqrt((x - 1.202208402141715)^2 + (y + 1.300053276053244)^2))/sqrt((x - 1.202208402141715)^2 + (y + 1.300053276053244)^2)
-(0.475*y - 0.07409145911923304)*e^(-sqrt((x + 1.692005630861188)^2 + (y - 0.1559820191983854)^2))/sqrt((x + 1.692005630861188)^2 + (y - 0.1559820191983854)^2) - (0.28*y - 0.3001893407468006)*e^(-sqrt((x + 1.154452830708167)^2 + (y - 1.072104788381431)^2))/sqrt((x + 1.154452830708167)^2 + (y - 1.072104788381431)^2) - (0.085*y + 0.11050452846452574)*e^(-sqrt((x - 1.202208402141715)^2 + (y + 1.300053276053244)^2))/sqrt((x - 1.202208402141715)^2 + (y + 1.300053276053244)^2)
In [8]:
Out[8]:
0.0535654799642751
In [9]:
Out[9]:
Sagemath could not solve this.
TypeError: ECL says: algsys: Couldn't reduce system to a polynomial in one variable.
In [10]:
Out[10]:
The coordinates are (-1.69200563086117, 0.155982019198414), and the utility value is 0.575125068411513
In [11]:
Out[11]:
In [12]:
Out[12]:
Relative position of Global Maxima: -1.69200563086117 0.155982019198414
Position of Global Maxima in degrees: [37.5464750000000, 126.964691670000]
In [13]:
Out[13]:
The constraint inital and endpoints are (-0.979105149518184, -1.02731769582667) and (-0.954615067673043, 1.16569422228989)
The constraint function is:
y= 89.5469411651490*x + 86.6485535225726
In [14]:
Out[14]:
In [15]:
Out[15]:
Our single variable objective function is:
0.0850000000000000*e^(-sqrt((89.5469411651490*x + 87.9486067986258)^2 + (x - 1.20220840214171)^2)) + 0.475000000000000*e^(-sqrt((89.5469411651490*x + 86.4925715033742)^2 + (x + 1.69200563086119)^2)) + 0.280000000000000*e^(-sqrt((89.5469411651490*x + 85.5764487341911)^2 + (x + 1.15445283070817)^2))
In [16]:
Out[16]:
Sagemath did not solve this exactly.
AttributeError: 'Sequence_generic' object has no attribute 'n'
In [17]:
Out[17]:
In [18]:
Out[18]:
The algorithm located the point x= -0.957164834541096
The utility is: 0.386789279125903
In [19]:
Out[19]:
In [20]:
Out[20]:
The coordinates in relative km are: (-0.957164834541096, 0.937370398571517)
In [21]:
Out[21]:
Relative position of Constrained Maxima: -0.957164834541096 0.937370398571517
Position of Constrained Maxima in degrees: [37.5535021945218, 126.973026639140]
In [22]:
Out[22]: