MATH 589B due March 19, 2023 Algorithms of Applied Mathematics II
Section 001, Spring 2023
Midterm
1. Minimize
���1(���,���,���) = exp(13��� +21��� −34���) +exp(−21��� −34��� +55���) + ?exp(2��� +���) +exp(−2��� −���)?/1000
Solution: Use only gradient method I get
��� = 0.001239572480721367, ��� = 0.002031358808021369, ��� = −0.003770604145803503
and
��� (���,���,���) = 1.9465798782509387.
I tried backtracking, but the code will stuck in the loop. Also, I tried newton’s method, but keep having the singular matrix issue.
2. Let ���(���) = 45 + ���1��� + ���2���2 + ���3���3. Minimize
1
2?2
Plot 1/���(���) as a function of ���, over the range 0 ≤ ��� ≤ 1, for the optimal values of ���1, ���2, and ���3.
���2(���1,���2,���3) =
d���
?d��� d���
−���
∫
0
3.Maximize���3(���,���,���)=���2+���2+���2subjectto���4+���4+���4+10���2+16���2 =154. Solution: Tried newton;s methods, stuck in backtracking. Used gradient ascent,
4. Maximize
34 ���4(���1,���1,���2,���2,���3,���3,���4,���4) = ∑︁ ∑︁ h(������ −������)2 + (������ −������)2i
subjectto������2+������2 ≤1,where1≤���≤4.
���=1 ���=���+1
5. An elastic ring between two vertical sheets of glass (so it does not fall, and ��� = 0) is standing on a table (��� ≥ 0). Minimize
20
���5(���1,���2,...,���20,���1,���2,...,���20)=∑︁h 1 ������+?������−1−2������+������+1?2+?������−1−2������+������+1?2i 150
���=1
subject to (������ − ������−1)2 + (������ − ������−1)2 = (1/20)2 for all 1 ≤ ��� ≤ 20 equality constraints, and ������ ≥ 0 for all 1 ≤ ��� ≤ 20 inequality constraints. The manipulations with indices are done modulo 20, so (���0, ���0) and (���21, ���21) are identified with (���20, ���20) and (���1, ���1), respectively. Plot the solution by drawing points (������, ������) and connecting consecutive points by segments on the ������-plane.
Minimizing or maximizing means finding the position where the optimum is achieved, also report the optimal value. You can use built-in elementary functions, linear algebra and ODE functions/solvers.