> Using Apps > Recursion App

Recursion App

You can use the Recursion app to work with general terms or two-term or three-term recursion formulas of numeric sequences. It creates a numeric table from a recursion formula and draws a graph. You can also draw a Phase Graph based on two recursion formulas of the same type, or a Web Graph to check the convergence or divergence of two-term recursion formulas.

Operation Flow

Example:  To create a numeric table for the three-term recursion formula (Fibonacci sequence) un+2=un+1+un where the first term is u1=1 and the second term is u2=1, and the value of the n-variable changes from 1 to 6, and then draw a graph of the numeric table

  1. h > Recursion

  2. Specify the formula type, first term type and the numeric table domain.

    1. On the Sequence tab, press u to highlight the first line.

    2. Press O, and then use the Setup menu that appears to configure the settings shown below.

    3. [Type] > [un+2]

      [First Term] > [u1]

      [Set Table Domain] > [Start]: 1 ; [End]: 6

  3. On the Sequence tab, input un+2=un+1+un, u1=1, u2=1.

  4. d (Highlights line 2 (un+2).)
    C > [Recursion] > [un+1]+
    C > [Recursion] > [un]E
    1E
    1E

    CY876_Recursion Operation Flow_1
  5. To display the numeric table, press >.

  6. The numeric table is displayed on the Table tab.

    CY876_Recursion Operation Flow_2
  7. To draw a graph, select T > [Graph Points].

    1. Use the View Window menu that appears to select [Pre-set Windows] > [Standard].

    2. Next, highlight Buttom_Drow and then press O.

    3. This causes the graph of the numeric table to appear on the Table tab.

      CY876_Recursion Operation Flow_3
  8. To return to the numeric table display, press b.

  9. Pressing < returns to the Sequence tab.

Using the Sequence Tab

On the Sequence tab, select one of the formula types shown below and input the formula.

For this formula type:

Enter this formula:

un

General term (Up to three of un, vn, wn)

un+1

Two-term recursion formula (Up to three of un+1, vn+1, wn+1)

un+2

Three-term recursion formula (Up to three of un+2, vn+2, wn+2)

un‎,‎vn

Two general terms un and vn

un‎,‎vn+1

General term un and two-term recursion formula vn+1

un+1‎,‎vn

Two-term recursion formula un+1 and general term vn

un+1‎,‎vn+1

Two two-term recursion formulas un+1 and vn+1

Using the Setup Menu

To display the Setup menu

  1. On the Sequence tab, use u to highlight the first line.

  2. Pressing U always highlights the first line.

  3. Press O.

To choose the formula type and first term type

To select this:

Select this from the Setup menu:

General term (un)

[Type] > [un]

Two-term recursion formula (un+1)

[Type] > [un+1]

Three-term recursion formula (un+2)

[Type] > [un+2]

Two general terms un and vn

[Type] > [‎un‎,‎vn‎]

General term un and two-term recursion formula vn+1

[Type] > [‎un‎,‎vn+1‎]

Two-term recursion formula un+1 and general term vn

[Type] > [‎un+1‎,‎vn‎]

Two two-term recursion formulas un+1 and vn+1

[Type] > [‎un+1‎,‎vn+1‎]

First term type u0*

[First Term] > [u0]

First term type u1*

[First Term] > [u1]

The first term type must be specified when the formula type is [un+1], [un+2], [‎un‎,‎vn+1‎], [‎un+1‎,‎vn‎] or [‎un+1‎,‎vn+1‎].

To specify the numeric table domain

  1. From the Setup menu, select [Set Table Domain].

  2. Highlight [Start], input a starting value (0 or some positive integer) and then press E.

  3. Highlight [End], input the ending value* (a positive integer that is greater than the starting value) and then press E.

  4. To close the menu, press b.

Do not specify an ending value that exceeds the starting value plus 998. The ending value must be equal to or less than 1 × 106.

To specify the starting coordinates for drawing a web graph (Formula type: un+1)

Before drawing a web graph on the Table tab, specify the starting coordinates (x-coordinates) for drawing in advance. To specify the starting coordinates, select [Set Web Graph Start] from the Setup menu. For information about web graph drawing, see Using Web Graph to Check the Convergence or Divergence of a Numeric Sequence.

Inputting and Editing Recursion Formulas

To input or edit a recursion formula

On the Sequence tab, highlight the line where you want to input something and then start inputting. To edit part of something you have already entered, press O, r, or l.

Use C > [Recursion] to input n, un, un+1 (and vn, vn+1, wn, wn+1).

If the formula type is [un+1], [‎un‎,‎vn+1‎], [‎un+1‎,‎vn‎] or [‎un+1‎,‎vn+1‎], input the first term. If the formula type is [un+2], input the first and second terms.

Note

The restrictions described below apply when [‎un‎,‎vn‎], [‎un‎,‎vn+1‎], [‎un+1‎,‎vn‎] or [‎un+1‎,‎vn+1‎] is selected as the formula type.

With this formula type:

This type of input is not supported:

un‎,‎vn

Input of vn in the left-side un expression and input of un in the left-side vn expression at the same time*1

Input of an expression that includes w*2

un‎,‎vn+1

Input of vn in the left-side un expression and input of un+1 in the left-side vn+1 expression at the same time*1

Input of an expression that includes w*2

un+1‎,‎vn

Input of vn+1 in the left-side un+1 expression and input of un in the left-side vn expression at the same time*1

Input of an expression that includes w*2

un+1‎,‎vn+1

Input of vn+1 in the left-side un+1 expression and input of un+1 in the left-side vn+1 expression at the same time*1

Input of an expression that includes w*2

Input on the Sequence tab itself is possible, but doing so causes an error (Circular ERROR) when you try to create a table.

Input in the Sequence tab itself is possible, but doing so causes an error (Syntax ERROR) when you try to create a table.

Example of Inputting a Two-term Recursion Formula and General Term at the Same Time

Example:  To enter the equation below, which consists of two-term recursion formula un+1 and a general term vn. Next, create a numeric table and then graph the table.

un+1=6un+2un+5 (However u0=8)

vn=un-2un+1

  1. On the Sequence tab, press u to highlight the first line.

  2. Press O. Next, use the Setup menu that appears to configure the settings shown below.

  3. [Type] > [‎un+1‎,‎vn‎]

    [First Term] > [u0]

    [Set Table Domain] > [Start]: 1 ; [End]: 6

  4. Input: un+1=6un+2un+5 , u0=8 , vn=un-2un+1

  5. d (Highlights line 2 (un+1).)
    e6C > [Recursion] > [un]+2d
    C > [Recursion] > [un]+5E
    8E
    eC > [Recursion] > [un]-2d
    C > [Recursion] > [un]+1E

    CY876_Recursion Inputting and Editing_1
  6. To display the number table, press >.

  7. This displays the numeric table on the Table tab.

    CY876_Recursion Inputting and Editing_2
  8. To draw a graph, select T > [Graph Points].

    1. Use the View Window menu that appears to select [Pre-set Windows] > [Standard].

    2. Next, highlight Buttom_Drow and then press O.

    3. This causes the graph of the numeric table to appear on the Table tab.

      CY876_Recursion Inputting and Editing_3

To delete a recursion formula

See To delete a function.

To specify the line type and line color of a graph drawn from a recursion formula

See Graph Drawing Settings (Line Type, Line Color).

Creating a Numeric Table

Of the recursion formulas on the Sequence tab, those with T > [Select] turned on can be used for numeric table creation. You can determine the current on/off setting by checking the icon to the left of a recursion formula.

sequence On… On

sequence Off… Off

To create a numeric table, press > or <, or highlight Buttom_Execute and then press O.

Turning on S > [‎ΣDisplay] adds a cumulative sum column to the numeric table for each term (Σun, Σvn, Σwn).

Using the Table Tab

The Table tab displays a numeric table or a graph. When you move from the Sequence tab to the Table tab, the numeric table is initially displayed. You can switch from numeric table display to graph display by using the T menu.

Operations While a Numeric Table is Displayed

You can use the cursor keys, as well as the U and D keys to move the cell highlighting between cells. You can also perform the operations below from the T menu.

To do this:

Select this menu item:

Specify the domain of the table being created*1

T > [Set Table Domain]

Draw a graph that shows dots at the coordinates*2 of a numeric table

T > [Graph Points]

Draw a graph that connects the coordinates*2 of a numeric table with straight line segments

T > [Graph Points (Joined)]

Use Web Graph to check the convergence or divergence of a numeric sequence*3

T > [Web Graph]

Draw a Phase Graph based on two recursion formulas*4

T > [Phase Graph]

Specify the display range of a graph*5

T > [View Window]

Save one column of a numeric table to a list variable

T > [Store List]

Delete an entire numeric table and return to the Sequence tab

T > [Delete]

See To specify the numeric table domain.

Each coordinate consists of the numeric table n-column as the x-axis and the un/vn/wn-column as the y-axis.

Drawing is possible when un+1 is selected as the formula type. See Using Web Graph to Check the Convergence or Divergence of a Numeric Sequence.

Drawing is possible when un, un+1, or un+2 is selected as the formula type. See Drawing a Phase Graph From Two Sequences.

See Specifying the Display Range of the Graph Window (View Window).

Drawing a Phase Graph From Two Sequences

You can create numeric tables (sequences) from two recursion formulas and then draw a Phase Graph using the values of one formula as the horizontal axis and the values of the other formula as the vertical axis.

Example:  To input the two two-term recursion formulas un+1=0.9un and vn+1=vn+0.1n-0.2, where the first terms are u1=1 and v1=1 respectively. Next, create sequences that change the value of variable n from 1 to 10, and then use the sequences to draw a Phase Graph.

  1. On the Sequence tab, press u to highlight the first line.

  2. Press O, and then use the Setup menu that appears to configure the settings shown below.

  3. [Type] > [un+1]

    [First Term] > [u1]

    [Set Table Domain] > [Start]: 1 ; [End]: 10

  4. On the Sequence tab, input un+1=0.9un, u1=1, vn+1=vn+0.1n-0.2, v1=1.

  5. Press > to go to the Table tab.

  6. Select T > [Phase Graph].

  7. On the View Window menu that appears, input the values shown below.

  8. x‎ Minimum = 0, ‎x‎ Maximum = 2, ‎x‎ Scale = 1

    y‎ Minimum = 0, ‎y‎ Maximum = 4, ‎y‎ Scale = 1

  9. Highlight Buttom_Drow and then press O.

  10. Phase Graph appears on the Table tab.

    CY876_Recursion Drawing Phase Graph_1

Note

A Phase Graph can be drawn when un, un+1, or un+2 is selected as the formula type.

The x-axis values are those of the formula that is higher in the Sequence tab list, while the y-axis values are those of the lower formula.

The color used to draw the graph is the color assigned to the formula that is higher in the Sequence tab list.

If three regression formulas (un, vn, wn) have been entered and all three are selected for numeric table creation, a menu will appear in step 5 above asking you to select two of the three (un-vn, vn-wn, un-wn).

If S > [‎ΣDisplay] is turned on, a menu will appear to select whether to graph using un (sequence) or Σun (cumulative sum of sequences) in step 5 above.

Using Web Graph to Check the Convergence or Divergence of a Numeric Sequence

For example, graph y=f(x) where un+1=y and un=x in a two-term recursion formula that can be expressed in terms of un+1 and un. Overlap this with a straight line with a slope of 45 degrees (graph of y=x). You can use these two graphs to draw a web graph automatically.

Selecting [Web Graph] in the example procedure below automatically graphs y=f(x) and draws a straight line with a 45-degree slope. Then you can simply press O multiple times to draw the web graph. By observing the behavior of the web graph, you can intuitively grasp whether the sequence is convergent or divergent.

CY875_Recursion Using Web Graph_1-1

Convergent

CY875_Recursion Using Web Graph_1-2

Divergent

Example:  To enter the two-term recursion formula equation un+1=-3un2+3un (first term u0=0.01), draw a web graph, and determine if the graph is convergent or divergent

  1. On the Sequence tab, press u to highlight the first line.

  2. Press O, and then use the Setup menu that appears to configure the settings shown below.

  3. [Type] > [un+1]

    [First Term] > [u0]

    [Set Table Domain] > [Start] : 0 ; [End] : 6

    [Set Web Graph Start] > [‎unStart] : 0.01*

    Make the x-coordinate of the starting point for drawing the web graph the same value as u0.

  4. On the Sequence tab, input un+1=-3un2+3un, u0=0.01.

  5. Press > to go to the Table tab.

  6. Select T > [Web Graph].

  7. On the View Window menu that appears, input the values shown below.

  8. x‎ Minimum = -0.52, ‎x‎ Maximum = 1.52, ‎x‎ Scale = 1

    y‎ Minimum = 0, ‎y‎ Maximum = 1, ‎y‎ Scale = 1

  9. Highlight Buttom_Drow and then press O.

  10. This graphs un+1=-3un2+3un and draws a straight line with a slope of 45 degrees.

    CY875_Recursion Using Web Graph_2
  11. Press O.

  12. This causes a cross pointer (+pointer) to flash at the starting point of the web graph.

  13. Press O 20 times.

  14. Each press of O draws the straight lines of the web graph. The graph indicates that the numeric series is convergent.

    To exit web graph drawing, press b.

    CY875_Recursion Using Web Graph_3

Note

A web graph can be drawn when un+1 is selected as the formula type.

You can specify the line type and line color of the y=f(x) graph drawn above. For details, see Graph Drawing Settings (Line Type, Line Color).

Operations While a Graph is Displayed

To do this:

Select this menu item:

Details:

Specify the display range

T > [View Window]

Specifying the Display Range of the Graph Window (View Window)

Display a pointer on a graph and read the coordinate values

T > [Trace]

Using Trace (Trace)

Zoom in and out of the display

T > [Zoom]

Changing the Graph Window Zoom Setting (Zoom)

Draw dots, lines, characters, etc.

T > [Sketch]

Using Sketch (Sketch)

Grab a point on a window and drag it around the display

T > [Pan]

Grabbing a Point on a Window and Drag It Around the Display (Pan)

Adjust the background image

T > [Fade I/O]

Adjusting the Graph Window Background Image (Fade I/O)

Displaying a Numeric Table and Graph at the Same Time

When S > [Table with Graph] is turned on, the numeric table window is displayed on the right of the Table tab and the graph window is displayed on the left.

CY876_Recursion Displaying Numeric Table_1

Nothing is drawn in the graph window immediately after you move to the Table tab from the Sequence tab. Use the following operations to draw the graph.

Select T > [Switch Active Window].

From T, select the menu item for drawing a graph.

Each time you select T > [Switch Active Window], the active window (the window that is affected by the operations you perform) toggles between the numeric table window and the graph window. The numeric table window is active when the cursor is displayed on the numeric table.

While the numeric table window is active, you can perform the operations described under Operations While a Numeric Table is Displayed. While the graph window is displayed, you can perform the operations under Operations While a Graph is Displayed, except for Pan and Fade I/O.