> I am trying to optimize a function of a single variable which has a> very simple form.> > F(x) = A*[cos(x) - r*cos(c)]^2 + B*[sin(x)-r*sin(c)]^2> > where A,B,r,c are all known constants with A,B, and r all positive.> (I know from experience with this problem that numerically A and B> have about the same value, r is close to 1, and x should be close to> c).