its been a while since I did this math, but isn&#x27;t it just about taking a derivative and finding the relative minimum&#x2F;maximum points of the function by where the derivative = 0?  (I was on the engineering side of CS, so haven&#x27;t touched calculus since my undergrad days).