Question: Correcting the initial guess in a loop

 

Hi all,

 

I attached a program here and the desire is the calculation of Nu.As you could see through the attached file, the F2(r) function contains an 'integral' which makes it difficult if I want to calculate F2(r=1) and it goes the same for D(F2)(r=\phi). So I firstly corrected the F2(r) function as FF2(r) in which the parameter R is calculated in the top of the file. Afte I replace the values of \phi and 1 in the FF2(r) not in F2(r) just because of the integral. The Nu is calculated finally, but it differs from the initial guess. How could I make a loop in order to correct the initial guess by replacing the first Nu calculated in the end of the program??

Ther is a problem and that is the "k" which must be entered in this part in each loop:

 

Digits:= 10:

K:=Nu->( k )

 

I do not know whether or not it is possible to change it so that the program identify the 'k' and replace it in the "K:=Nu->( k )" for k.

 

SolveCode.mw
 

Download SolveCode.mw

 

Please Wait...