[Math] Solving a set of 3 nonlinear equations with constraints

convex optimizationnonlinear optimizationnumerical methods

Problem statement:

I am given 3 sets of equations that govern the force $P$, and also the neutral axis, defined by two variables, the radius from the center $r$ and also the rotation degree in $\theta$.

The three simultaneous nonlinear equations I have to solve are listed below:

$$f_1(P,r,\theta)=P-p_c(r,\theta)$$
$$f_2(P,r,\theta)=e_yP-m_{cx}(r,\theta)$$
$$f_3(P,r,\theta)=e_xP-m_{cy}(r,\theta)$$

In order to obtain $P$,$r$ and $\theta$, I would have to solve for $f_1=0$, $f_2=0$ and $f_3=0$.

$e_y$ and $e_x$ are constants.

The constraints that govern the neutral axis variable are

$$-\infty<r<\infty$$
$$0\leq\theta\leq\pi$$

Additional information:

The $p_c$, $m_{cx}$ and $m_{cy}$ are at least differentiable, in the sense that we assume $\frac{\partial p_c(r,\theta)}{\partial r}$, $\frac{\partial p_c(r,\theta)}{\partial \theta}$ and all the terms inside the Jacobian matrix exist, but can only be evaluated through numerical means. As for the terms in hessian matrix, although it is in principle obtainable via numerical means, but I afraid that the error would be too big to be useful.

Question

how to solve for these system of equations?

Attempts

I am thinking about using quasi-newton method to solve this problem, but I don't know how to incorporate the constraints into the quasi-newton method formulation.

Another way is to formulate this into an optimization problem, i.e, minimize for the following $f$ function

$$f=f_1^2(P,r, \theta)+f_2^2(P,r, \theta)+f_3^2(P,r, \theta)$$

and the following constraints:

$$0\leq\theta\leq\pi$$

Is this a convex optimization problem?

But I don't know what are the techniques I can use in this highly nonlinear optimization problem.

Best Answer

In lack of other information about the system behavior, I'd go for minpack. It has hybrid Powell's method for non-linear equations and Levenberg-Marquardt algorithm for minimization problems, both with explicit Jacobian or its numerical evaluation. There is comprehensive documentation referenced at the wikipedia page (original docs to minpack).

There is a c++ port in eigen's non-linear optimization module. The same algorithms are used by Matlab's fsolve and scipy.optimization.fsolve.