0

I have a system of equations with L+2 variables that looks something like:

zL = f(z0, ..., z(L-1)), z0 = g(zL), zl = h_l(z(l-1)) for 0<l<L, and m(c)= 0.

Here the functions f,g,h_l (0<l<L) and m are nonlinear, and I already have a method fun_eq(z0,z1,...,zL,c) that returns:

c(z0-g, z1-h_1,z2-h_2 ..., z(L-1)- h_(L-1), zL-f, m(c))

and I would like to determine the value of c(z0,z1,...,zL,c) with all the variables being strictly positive. I tried using:

library(nleqslv)
nleqslv(some_initial_conditions, fun_eq)

but some of the solutions turned out to be negative. Is there a way to restrict my solution space to only positive c(z0,z1,...,zL,c)? or are there other methods to solve nonlinear systems of equations with positivity constraints?

leplata
  • 123
  • 5

0 Answers0