0
$\begingroup$

This question already has an answer here:

I would like to save a number that I gain with FindRoot so that I can use it in another function. I tried:

alph := FindRoot[BesselJ[0, x], {x, 0, 2}]
f[x_] := alph*x
Plot[f[x], {x, 0, 10}]

This does not work because alph is not a number but an expression {x -> 2.40483}. So how do I do this correctly?

$\endgroup$

marked as duplicate by Kuba, Mr.Wizard Aug 13 '14 at 9:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    $\begingroup$ alph =x/.FindRoot[BesselJ[0, x], {x, 0, 2}] $\endgroup$ – Apple Aug 13 '14 at 8:48
  • $\begingroup$ See also: (3175), (6669), (9035) $\endgroup$ – Mr.Wizard Aug 13 '14 at 9:07