Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

calculations in findRoot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100086] calculations in findRoot
  • From: hesami.phy at gmail.com
  • Date: Fri, 22 May 2009 23:40:41 -0400 (EDT)

Hello,
In my program(with mathematica 5), I want to determine rB=R(peak),rV=R
(valley);
 r1[l],r2[l] if vV[l]=EF=82=A3EE=EF=82=A3vB[l].
question:
in option FindRoot[D[vt[l,r],r]==0,{r,r0}] How I choose r0 until for
each "l" solution rB=R(peak),rV=R(valley),r1[l],r2[l] be correct?
Pleas guide me.
Thanks.

my program:

vt[l_, r_] := v0/\((1 + Exp[\((
    r - R0)\)/a0])\) + 1.439*\ z1\ z2\ /r\  + \ \((\((197.327)\)^2\ \ l
\ \((
      l + 1)\))\)/\((2\ m\ r\^2)\)\)

R0=8.9436;a0=0.626;v0=-81.9;z1=8;z2=62;EE=50;l=61;m=13496.77059;hc=197.327;


rB[l_]:=FindRoot[D[vt[l,r],r]==0,{r,10}]

vB[l_]:=vt[l,r]/.{r\[Rule]rB[l][[1,2]]}

rV[l_]:=FindRoot[D[vt[l,r],r]==0,{r,8}]

vV[l_]:=vt[l,r]/.{r\[Rule]rV[l][[1,2]]}

r1[l_]:=If[vV[l]
  =E2=89=A4EE=E2=89=A4vB[l],FindRoot[vt[l,r]-EE==0,{r,rV[l][[1,2]],rB[l][[1,2]]}]]

r2[l_]:=If[vV[l]=E2=89=A4EE=E2=89=A4vB[l],FindRoot[vt[l,r]-EE==0,{r,rB[l][[1,2]],14}]]

h=CE=A9[l_]:=Sqrt[Abs[((hc)^2/m)*D[vt[l,r],{r,2}]]]%/.r\[Rule]rB[l][[1,2]];

\!\(s[l_] := If[vV[
    l] =E2=89=A4 EE =E2=89=A4 vB[
        l], Sqrt[2*m/\((hc)\)^2]*\
            NIntegrate[\@\((\(-EE\) + vt[l, r])\), {r, \(r1[l]\)[\
([1,
          2]\)], \(r2[l]\)[\([1, 2]\)]}]] // Chop\)

t[l_]:=Which[vB[l]=E2=89=A4EE,1/(1+Exp[(2 =CF=80 (vB[l]-
      EE)/h=CE=A9[l])]),vV[l]=E2=89=A4EE=E2=89=A4vB[l],1/(1+Exp[2 s[l]]),EE=E2=89=A4vV[l],0]//Chop

=CF=83[l_,EE_]:==CF=80*(hc)^2*(2 l+1)*t[l]/(2*m*EE)

=CF=83[EE_]:=10 (=CF=83[0,
  EE]+=CF=83[1,EE]+=CF=83[2,EE]+=CF=83[3,EE]+=CF=83[4,EE]+=CF=83[5,EE]+=CF=83[6,EE]+=CF=83[7,EE]+=CF=83[8,EE]+=CF=83
[9,
        EE]+=CF=83[10,EE]+=CF=83[11,EE]+=CF=83[12,EE]+=CF=83[13,EE]+=CF=83[14,EE]+=CF=83[15,EE]+=CF=83
[16,
        EE]+=CF=83[17,EE]+=CF=83[18,EE]+=CF=83[19,EE]+=CF=83[20,EE]+=CF=83[21,EE]+=CF=83[22,EE]+=CF=83
[23,EE]+=CF=83[
        24,EE]+=CF=83[25,EE]+=CF=83[26,EE]+=CF=83[27,EE]+=CF=83[28,EE]+=CF=83[29,EE]+=CF=83[
        30,EE]+=CF=83[31,EE]+=CF=83[32,EE]+=CF=83[33,EE]+=CF=83[34,EE]+=CF=83[35,EE]+=CF=83[
        36,EE]+=CF=83[37,EE]+=CF=83[38,EE]+=CF=83[39,EE]+=CF=83[40,EE]+=CF=83[41,EE]+=CF=83[
        42,EE]+=CF=83[43,EE]+=CF=83[44,EE]+=CF=83[45,EE]+=CF=83[46,EE]+=CF=83[47,EE]+=CF=83[
        48,EE]+=CF=83[49,EE]+=CF=83[50,EE]+=CF=83[51,EE]+=CF=83[52,EE]+=CF=83[53,EE]+=CF=83[
        54,EE]+=CF=83[55,EE]+=CF=83[56,EE]+=CF=83[57,EE]+=CF=83[58,EE]+=CF=83[59,EE])

{EE,=CF=83[EE]}

({50, 6.025565489081184`*10^-8}\)


   but soultion below is corect.",


{50, 6.521257897`*10^-8}


  • Prev by Date: Re: 100,000 posts!
  • Next by Date: Re: Integrate Bug
  • Previous by thread: Re: Copy error message from messages window to clipboard?
  • Next by thread: Re: calculations in findRoot