- 1)
- (3 pts) A freely hanging cable
forms the shape of a hyperbolic cosine curve of the form

where*T*is the tension in the cable and*w*is the weight per unit length of the cable. Write a program that will read in values of*T*,*w*,*x*and print out the value of*y*. Test your program using the values*T*= 750.4,*w*= 1.3,*x*= 12.2 - 2)
- (4 pts) Write a program that will read in a set of
coordinates (
*x*_{1},*y*_{1}) and (*x*_{2},*y*_{2}) and determine the slope and*y*-intercept of the line between them. Test your program for the points (-2,3) and (5,-5). Also, devise a test case for which your program will fail. - 3)
- a)
- (2 pts) Suppose
*y*is a double precision variable. If you try to computey = ACOS(2.3d0)

the compiler will generate an error. Why? Don't just state the error message you get; you should explain why this makes no sense mathematically. - b)
- (2 pts) If
*y*is double precision. If you computey = ATAN(2.3d0)

this will work. Why? Again, don't just state the error message you get; you should explain why this calculation is feasible.

- 4)
- (6 pts)
Given a set of coordinates (
*x*,*y*) in the*x*-*y*plane, the polar form of the coordinates is given by where

Write an F90 program that will ask the user to input a set of rectangular coordinates, (*x*,*y*) and output the coordinates in polar form. The polar angle should be printed out in degrees. Test your program using the rectangular coordinates (-1,1), (-4,-2), (0,-3).