MathGroup Archive 2007

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

Search the Archive

Trouble with FindRoot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79130] Trouble with FindRoot
  • From: Sooraj R <soorajrnambiar at yahoo.com>
  • Date: Thu, 19 Jul 2007 03:33:36 -0400 (EDT)

Hi all
I have an equation involving Airy Functions, and
Mathematica gives the roots when I use FindRoot.
I need to find the roots for a series of values.(LH
and F)
The result(eh) is an array of 10x16 elements
The initial guess for the first row is given by
ZeroField.
Now for the initial guess for second row, I need to
use the first row as the initial guess, and so on.
How do I do this?
The problem is that I am unable to get rid of the
brackets() and ->.
Does anyone know how to get rid of these two while
using FindRoot.
In that case It would have been more conveninet to
store as an array and manipulate the results at a
later stage.
Here is the code.

eh = Table[0, {10}, {16}];
m = 3.85857975 10^-31;
charge = 1.602 10^-19;
hbar = 1.054571 10^-34;
LH = {88.83663979522105, 93.83693172861489,
98.83720928295747, 
   103.83746882256844, 108.83770913229637,
113.837930338503, 
   118.83813328307562, 123.83831915913095,
128.83848929997706, 
   133.8386450587284, 138.83878774185274,
143.8389185748323, 
   148.8390386868427, 153.83914910653547,
158.83925076412058, 
   163.83934449683832};
F = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} 10^6;
ZeroField = Table[0, {16}];
For[i = 1, i < 17, i++,
 ZeroField[[i]] = (Pi hbar)^2/(2 m charge (LH[[i]]
10^-10)^2)]
ZeroField // MatrixForm;
For[j = 1, j < 11, j++,
 For[i = 1, i < 17, i++,
  
  eh[[j, i]] = 
   FindRoot[
    AiryAi[-( (2*m)/(charge* hbar *F[[j]])^2)^(1/
         3) (Eh charge + charge*F[[j]]*(LH[[i]]
10^-10)/2)] 
      AiryBi[-( (2*m)/(charge* hbar *F[[j]])^2)^(1/
         3) (Eh charge - charge*F[[j]]*(LH[[i]]
10^-10)/2)] == 
     AiryAi[-( (2*m)/(charge* hbar *F[[j]])^2)^(1/
         3) (Eh charge - charge*F[[j]]*(LH[[i]]
10^-10)/2)] 
      AiryBi[-( (2*m)/(charge* hbar *F[[j]])^2)^(1/
         3) (Eh charge + charge*F[[j]]*(LH[[i]]
10^-10)/2)], {Eh, 
     ZeroField[[i]]}]]]
eh // MatrixForm

Many thanks in advance for any help
best regards
Sooraj


      ____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz


  • Prev by Date: Re: annoying documentation in 6 (rant)
  • Next by Date: Annotating Graphics3D ?
  • Previous by thread: A WorkLife FrameWork: Mathematica 6 compatible version released on May 1st
  • Next by thread: Re: Trouble with FindRoot