Try to learn something about everything, and everything about somethingThomas Huxley “Darwin's bulldog” (1824-1895)

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
public:calculator:progs:dm41x_progs [14/02/26 11:10 GMT] – [Useful Memo prog] johnpublic:calculator:progs:dm41x_progs [14/02/26 11:19 GMT] (current) – [Using Solve and Integrate together] john
Line 30: Line 30:
 LBL ¬MYSOLVE LBL ¬MYSOLVE
 ¬MOD                    // the label of the program to be solved is put in ALPHA ¬MOD                    // the label of the program to be solved is put in ALPHA
-SOLVE                   // we XEQ SOLVE (the Advantage Pac solver+SOLVE                   // we XEQ SOLVE (the Advantage Pac solver)
 RTN RTN
 </code> </code>
  
-=== MOD ===+=== Solve : MOD ===
  
 The program to be solved The program to be solved
Line 40: Line 40:
 <code> <code>
 LBL ¬MOD LBL ¬MOD
-¬BESSEL +¬BESSEL           // We put the name of the program with the integral in ALPHA 
-STO 00 +STO 00            // We store our current guess for X in R 00 to be accessible by the integral finction 
 +                // put upper and lower limits for the integration in Y and X
 PI PI
-INTEG +INTEG             // xeq INTEG from Advantage Pac 
-ABS +ABS               // our current guess, make it positive 
-X<=Y? +X<=Y?             // Y has the Integration's estimate of accuracy - we use this to limit our search 
-ClX +ClX               // if our guess has returned a value from the integral that's less than the inherent accuracy then that's GOOD ENOUGH, we set X to zero and SOLVE completes      
-X≠0?+X≠0?              // if we still don't have zero we put back the last guess and SOLVE continues
 LastX LastX
 RTN RTN
Line 54: Line 54:
 </code> </code>
  
-=== The integral BESSEL ===+=== Integral : BESSEL ===
  
 <code> <code>
Line 67: Line 67:
  
 </code> </code>
 +
 +
 +=== Running it ===
 +
 +  * ''MYSOLVE'' sets up the ''ALPHA'' register with the name of the prog to be solved, so nothing needed in ''ALPHA'' at this time
 +  * put initial guesses in ''X'' and ''Y''
 +    * <key>'1'</key> <key>ENTER</key> <key>'2'</key>
 +  * try ''FIX 4''
 +  * Run ''MYSOLVE'' - via XEQ or set up a ''CST'' menu item for it 
 +
 +After a few minutes of Goose-flying we get the answer ''2.4048''
 +
 +
  
  

Navigation