I am trying to use fsolve to find the roots of p non-linear equations. These vary from 2 dimensional to, so far, 5 dimensional.
I'm really trying to minimize the log likelihood of an ARCH time series:
L := (t) -> 1/2*T*log(2*Pi)+1/2*Sum(log(h(t)),t = p .. T)+1/2*Sum(y[t]^2/h(t),t = p .. T):
h := (t) -> alpha + alpha*y[t-1]^2 + alpha*y[t-2]^2 ... + alpha[p]*u[y-p]^2:
y[t] are observed data.
I've used the p partial derivatives to solve for dL/dalpha=0 using fsolve and intervals alpha=0..1. Occasionally, it works fine and estimates the parameter vector alpha reasonably. However, sometimes it takes about 30-60 seconds and just returns the equation and no answer: