MATLAB: Fsolve – no solution found for system of equations (there should be one though)

fsolve

I'm trying to use fsolve to numerically solve a system of non-linear equations but it isn't working. Also all the variables in the function (except x(1) and x(2) are constants that I define before the function. This is my code:
myfun = @(x) [(2*theta*(x(1).^4))+(theta*(x(2)).^4)*(tad+aad-1)+((S/4)*(aa+ta-1-(as*ta)))-(c*(x(2)-x(1)));...
((S/4)*(as*ta-ta))+(c*(x(2)-x(1)))+(theta*(x(2)).^4)*(1-aad)-(theta*(x(1)).^(4))];
x0 = [273,273];
[x,fval] = fsolve(myfun,x0)
This is the error code I get
No solution found.
fsolve stopped because the problem appears regular as measured by the gradient,
but the vector of function values is not near zero as measured by the
default value of the function tolerance.
<stopping criteria details>
x =
265.2980 280.7020
fval =
-119.6125
-119.6125

Best Answer

ROOT = roots([256*theta^5*(aad-tad-1)^4, 0, 0, -1024*c*theta^4*(aad-tad-1)^3, -256*S*theta^4*(aad-tad-1)^3*((as-1)*ta+aa-1), 0, 1536*c^2*theta^3*(aad-tad-1)^2, 768*S*theta^3*(aad-tad-1)^2*c*((as-1)*ta+aa-1), 96*S^2*theta^3*(aad-tad-1)^2*((as-1)*ta+aa-1)^2, -1024*c^3*theta^2*(aad-tad-1), -768*S*theta^2*(aad-tad-1)*c^2*((as-1)*ta+aa-1), -192*S^2*theta^2*(aad-tad-1)*c*((as-1)*ta+aa-1)^2, -16*theta*(S^3*(aad-tad-1)*((as-1)*ta+aa-1)^3*theta-16*c^4*(tad+1)), 256*S*c^3*((as-1)*ta+aa-1)*theta, 96*S^2*c^2*((as-1)*ta+aa-1)^2*theta, 16*S^3*c*((as-1)*ta+aa-1)^3*theta, S*(S^3*((as-1)*ta+aa-1)^4*theta+64*c^4*(aa-1))])
x2 = ROOT
x1 = (-4*theta*(aad-tad-1)*ROOT.^4 + 4*ROOT*c + S*((as-1)*ta+aa-1))/(4*c)
That is, the system is nonlinear but can be solved with a polynomial of degree 16.