NSolve keeps on running forever

• To: mathgroup at smc.vnet.net
• Subject: [mg82681] NSolve keeps on running forever
• From: "Nabeel Butt" <nabeel.butt at gmail.com>
• Date: Sun, 28 Oct 2007 04:03:50 -0500 (EST)

```Hi Guys,
I have a system of equations that I want to solve.It has a
solution but NSolve seems to keep on running forever.I am pasting the code
over here:
h[y_,t_,\[Beta]0_,\[Beta]1_,\[Beta]2_,\[Beta]3_,\[Sigma]_,\[Gamma]_]:={{v[y,t,\[Beta]0,\[Beta]1,\[Beta]2,\[Beta]3,\[Sigma],\[Gamma]]},{(y[[t-1]])*v[y,t,\[Beta]0,\[Beta]1,\[Beta]2,\[Beta]3,\[Sigma],\[Gamma]]},{((y[[t-1]])^2)*v[y,t,\[Beta]0,\[Beta]1,\[Beta]2,\[Beta]3,\[Sigma],\[Gamma]]},{(((v[y,t,\[Beta]0,\[Beta]1,\[Beta]2,\[Beta]3,\[Sigma],\[Gamma]])^2)-\[Sigma]^2*((y[[t-1]])^3))},{(((v[y,t,\[Beta]0,\[Beta]1,\[Beta]2,\[Beta]3,\[Sigma],\[Gamma]])^2)-\[Sigma]^2*((y[[t-1]])^3))*y[[t-1]]},{(((v[y,t,\[Beta]0,\[Beta]1,\[Beta]2,\[Beta]3,\[Sigma],\[Gamma]])^2)-\[Sigma]^2*((y[[t-1]])^3))*((y[[t-1]])^3)}};
v[y_,t_,\[Beta]0_,\[Beta]1_,\[Beta]2_,\[Beta]3_,\[Sigma]_,\[Gamma]_]:=y[[t]]-y[[t-1]]-\[Beta]0-\[Beta]1*y[[t-1]]-\[Beta]2*((y[[t-1]])^2);
hca[A_,c_,t_,y_,\[Beta]0_,\[Beta]1_,\[Beta]2_,\[Beta]3_,\[Sigma]_,\[Gamma]_]:=(
A.h
[y,t,\[Beta]0,\[Beta]1,\[Beta]2,\[Beta]3,\[Sigma],\[Gamma]])*w[A,c,t,y,\[Beta]0,\[Beta]1,\[Beta]2,\[Beta]3,\[Sigma],\[Gamma]];
w[A_,c_,t_,y_,\[Beta]0_,\[Beta]1_,\[Beta]2_,\[Beta]3_,\[Sigma]_,\[Gamma]_]:=
Min[1,c/Norm[A.h
[y,t,\[Beta]0,\[Beta]1,\[Beta]2,\[Beta]3,\[Sigma],\[Gamma]]]];
*c=5.85;
A={{a11,a12,a13,a14,a15,a16},{a21,a22,a23,a24,a25,a26},{a31,a32,a33,a34,a35,a36},{a41,a42,a43,a44,a45,a46},{a51,a52,a53,a54,a55,a56},{a61,a62,a63,a64,a65,a66}};
y={1,2,3,2,1,4,5,3,2,1};
NSolve[{\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(h = 2\), \(Length[y]\)]hca[A, c, h, y,
\[Beta]0, \[Beta]1, \[Beta]2, \[Beta]3, \[Sigma],
\[Gamma]]\)=={{0},{0},{0},{0},{0},{0}},
1/Length[y]*(\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(s = 2\), \(Length[y]\)]hca[A, c, s, y,
\[Beta]0, \[Beta]1, \[Beta]2, \[Beta]3, \[Sigma], \[Gamma]] .
Transpose[hca[A, c, s, y, \[Beta]0, \[Beta]1, \[Beta]2, \[Beta]3, \[Sigma],
\[Gamma]]]\))=={{1,0,0,0,0,0},{0,1,0,0,0,0},{0,0,1,0,0,0},{0,0,0,1,0,0},{0,0,0,0,1,0},{0,0,0,0,0,1}}},{\[Beta]0,\[Beta]1,\[Beta]2,\[Beta]3,\[Sigma],\[Gamma]}]

regards,

Nabeel*
--
Nabeel Butt
UWO,London