I Need to solve the following non-reducible transcendental equation. I have done as follows:
Data = Import["FILE NAME", "Table"]; (*get actual data from a file*)
l = Range[31, 249];
(*generate G,t pairs for the equation*)
t = Data[[l, 1]]*10^-3; (*time in ms, convert to s*)
G = Data[[l, 2]];
k = (4*Pi*1.33/633*^-9)*Sin[10 Degree/2];
sb = 0.25*^-3;(*beam size in m*)
\[Omega] = 2;(*speed of rotation in rad/s*)
s = \[Omega]/(2 Degree);
\[Sigma] = Table[0, {Length[l]}]; (*data holder, to be filled in for loop*)
For[j = 1, j <= Length[l], j++,
y = sig /.NSolve[{G[[j]] == Exp[-((k*s*sb*t[[j]])^2)/(2*(k*sb*sig*t[[j]])^2 + 1)]*1/Sqrt[2*(k*sb*sig*t[[j]])^2 + 1]), sig >= 0}, sig, Reals][[1]];
\[Sigma][[j]] = {t[[j]]*10^3, G[[j]], y};
];
\[Sigma]
Everything works until the actual attempt to find the values for sig. Then I begin getting messages:
Solve::ratnz: Solve was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result.
which causes the results to become very inexact. For example at one point I accidentally put a 2 in the numerator of the exponential, and this had no effect on the output results. This means this Ratnz procedure is heavily approximating the solution, to the point of near insensitivity to the actual inputs. As you can see from the following example data, the data is not so different on a point by point basis that insensitivity to a factor of 2 is allowable.
Example Data (will be read in from text file during import):
t(ms) G(t)
1.00000E-003 8.09982E-001
1.20000E-003 8.05885E-001
1.40000E-003 8.02226E-001
How do I get mathematica to solve the system at hand, not a very poor approximation thereof?