So I have a trefoil and twisted cubic that are very close to intersecting but do not. I know NMinimize
can be used to best approximate the minimum, but it supposedly isn't perfect.
How can I precisely find where the absolute minimum occurs how close these two are to intersecting. What else would I want to use in addition to NMinimize
?
Function: $$ f(a,b)=b^6 \sin ^2\left(\frac{3 a}{2}\right)+\left(\sin (a) \left(\cos \left(\frac{3 a}{2}\right)+2\right)-b^2\right)^2+\cos (a) \cos \left(\frac{3 a}{2}\right)-b^2+2 $$
NMinimize
output: {1.53724, {a -> 1.69939, b -> 1.04861}}
(how do I interpret this???)
Complete Code:
F[a_, b_] := ((2 + Cos[3 a/2] Cos[a]) - (b)^2
+ (((2 + Cos[3 a/2]) Sin[a]) - (b^2))^2)
+ (Sin[3 a/2] (b^3))^2 ;
ContourPlot[
F[a, b], {a, -1, 1}, {b, 0, 4Pi},
Contours -> 20]
NMinimize[(((2 +
Cos[3 a/2] Cos[a]) - (b))^2 + (((2 + Cos[3 a/2]) Sin[
a]) - (b^2))^2) + (Sin[3 a/2] (b^3))^2, {a, b}]