title: Find root of a transcendental equation with python
body: <p>I have to solve the following transcendental equation</p>
  
  <p>cos(x)/x=c</p>
  
  <p>for given constant c.</p>
  
  <p><strong>For example</strong> I did a short code in Mathematica, where I generated a list of random values for constant c</p>
  
  <pre><code>const = Table[RandomReal[{0, 5}], {i, 1, 10}]
  
  (*{1.67826, 0.616656, 0.290878, 1.10592, 0.0645222, 0.333932, 3.59584, \
  2.70337, 3.91535, 2.78268}*)
  </code></pre>
  
  <p>Than I defined the function</p>
  
  <pre><code>f[x_, i_] := Cos[x]/x - const[[i]]
  </code></pre>
  
  <p>and started looking for the roots:</p>
  
  <pre><code>Table[FindRoot[f[x, i] == 0, {x, 0.1}][[1, 2]], {i, 1, Length[const]}]
  (*{0.517757, 0.947103, 1.21086, 0.694679, 1.47545, 1.16956, 0.26816, \
  0.347764, 0.247615, 0.338922}*)
  </code></pre>
  
  <hr>
  
  <p>Now I would love to programme something similar in python (probably using numpy?) but I can't really find any good existing answer to a problem like that. Could somebody help?</p>