private double Rp(double I) { I = Math.Abs(I); double T(double r) { Interpolation itp = new LinearInterpolation(t0Table.I, t0Table.T0); double t0 = itp.FindValue(I); itp = new LinearInterpolation(mTable.I, mTable.M); double m = itp.FindValue(I); return((Tw - t0) * Math.Pow((r / R), m) + t0); } double f(double p) { Integral itgN = new SimpsonIntegral(r => { Interpolation2 ditp = new LinearLogInterpolation2(nTable.T, nTable.P, nTable.N); double n = ditp.FindValue(T(r), p); return(n * r); }); return((2 / Math.Pow(R, 2)) * itgN.FindValue(0, R, INTEGRAL_NODES) - (P0 * 7242 / Ts)); } Dichotomy dch = new Dichotomy(f); double pValue = 1; double h = 1; while (f(pValue) * f(pValue + h) > 0) { pValue += h; } pValue = dch.FindSolution(pValue, pValue + h); Integral itgSigma = new SimpsonIntegral(r => { Interpolation2 ditp = new LinearLogInterpolation2(sigmaTable.T, sigmaTable.P, sigmaTable.Sigma); double n = ditp.FindValue(T(r), pValue); return(n * r); }); return(Le / (2 * Math.PI * itgSigma.FindValue(0, R, INTEGRAL_NODES))); }