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

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.

public static void main(String[] args) { Scanner stdIn = new Scanner (System.in); // Avoid perfectly periodic solution at gain for (double gain-0.05; gain

Step by Step Solution

3.35 Rating (167 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Based on the provided screenshots it looks like you are working on programming a recursive method to calculate values using the Logistic Equation over ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction To Programming With Java A Problem Solving Approach Questions!