Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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[2] Sqrt[Sqrt[1/m1^2 + 20 Sqrt[3118] (1/m1)^(3/2) Sqrt[1/50] + 
   3118020 Sqrt[3118] Sqrt[1/m1] (1/50)^(3/2) + 24304810001/50^2 + 
   623602/(m1* 50)] - 10 Sqrt[3118] Sqrt[1/m1] Sqrt[1/50] - 155900/50]

and graph for this function is:

enter image description here

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?

share|improve this question
    
THis might be along the lines of what you want. In[231]:= Quiet[ Table[m1 /. FindRoot[f1 == j, {m1, 100}], {j, .2, .1, -.01}]] Out[231]= {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 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 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 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 at 15:45
add comment

2 Answers 2

up vote 1 down vote accepted

Use Solve.

f1[m1_] := Sqrt[2] Sqrt[Sqrt[1/m1^2 + 20 Sqrt[3118] (1/m1)^(3/2) Sqrt[1/50] + 
       3118020 Sqrt[3118] Sqrt[1/m1] (1/50)^(3/2) + 
       24304810001/50^2 + 623602/(m1*50)] - 
       10 Sqrt[3118] 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}}]

Mathematica graphics

 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}
share|improve this answer
    
thank you so much, its the answer and its right. –  aghil123 Jan 23 at 12:07
    
Dear i want to apply this code but it gives me errore in mapthread line –  aghil123 Apr 21 at 2:28
    
@aghil123 There was a typo at one line end (l instead of ;), corrected now. Please check. –  István Zachar Apr 22 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 at 13:05
add comment

If

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

then

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

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

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[{#[[1]] <= f1 <= #[[2]], m1 <= 1000}, m1, Reals] & /@  intervals
share|improve this answer
    
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 at 1:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.