# NSolve or Solve or FindRoot

I need to solve this equation:

A == M/(f d/2 (1 + Sqrt[1 - 3.53 (M/(b d^2 c))]))


to find M,

with:

A = 0 to 19635 for intervals of 5

f = 500 d = 100 to 500 for intervals of 10

b = 100 to 500 for intervals of 10

c = 15 to 60 for intervals of 5

• Table[{A,f,d,b,c, FindRoot[A==M/(f d/2(1+Sqrt[1-353/100 (M/(b d^2 c))])), {M, 1}]}, {A,0,10,5}, {f,500,500}, {d,100,120,10}, {b,100,120,10}, {c,15,25,5}] That shows the parameters and the root. It has problems for some values. Study this. When you understand it then change the range for each parameter to the actual range you want to get the 56548800 solutions that you are asking for
– Bill
Feb 26, 2016 at 21:38

Why you do not solve the equation with respect to M and then create a table for the intervals that you need it estimated i.e.

Module[{a = Solve[A == M/(f d/2 (1 + Sqrt[1 - 3.53 (M/(b d^2 c))])), M]},
ParallelTable[a[[1, 1, 2]] /. f -> 500, {A, 0, 19635, 5}, {d, 100, 500, 10}, {b,
100, 500, 10}, {c, 15, 60, 5}]]

• Note that Module[{s = M /. First@ Solve[A == M/(f d/2 (1 + Sqrt[1 - 3.53 (M/(b d^2 c))])), M] /. f -> 500}, ParallelTable[s, {A, 0, 19635, 5}, {d, 100, 500, 10}, {b, 100, 500, 10}, {c, 15, 60, 5}]] will be substantially faster. (The reason will be apparent if one thinks about what part of the computation is off-loaded onto the subkernels in each case.) Apr 27, 2016 at 13:47

First try to get the solution with constraints as for the variables as you have indicated.

Solve[A == M/(100 d/2 (1 + Sqrt[1 - (353/100) (M/(b d^2 c))])) &&
0 < A < 19635 && 100 < d < 500 && 100 < b 500 &&
15 < c < 60, M, Reals]


There is a fair amount of output but in all cases the solution reduces to:

(100 A b c d - 8825 A^2)/(b c)


Now define a function of the four variables:

f[A_, b_, c_, d_]:= (100 A b c d - 8825 A^2)/(b c)


and then you can use Table to generate the data:

Table[f[A,b,c,d], {A, 0, 19635, 5}, {d, 100, 500, 10},
{b, 100, 500, 10}, {c, 15, 60, 5}]