This preview shows page 1. Sign up to view the full content.
Unformatted text preview: computation method. Given a value of d and h, we can rearrange the equation so that it is a root finding problem (i.e. find an equation f(C) = 0). Write a program that accepts values for d and h, and that determines the equation of the catenary. Use the bisection method to find the root and ensure your approximation of C is accurate to 5 decimals places. You can use the starting interval of [0.00001,10000] to find the value of C. Your program should check if this is a valid starting interval (i.e. f(0.00001) and f(10000) have opposite signs). Your program should also check the inputs for the d and h to ensure that d is positive and nonzero, and that h is greater than 2. Users should be reprompted to enter the information if the input was not valid....
View
Full
Document
 Spring '10
 N/A

Click to edit the document details