The following recurrence relation is called the Logistic Equation: y(k) = y(k-1) + gain * y(k-1) *

Question:

The following recurrence relation is called the Logistic Equation:

y(k) = y(k-1) + gain * y(k-1) * (1.0 - y(k-1))

This is the equation used to simulate growth in the optional problem-solving. This exercise asks you to use recursion to evaluate successive values generated by the Logistic equation. To get you started, here is a main method that drives recursions for different values of the gain parameter:

public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); // Avoid perfectly periodic

Provide a Logistic class that includes the above main method plus a static method named logistic that starts like this:

private static void logistic( double gain, double y, double oldAbs Dy) { double dy double abs Dy = gain* y*

The logistic method should be tail recursive and include the following terminal conditions:

if (abs Dy < 0.000001) { System.out.println(

After getting your program to work, run it with different inputs, and use what you find to describe how y(k) converges for different ranges of gain.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: