I want to get 10 solutions nearest to 100, however the following code returns too small answers, how can I realize my thought?
N[FindInstance[Sin[x] == 0 && x < 100, x, 10]]
{{x -> -1523.67}, {x -> -5642.3}, {x -> -1369.73}, {x -> -2858.85},
{x -> -4501.9}, {x -> -5359.56}, {x -> -559.203}, {x -> -3747.92}, {x
-> -424.115}, {x -> -2192.83}}
EDIT: Firstly, thanks for "Syed","Matthew Heaney" and "Bob Hanlon", thank u so much for ur answers. I have read ur reply carefully,but when it comes to my problem, I still don't know how to tackle it. I am pasting the code I wrote in MMA, and please let me explain what I want to do by posting the question.
ClearAll;
Clear["Global'*"];
$RecursionLimit = Infinity;
nco = 1.4681; ncl = 1.4628; nair = 1; rco = 4.2*10^3; rcl =
62.5*10^3; \[CapitalDelta]n = ncl - nair;
wl = 1000;
u = 2*\[Pi]*rcl*((ncl^2 - neffcl^2)^((1/2))/wl);
w = 2*\[Pi]*rcl*((neffcl^2 - nair^2)^((1/2))/wl);
J0 = BesselJ[0, u]; J1 = BesselJ[1, u];
K0 = BesselK[0, w]; K1 = BesselK[1, w];
N[
FindInstance[
J1/(u*J0) == (1 - 2*\[CapitalDelta]n)*(K1/(w*K0)) &&
1.45 < neffcl < 1.463, neffcl, PositiveReals, 50]
]
TM
Plot[{J1/(u*J0), (1 - 2*\[CapitalDelta]n)*(K1/(w*K0))}, {neffcl, -2,
2}]
Plot[{J1/(u*J0), (1 - 2*\[CapitalDelta]n)*(K1/(w*K0))}, {neffcl,
1.453, 1.463}, PlotRange -> {-0.005, 0.005}]
(*TE*)
(*Plot[{J1/(u*J0),(1-2*\[CapitalDelta]n)*(K1/(w*K0))},{neffcl,-2,2},\
WorkingPrecision\[Rule]10]
Plot[{J1/(u*J0),K1/(w*K0)},{neffcl,1.453,1.463},WorkingPrecision\
\[Rule]10,PlotRange\[Rule]{-0.01,0.01}]*)
Clear[neffcl]
And it returns:
{{neffcl -> 1.45092}, {neffcl -> 1.45193}, {neffcl ->
1.45289}, {neffcl -> 1.4538}, {neffcl -> 1.45467}, {neffcl ->
1.45549}, {neffcl -> 1.45628}, {neffcl -> 1.45701}, {neffcl ->
1.45835}, {neffcl -> 1.45951}, {neffcl -> 1.4622}, {neffcl ->
1.46241}, {neffcl -> 1.46257}, {neffcl -> 1.46269}, {neffcl ->
1.46277}}
with pictures:
In the 2nd picture we can see that there are more than 15 solutions for the formula, but it did give 15, actually I want 50(or even 80), I want the solutions from big to small under 1.4628. So how should I make the code work?



x < 100. TryReduce[Sin[x] == 0 && 0 < x < 100]you can adjust the condition onxto get the values you need. Or since the values are multiples ofPicompute whatever range you want. – Rohit Namjoshi Sep 29 '21 at 01:05(sol = Solve[{Sin[x] == 0, 0 <= x <= 100}, x][[-1 ;; -10 ;; -1]]) // N– Bob Hanlon Sep 29 '21 at 03:54