0
$\begingroup$

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$
  • 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