
 ╔═══════════════════════════════════════════╗
 ║ WINTG.EXE - Editing the INTG.DAT Database ║       (C) Copyright 1986-1990
 ║ (This program complements RINTG.EXE - The ║             Zvi Shippony
 ║ Integration program)                      ║            (818) 990-0134
 ╚═══════════════════════════════════════════╝

  WINTG.EXE program Edit/Add/Delete/Import/Export records from the Integration
  Database (INTG.DAT).

  The records in the Database are organized in 3 groups:

   1. Algebraic type formulas
   2. Exponential type formulas
   3. Trigonometric type formulas

$$

  Each record is composed of 5 components as follows:

   Itype     (Char)  : A, E or T for Algebraic, Exponential or Trigonometric.
   IntgConst (String): Up to 10 constants,[e.g: in 'xⁿ', n is a constant].
   Integrand (String): The integrand, [e.g: 'xⁿ'].
   Integral  (String): The integral (answer) [ e.g: (x**(n+1))/(n+1) ].
   Constraint(String): Any constraint on the integration interval or the
                       constants, or any comments you wish to state. 'n <> -1'
                       or 'n not equal -1' is a constraint for the above.
                       The constraints are viewed whenever the list of
                       integrands available is shown, and it is up to the user
                       to abide by them.

   ** NOTE: The Integral string could not exceed 240 characters.
$$
  The Main menu of WINTG.EXE gives you the following options:

   1. List records
   2. Add new record(s)
   3. Edit existing record
   4. Delete existing record
   5. Write records to ASCII file
   6. Import records from an ASCII file
   7. Create a BASIC Integration Database file
   H. Get Help and information about the program
   Q. Quit ...

  The Secondary menu (a window) gives you the following options:

        A. Algebraic section

        B. Exponential section

        C. Trigonometric section

        <Esc>  - Back to the main menu
$$
  1. List records
  ════════════════
     The secondary menu will appear and you choose what category (type) of
     integrals to view (Algebraic, Exponential or Trigonometric), and then
     a list of all the available integrands in the appropriate section of the
     INTG.DAT (The Integration Database file) will appear as:

                ⌠
             1. │ (xⁿ)dx    (n <> -1)
                ⌡
                ⌠
             2. │ (1/Sqrt(a²-x²))dx    (x² <= a²)
                ⌡

     and so on ...
$$
  2. Add new record(s)
  ════════════════════
     The secondary menu will appear and you choose what category (type) of
     integrals to add (Algebraic, Exponential or Trigonometric), and then
     you will be prompt for entry for each of the 5 components above. You can
     continue to add records to that section as long as the integrand is not a
     blank line, thus when you done adding, enter a blank (just hit <Enter>) to
     the 'Enter INTEGRAND' prompt.

  ** NOTE: Please study the general note on how the integration works
           (the last section of this introduction) before you attempt to add
           records to the file !!!
$$
  3. Edit existing record
  ═══════════════════════
     The secondary menu will appear and you choose what category (type) of
     integrals to edit (Algebraic, Exponential or Trigonometric), and then
     a listing of all the records from that category will appear. You choose
     one you wish to change, and you'll be prompt for changes in each component
     in turn. Pressing <Esc> at any time will get you out of the Edit mode.

     MAKE SURE YOU ENTER THE CORRECT INTEGRAL, THIS WILL BE COMPUTED AS THE
     ANSWER TO THE GIVEN INTEGRAND, (So you better differentiate it to see if
     your entry agrees with the INTEGRAND).

  ** NOTE: Please study the general note on how the integration works
           (the last section of this introduction) before you attempt to edit
           records of the file !!!
$$
  4. Delete existing record
  ═════════════════════════
     The secondary menu will appear and you choose what category (type) of
     integrals to delete (Algebraic, Exponential or Trigonometric), and then
     a listing of all the records from that category will appear. You choose
     one you wish to delete. Once an entry is chosen, you will be prompt for
     one more verification of the deletion.
$$
  5. Write records to ASCII file
  ══════════════════════════════
     A secondary menu will appear and you choose what category (type) of
     integrals to write (Algebraic, Exponential or Trigonometric or all of
     them), and then you will be prompted for a file name to write the records
     into. The format of the file will look something like that:

        Algebraic                  ─┐
        a                           │
        1/Sqrt(x²+a²)               │ This is one record
        Ln(abs(x+Sqrt(x*x+a*a)))    │
                                   ─┘
        Algebraic        ─┐
        a                 │
        1/(a²-x²)         │ This is one record
        Arctanh(x/a)/a    │
        Abs(x/a) <= 1.0  ─┘

      and so on ...

   ** Note that when there are no constraint (as in the first record above),
      a blank line appears. Also note that the type (Algebraic) is spelled out,
      even though only the first letter (A) is actually stored.
$$
  6. Import records from an ASCII file
  ═════════════════════════════════════
     The ASCII file has to be in the format as described in the previous
     option. That is, each record has the following format:

       A ................................ This is: Itype (Algebraic)
       ac ............................... This is: IntgConst
       1/(ax²+c) ........................ This is: Integrand
       Arctan(x*Sqrt(a/c))/Sqrt(a*c)..... This is: Integral
       a*c > 0.0 ........................ This is: Constraint
                                          (For no constraint, a blank line
                                           MUST appear.)

     There should be NO blank lines separating records (A blank constraint line
     is not a separator but actual part of the record)

  ** NOTE: Please study the general note on how the integration works
           (the last section of this introduction) before you attempt to
           import records to the file !!!
$$
  7. Create a BASIC Integration Database file
  ═══════════════════════════════════════════
     The BASIC Database file (Named: INTG.DAT) has over 75 different
     integrals, mostly basic stuff (taken from various Math. HandBooks), and
     is intended as a starting point for each user to add to, (using the 'Add'
     option or the 'Import' option) and basically build & enrich the Database
     with the stuff being used the most. The Database can grow indefinitely,
     and once in a while you better make a backup copy (of the modified file)
     just in case somebody (else, of course !) makes a mistake and write over
     it with this option (option 7).
$$
           *******  ADVANCE Editing and Adding options  *******
           ════════════════════════════════════════════════════

   When Adding new records, or when Editing the database, we may want to create
an expression which combines 2 or more integrals. For example:

     ⌠
     │(Sqrt(ax² + bx +c))dx =  (2ax+b)*Sqrt(ax² + bx +c)/(4a) +
     ⌡                                       ⌠
                             ((4ac-b²)/(8a))*│(1.0/Sqrt(ax² + bx +c))dx
                                             ⌡
     (Constraint: a > 0.0)

   Assuming we have the answer to the integral on the right-hand-side, we can
create the answer to the integral on the left-hand-side by using F10 (Merge
option) as follows:   When the prompt: 'Enter the INTEGRAL (The answer)'
appears, enter:

(2*a*x+b)*Sqrt(a*x*x+b*x+c)/(4*a)+((4*a*c-b*b)/(8*a))*

   and press F10. A window will appear with a listing of all available
integrands in the file, scroll to, and choose the desired one, and its
Integral formula will be concatenated at the cursor, and you will end up with:
$$

(2*a*x+b)*Sqrt(a*x*x+b*x+c)/(4*a)+((4*a*c-b*b)/(8*a))*Ln(Sqrt(a*x*x+b*x+c)+x*Sq
rt(a)+0.5*b/Sqrt(a))/Sqrt(a)   (Press <Enter> now ..)

   and you have it !!

 ** WARNING: Some time the constants involved in the 'imported' (merged)
             integral are not the same as the original one (this is an
             inconsistency) but not to worry, just edit the 'new' constants
             to correspond to the original ones. For example if the second
             integrand above would be: 1.0/Sqrt(nx² + mx +l), you should
             change: 'n' to: 'a', 'm' to: 'b' and: 'l' to: 'c' .

 ** NOTE: You can merge (concatenate) as many integrals as you pleased,
          but the total length of the final answer can not exceeds 240
          characters (a warning msg. will appear if this will ever happen).
$$
  General note on how the integration works:
  ══════════════════════════════════════════
  (That is the section I was telling you about all along ..)

     Once all the constants has been given a value, (The integration program
     asks for a value for each constant appearing in the IntgConst component),
     they are inserted into the formula of the integral and the computation
     (evaluation) of the integral formula is done twice (once for the upper
     limit and once for the lower limit) and the final answer (the difference
     between the two) is presented.

     The matter becomes slightly more complicated in the case of recursive
     integration as in the computation of: xⁿ*Exp(ax) where: a & n are the
     integration constants, (n > 0, integer). If you dump the basic database
     into an ASCII file or if you edit that record, you will see the integral
     formula as:

          ((x^n)*Exp(a*x)/a)-(n/a)*Intg(n-1),Intg(n=0)=Exp(a*x)/a

     Note the terms: Intg(n-1)  and:  Intg(n=0) !
$$
     Look again:

          ((x^n)*Exp(a*x)/a)-(n/a)*Intg(n-1),Intg(n=0)=Exp(a*x)/a

     Intg(n-1) tells the program: Do it first with: n reduced by 1,
     thus it all becomes a recursive business !!!

     Intg(n=0) tells the program: Stop the recursion when you reach n=0, and
     take the following formula (in this case: Exp(a*x)/a ) as the answer at
     that stage (n=0).
$$
     It could be even more "complicated" when you look on the case:

          ⌠
          │(Cos(x)^m)*(Sin(x)^n)dx   (m > 0, n > 0, integers)
          ⌡

     Here is how the integral (answer) looks like:

 ((cos(x)^(m-1))*(sin(x)^(n+1)))/(m+n)+((m-1)/(m+n))*Intg(m-2),
 Intg(m=0)=-((sin (x)^(n-1))*cos(x))/n+((n-1)/n)*Intg(n-2),
 Intg(m=1)=(sin(x)^(n+1))/(n+1),Intg(n=1)=-cos(x),Intg(n=2)=(x-0.5*sin(2*x))/2

   Pretty hairy ah ? but it works exactly in the same way, only that there
are few 'twists' here:

   First, since m is reduced by 2 each step,(Intg(m-2)),the recursion could be
stopped at m=0 or m=1, depend what the original (initial) value for m was.
So we have to account for both possibilities and give both Intg(m=0) and
Intg(m=1).

$$
   Second, both of the cases, Intg(m=0) and Intg(m=1) are themselves recursive
integrals, both now recursive on the variable: n, and not only that (as if we
don't have enough troubles by now) n is also being reduced by 2 each step
(Intg(n-2)) and we have to supply both cases, Intg(n=0) and Intg(n=1) for the
same reasons.

   So - if you mess around with these creatures, you better supply all the
information needed, and do it in exactly the same way it was done above.  Note
that a comma (,) is the separator between formulas and that, at the 'stop
recursion' step, one has to specify the name of the variable, as in: Intg(m=1)
and NOT: Intg(1), since there is possible more then one variable being reduced,
as in the example above.  Even if there is only one 'reducible' variable (as
in: xⁿ*Exp(x)), you still HAVE to specify (n=0) as in: Intg(n=0) !



                            That's all folks ...
