Have you actually read Optim’s documentation? The first line says: “…for simple “box” constraints (lower and upper bounds)…”.
Box constrains means setting an interval on each variable independently of the others.

People have been interpreting your question as optimization over a bounded parameter space. If you are asking how to use multiple start values, then just embed the call to optimize in a loop, and generate the trial start values in the loop.

I am not sure about the details but I think GradientDescent needs the objective function gradient which will be computed numerically [1] if you don’t provide it. If your X2 still contains a numerical integration routine, it may compute a wrong gradient.

But please post a minimal (20 lines at most) working example if you want help.

Are you talking about using box constraints or these constraints not being fulfilled? If the former then check the links in the top, if the latter I think we might need to see a MWE (minimal working example) to check out what’s going on.

Edit: nevermind, I just saw you already got some help in another thread.