Assignment #1 for Computer Tools KJC (8/21/99) -------------------------------- 1) You are given two job offers. Offer #1 is for $50,000 per year with 10% yearly raises. Offer #2 is for $60,000 per year with yearly 5% raises. Which job should you take if you plan to work for a) 5 years b) 10 years if your decision is based entirely on the total salary you will have earned after the 5 or 10 years. Give the total salary for each of the two cases. Plot the two salaries, yearly salary on the Y-axis and years (0 through 10) on the X-axis. 2) You are the manufacturing engineer for Millie's Mowers, Inc. and have been asked to analyze the economic performance of two different manufacturing proposals. Proposal #1 - The Mega Mower will have a manufacturing set-up cost of $750000.00 and a per unit cost of $75.00 Proposal #2 - The Jumbo Mower will have a manufacturing set-up cost of $800000.00 and a per unit cost of $70.00 If you were to sell the Mega Mower for $100.00 and the Jumbo Mower for $110.00, what is the break-even point (in units sold) for each proposal? Solve for the break-even point graphically and using Mathcad symbolic math. 3) Let i = 1, 2, ..., 100 and X and Y be two vectors of length 100. Set X_sub_i = i (this mean, X subscript i) and Y_sub_i = sin(100) / (X_sub_i * pi)) (where pi is the greek symbol "pi" with value 3.14159...). Find the mean, min, max, and standard deviation of the values in Y. Graph X verus Y. Do a least squares fit. What is the equation of the line? Plot the line on the graph of X versus Y (i.e., this graph will now have two traces on it). 4) The number of pot holes on a section of highway are counted and repaired weekly. The following data (in pot holes per week) have been measured over the last 12 weeks: 5, 18, 19, 13, 41, 51, 12, 5, 5, 3, 13, 21 Determine the following using Mathcad built-in functions and/or graphing: a) The average number of pot holes counted and repaired per week b) The standard deviation of pot holes per week c) The maximum number of pot holes per week d) The minimum number of pot holes per week e) Do a least squares fit on the pot hole data and give the formula of the fitted line. Show a plot of the pot hole data and the fitted line (on the Y-axis) versus the week number (on the X-axis). What conclusion can you draw from the fitted least squares line? 5) Solve the following problems: a) Write a function called diag(x, y) that returns the length of the diagonal of a rectangle with length of x and width of y (hint: think pythagorean theorem). b) For x = -1 to 1. Plot x on the X-axis and sin(pi * x) on the Y axis. Use a step size for x such that the resulting plot is smooth. The constant pi is, of course, the value of a circle's circumference divided by it diameter and is approximately 3.14159265. c) The fibonacci sequence is 1, 1, 2, 3, 5, 8, 13, 21, ... Each element is equal to the sum of the previous two elements. Create a vector containing the first 25 elements of the fibonacci sequence. What is the minimum, maximum, and mean value of the first 20 elements? 6) Solve for the following... a) Solve for x, y, and z in the following three equations in three unknowns: x + y = 3 13*x - 3*y - 2*z = 13 x - 4*y + z = -10 ---------------------------- b) For the matrices A and B below: A = | 1 5 31 | B = | 3 5 5 | | -2 1 1 | | -1 -1 -1 | | 10 9 16 | | 6 17 -6 | Solve for A + B, A - B, A * B, the transpose of A, and the inverse of A. c) Solve for x: 5*e^(2*ln(x)) + y = 113 (where ^ means "raised to the power of") where ln() is natural log (i.e., ln(e) = 1). d) Find at least one root of: 5*x^3 + 3*x^2 + 15 e) Find the first and second derivatives (in terms of x) of: 5*x^3 + x^-1 + sin(x) + 184 =====