# Fitting Simultaneous Equations involving arbitrary function

SPIL just a moment. 0 answers, 0 views
n = {1, 2, 3, 4, 5, 4, 4, 4, 4, 4, 4, 4, 3, 3, 4, 2, 3}

I guessed a function of n. This function is subject to change, so please suggested a different function if required (I can then reproduce "fitFEqnToZero" list, which is written below further down and edit the post).

fC[x_] := a^b*Log[c*x^d] + e

a,b,c,d, and e are arbitrary variables. So please reduce or increase the number of these.

fcForFit = fC /@ n

{e + a^b Log[c], e + a^b Log[2^d c], e + a^b Log[3^d c],
e + a^b Log[4^d c], e + a^b Log[5^d c], e + a^b Log[4^d c],
e + a^b Log[4^d c], e + a^b Log[4^d c], e + a^b Log[4^d c],
e + a^b Log[4^d c], e + a^b Log[4^d c], e + a^b Log[4^d c],
e + a^b Log[3^d c], e + a^b Log[3^d c], e + a^b Log[4^d c],
e + a^b Log[2^d c], e + a^b Log[3^d c]}

I used fcForFit to construct the following list of equations (if you have a different function, I can construct again).

    fitFEqnToZero = {-603 + 13.36 qB (e + a^b Log[c]), -940 +
22 qB (e + a^b Log[2^d c]), -1401+
22 qB (e + a^b Log[3^d c]) +
13 qT (e + a^b Log[3^d c]), -1378 +
22 qB (e + a^b Log[4^d c]) +
22 qT (e + a^b Log[4^d c]), -1431 +
33 qB (e + a^b Log[5^d c]) +
22 qT (e + a^b Log[5^d c]), -1649 +
11 qB (e + a^b Log[4^d c]) +
33 qT (e + a^b Log[4^d c]), -1907 +
11 qB (e + a^b Log[4^d c]) +
33 qT (e + a^b Log[4^d c]), -1718 +
11 qB (e + a^b Log[4^d c]) +
33 qT (e + a^b Log[4^d c]), -1718 +
11 qB (e + a^b Log[4^d c]) +
33 qT (e + a^b Log[4^d c]), -1770 +
11 qB (e + a^b Log[4^d c]) +
33 qT (e + a^b Log[4^d c]), -1587 +
11 qB (e + a^b Log[4^d c]) +
33 qT (e + a^b Log[4^d c]), -1640 +
11 qB (e + a^b Log[4^d c]) +
33 qT (e + a^b Log[4^d c]), -1339 +
13 qB (e + a^b Log[3^d c]) +
22 qT (e + a^b Log[3^d c]), -1297 +
22 qB (e + a^b Log[3^d c]) +
11 qT (e + a^b Log[3^d c]), -1501 +
19 qB (e + a^b Log[4^d c]) +
20 qT (e + a^b Log[4^d c]), -1574 +
8 qB (e + a^b Log[2^d c]) +
13 qT (e + a^b Log[2^d c]), -1297 +
33 qT (e + a^b Log[3^d c])}

Now I want to set fitFEqnToZero[[1]], fitFEqnToZero[[2]]...fitFEqnToZero[[Length[fitFEqnToZero]]]... all to zero and fit simultaneously for the following variables

{qB, a, b, c, d,  e, qT}

with the following constraints

fcoil[1] == 1 && qB <= 2000 && qT <= 2000 && fcoil[2] <= 1 &&
fcoil[3] <= 1 && fcoil[4] <= 1 &&
fcoil[5] <= 1}, 

How can I do this? Is Nsolve, NMinimize or other the most appropriate?

If I use NMinimize should I fit to Total[fitFEqnToZero] == 0? Is this effective the same or could this result in some of the elements in list fitFEqnToZero being non-zero?