# How to find intervals in the domain corresponding to intervals in the range?

I want to find the intervals for the argument m1 of this function corresponding to the value for the function lying in given intervals of the range:

F1==Sqrt Sqrt[Sqrt[1/m1^2 + 20 Sqrt (1/m1)^(3/2) Sqrt[1/50] +
3118020 Sqrt Sqrt[1/m1] (1/50)^(3/2) + 24304810001/50^2 +
623602/(m1* 50)] - 10 Sqrt Sqrt[1/m1] Sqrt[1/50] - 155900/50]


and graph for this function is: For example I want to find the range of intervals of m1 when I divide a given range for F1 into 10 equal intervals. How do I tell the software to divide a range into 10 equal interval and give the corresponding intervals for m1?

• THis might be along the lines of what you want. In:= Quiet[ Table[m1 /. FindRoot[f1 == j, {m1, 100}], {j, .2, .1, -.01}]] Out= {50.1792464866, 55.6107747091, 61.9743927038, \ 69.4962425108, 78.4754522385, 89.3143417388, 102.564285935, \ 118.997248446, 139.72082195, 166.369869733, 201.43913107} – Daniel Lichtblau Jan 22 '14 at 18:56
• In this problem I want to divide the axis for f1 to equal intervals and find the corresponding amount for m1 axis. if I want to explain more, I want to find equal interval in Y axis(f1) rather than X axis(m1). its problem because all function are define to find intervals for X axis intervals. – aghil123 Jan 23 '14 at 0:51
• @DanielLichtblau, I dont know which method did you used? but your method just divide until 100, I want to start from 50 to 400, In this problem I want Y axis intervals be same but X axis interval different and corresponding to Y axis – aghil123 Jan 23 '14 at 0:56
• The code I show has equal y axis intervals of 1/100. It then computes the corresponding endpoints of the x (actually m1) axis intervals. – Daniel Lichtblau Jan 23 '14 at 15:45

Use Solve.

f1[m1_] := Sqrt Sqrt[Sqrt[1/m1^2 + 20 Sqrt (1/m1)^(3/2) Sqrt[1/50] +
3118020 Sqrt Sqrt[1/m1] (1/50)^(3/2) +
24304810001/50^2 + 623602/(m1*50)] -
10 Sqrt Sqrt[1/m1] Sqrt[1/50] - 155900/50];


Define a minimum, maximum and resolution for the interval, here I used small values so that the interval lines show up in the plot:

{min, max, n} = {.1, .3, 10};
int = Range[min, max, N[(max - min)/n]];
sol = m /. Solve[f1@m == #, m] & /@ int // Flatten;
Plot[f1@m1, {m1, 0, 400}, Epilog -> {Dashed, Opacity@.5,
MapThread[Line@{{0, #1}, {#2, #1},  {#2, 0}}&, {int, sol}]},
PlotRange -> {{0, 400}, {0, .5}}] Thread[int -> sol]  (* f1 -> m1 *)

{0.1 -> 201.439, 0.12 -> 139.721, 0.14 -> 102.564, 0.16 -> 78.4755,
0.18 -> 61.9744, 0.2 -> 50.1792, 0.22 -> 41.4569, 0.24 -> 34.8259,
0.26 -> 29.6673, 0.28 -> 25.5754, 0.3 -> 22.2752}

• thank you so much, its the answer and its right. – aghil123 Jan 23 '14 at 12:07
• Dear i want to apply this code but it gives me errore in mapthread line – aghil123 Apr 21 '14 at 2:28
• @aghil123 There was a typo at one line end (l instead of ;), corrected now. Please check. – István Zachar Apr 22 '14 at 9:01
• it was corrected but actually my equation is too long when I applied this method I wait for long time but didn't get answer. do you have any idea for long equations??? maybe use NSolve or NDsolve instead of Solve??? – aghil123 May 31 '14 at 13:05

If

f1=Sqrt Sqrt[Sqrt[1/m1^2 + 20 Sqrt (1/m1)^(3/2) Sqrt[1/50] +
3118020 Sqrt Sqrt[1/m1] (1/50)^(3/2) + 24304810001/50^2 +
623602/(m1* 50)] - 10 Sqrt Sqrt[1/m1] Sqrt[1/50] - 155900/50]


then

Limit[f1, m1->0]
(* \[Infinity] *)

min=Limit[f1, m1->Infinity]
(* 1/5 Sqrt[-155900 + Sqrt] *)


therefore you'll need to consider an upper limit, say 2 :

max = 2


Then you can generate the intervals as :

intervals = Partition[Range[min, max, 0.5], 2, 1] ;


and solve for the corresponding ranges for m1 :

sol = Reduce[{#[] <= f1 <= #[], m1 <= 1000}, m1, Reals] & /@  intervals

• this plot is to find m1 VS f1. I want to devide f1 to 10 equal intervals from 50 to 400 and find the corresponding values for m1 in X axis. I dont know why when I Run your method in the last part gives error and dont give explicit and clear intervals for m1?? – aghil123 Jan 23 '14 at 1:03