Question: How do I solve this probleme ?

I have a programme which examine how well a particular set of data fits a theoretical function.

In fact, I faced a problem : the programme returns only one solution and I guess in an arbitrary way.

I would like to find a way to define an interval in which the programme seeks solutions .

How can I do so?

 

with (Optimization)
[ImportMPS, Interactive, LPSolve, LSSolve, Maximize, Minimize, NLPSolve,QPSolve];


data := [[2.954488^2, 1.644900e-5], [3.132092^2,1.614900e-5], [3.307416^2, 1.594200e-5], [3.471311^2, 1.550700e-5], [3.559775^2, 1.450200e-5], [3.669332^2, 1.499400e-5], [3.825572^2, 1.476900e-5], [3.962449^2, 4.133000e-8], [4.200714^2, 1.320900e-5],
[4.434636^2, 1.433400e-5], [4.638319^2, 1.259100e-5], [4.832908^2, 1.258500e-5], [5.078484^2,
1.216200e-5], [5.315167^2, 1.164300e-5], [5.662155^2, 1.131000e-5], [5.916080^2, 1.082400e-5],
[6.208865^2, 1.054800e-5], [6.526868^2, 1.002600e-5], [6.880407^2, 1.006200e-5], [7.243618^2, 9.594000e-6], [7.607233^2,
9.288000e-6], [7.916439^2, 8.958000e-6], [8.320457^2, 8.664000e-6], [8.721812^2, 8.439000e-6], [9.007774^2, 8.325000e-6], [8.721812^2, 8.439000e-6], [9.007774^2,8.325000e-6], [9.393083^2, 7.878000e-6], [9.668506^2, 7.755000e-6], [9.988994^2,7.623000e-6], [10.40192^2, 7.367000e-6], [10.94532^2, 6.928000e-6], [11.38244^2,6.812000e-6], [11.85200^2, 6.720000e-6], [12.18811^2, 6.422000e-6], [12.67281^2, 6.403000e-6], [12.96341^2,6.514000e-6], [13.49185^2, 6.032000e-6], [13.76590^2, 6.103000e-6], [14.4072^2,6.143000e-6], [14.45476^2, 6.095000e-6], [14.76313^2, 5.758000e-6], [15.09868^2,6.965000e-6]]:

f:= x -> abs(((2*(c*exp(-b*1.5e-6)/(2*150*(c^2-((1+I)*(sqrt(3.14*x/8.5e-5)))^2)))*(2*(((1-I)*c/(2*(sqrt(3.14*x/8.5e-5))))-((0.026/150)*sqrt(8.5e-5/2e-5)))*exp(-c*0.5e-3)+((1+((0.026/150)*sqrt(8.5e-5/2e-5)))*(1-((1-I)*c/(2*(sqrt(3.14*x/8.5e-5)))))*exp(((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3))-((1-((0.026/150)*sqrt(8.5e-5/2e-5)))*(1+((1-I)*c/(2*(sqrt(3.14*x/8.5e-5)))))*exp(-((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3)))+(b/(2*a*(b^2-((1+I)*(sqrt(3.14*x/9e-6)))^2)*((2*(1-((0.026/150)*sqrt(8.5e-5/2e-5)))*(1+((1-I)*b*a/(2*(sqrt(3.14*x/8.5e-5))*150)))*exp(-((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3-b*1.5e-6))-(2*(1+((0.026/150)*sqrt(8.5e-5/2e-5)))*(1-((1-I)*b*a/(2*(sqrt(3.14*x/8.5e-5))*150)))*exp(((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3-b*1.5e-6))-((1-((0.026/150)*sqrt(8.5e-5/2e-5)))*(1-((a/150)*sqrt(8.5e-5/9e-6)))*(1-((1-I)*b*a/(2*(sqrt(3.14*x/8.5e-5))*150))/((a/150)*sqrt(8.5e-5/9e-6)))*exp(-((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3+((1+I)*(sqrt(3.14*x/9e-6)))*1.5e-6))-((1-((0.026/150)*sqrt(8.5e-5/2e-5)))*(1+((a/150)*sqrt(8.5e-5/9e-6)))*(1+((1-I)*b*a/(2*(sqrt(3.14*x/8.5e-5))*150))/((a/150)*sqrt(8.5e-5/9e-6)))*exp(-((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3-((1+I)*(sqrt(3.14*x/9e-6)))*1.5e-6))+((1+((0.026/150)*sqrt(8.5e-5/2e-5)))*(1+((a/150)*sqrt(8.5e-5/9e-6)))*(1-((1-I)*b*a/(2*(sqrt(3.14*x/8.5e-5))*150))/((a/150)*sqrt(8.5e-5/9e-6)))*exp(((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3+((1+I)*(sqrt(3.14*x/9e-6)))*1.5e-6))+((1+((0.026/150)*sqrt(8.5e-5/2e-5)))*(1-((a/150)*sqrt(8.5e-5/9e-6)))*(1+((1-I)*b*a/(2*(sqrt(3.14*x/8.5e-5))*150))/((a/150)*sqrt(8.5e-5/9e-6)))*exp(((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3-((1+I)*(sqrt(3.14*x/9e-6)))*1.5e-6))))/(((1-((0.026/150)*sqrt(8.5e-5/2e-5)))*exp(-((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3))*(((1-((a/150)*sqrt(8.5e-5/9e-6)))*(1+((0.026/150)*sqrt(8.5e-5/2e-5))/((a/150)*sqrt(8.5e-5/9e-6)))*exp(((1+I)*(sqrt(3.14*x/9e-6)))*1.5e-6))+((1+((a/150)*sqrt(8.5e-5/9e-6)))*(1-((0.026/150)*sqrt(8.5e-5/2e-5))/((a/150)*sqrt(8.5e-5/9e-6)))*exp(-((1+I)*(sqrt(3.14*x/9e-6)))*1.5e-6)))-((1+((0.026/150)*sqrt(8.5e-5/2e-5)))*exp(((1+I)*(sqrt(3.14*x/8.5e-5)))*0.5e-3))*(((1+((a/150)*sqrt(8.5e-5/9e-6)))*(1+((0.026/150)*sqrt(8.5e-5/2e-5))/((a/150)*sqrt(8.5e-5/9e-6)))*exp(((1+I)*(sqrt(3.14*x/9e-6)))*1.5e-6))+((1-((a/150)*sqrt(8.5e-5/9e-6)))*(1-((0.026/150)*sqrt(8.5e-5/2e-5))/((a/150)*sqrt(8.5e-5/9e-6)))*exp(-((1+I)*(sqrt(3.14*x/9e-6)))*1.5e-6)))))))*((1+I)*(sqrt(3.14*x/2e-5)))*exp(-190e-6*((1+I)*(sqrt(3.14*x/2e-5))))):


residuals := map(p -> (f(p[1])-p[2]), data):
R:= LSSolve(residuals);

 

Please Wait...