MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Using FindRoot in complex funtion

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71924] Re: Using FindRoot in complex funtion
  • From: "tatsec" <markelbbs at tom.com>
  • Date: Mon, 4 Dec 2006 06:38:51 -0500 (EST)
  • References: <ekucvg$830$1@smc.vnet.net>

Sorry,the program have format's error,the correct program is below,but
it can't solve the problem;

I used FindRoot,the Prgram is

f[x_] := With[{sigma = Sqrt[2], L = 30},
Integrate[(2^(1/2 - L/2)*sigma^(-1 - L)*Abs[t]^((-1 + L)/2)*BesselK[(1
- L)/2, Abs[t]/(sigma^2)])/(Sqrt[Pi]*Gamma[L/2]), {t, 0, x}]];
With[{Pf = 0.000001}, eta = FindRoot[f[x] == (1/2 - Pf), {x, 50}]];

But it can't find the true root;

So I used the function of RootSearch,the program is

Needs["Ersek`RootSearch`"];
f[x_] := With[{sigma = Sqrt[2], L = 30},
Integrate[(2^(1/2 - L/2)*sigma^(-1 - L)*Abs[t]^((-1 + L)/2)*BesselK[(1
- L)/2, Abs[t]/(sigma^2)])/(Sqrt[Pi]*Gamma[L/2]), {t, 0, x}]];
With[{Pf=0.000001},eta = RootSearch[f[x] == (1/2 - Pf), {x, 50,
100}])];

The error Information is "RootSearch::vars: RootSearch was given an an
equation with variables (t, x) when it expected to solve an equation
where the only variable is x.",So anybody can solve this problem;

But
N[With[{sigma = Sqrt[2], L = 30, x = 55}, f[x]], 30]
the result is 0.499996468582504966302482543641

I just used this software,anybody can help me?

Thanks


  • Prev by Date: Re: Re: Ask Mathematica to sub for a long expression
  • Next by Date: (revision) NIntegrate that upper limit is infinite
  • Previous by thread: RE: Using FindRoot in complex funtion
  • Next by thread: Re: Using FindRoot in complex funtion