Multivariate Optimization for Detection and Estimation