Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'FindRoot not sovling a nonlinear system of 4 eqs.' topicStudent Support Forum > General > "FindRoot not sovling a nonlinear system of 4 eqs."

Next Comment >Help | Reply To Topic
Author Comment/Response
JuanC
09/17/12 6:50pm

I don't know why FindRoot is not working to solve a simple system of 4 nonlinear equations. When I write the equations one by one, f1==0, f2==0,... etc, it works, but if I want to group my equations on a List (e.g. fss) and use: FindRoot[fss == {0,0,0,0}... it wouldn't work. Here is a portion of the code:

xss0 = Table[vt[[i]] -> v[[i]], {i, nvar}]

xss1 = Table[vt1[[i]] -> v[[i]], {i, nvar}];

xss = Flatten[{xss0, xss1}]

fss = ff /. xss

In[704]:= fss

Out[704]= {-(0.624787/(1 - H)) + (0.225128 KK^0.4 z)/(c H^0.4),
1/c - (0.98 (0.98 + (0.4 H^0.6 z)/KK^0.6))/c, -c - 0.02 KK +
H^0.6 KK^0.4 z, 0.1 z - 0.1 TextCell[""]}

In[705]:= ceros = Table[0, {Length[v]}];

In[706]:= sstate =
FindRoot[fss == ceros, {KK, 1.0001}, {z, 0.1}, {c, 1.000001}, {H,
0.10001}, DampingFactor -> 1, MaxIterations -> 50000]

During evaluation of In[706]:= FindRoot::nlnum: The function value {-0.637666,0.0297534,-0.994882,0.01 -0.1 }
is not a list of numbers with dimensions {4} at {KK,z,c,H} = {1.0001,0.1,1.,0.10001}. >>

During evaluation of In[706]:= FindRoot::nlnum: The function value {-0.637666,0.0297534,-0.994882,0.01 -0.1 }
is not a list of numbers with dimensions {4} at {KK,z,c,H} = {1.0001,0.1,1.,0.10001}. >>


URL: ,

Subject (listing for 'FindRoot not sovling a nonlinear system of 4 eqs.')
Author Date Posted
FindRoot not sovling a nonlinear system of 4 eqs. JuanC 09/17/12 6:50pm
Re: FindRoot not sovling a nonlinear system of ... jf 09/19/12 3:28pm
Re: Re: FindRoot not sovling a nonlinear system... JuanC 09/20/12 8:13pm
Re: FindRoot not sovling a nonlinear system of ... Bill Simpson 09/19/12 3:34pm
Re: Re: FindRoot not sovling a nonlinear system... JuanC 09/22/12 11:10pm
Re: Re: Re: FindRoot not sovling a nonlinear sy... Bill Simpson 09/23/12 7:15pm
Next Comment >Help | Reply To Topic