KOS 1110 COMPUTER IN SCIENCE

ASSIGNMENT 2-PROBLEM SOLVING USING EXCEL

DUE DATE MONDAY, 08 DEC 2003, 4:30 PM

SITI MARHANA BT RAZALI

0325574

SECTION 1

BSC (MATH)

marhana_84@yahoo.com

DR. IBRAHIM ALI BATCHA

1) Construct a worksheet containing values of y versus x generated by the equation

y = 1.5 x0.8

over the interval 0 ≤ x ≤ 100. Plot the data in the following three ways:

(a) Plot y versus x using arithmetic coordinates.

(b) Plot log10y versus log10x using arithmetic coordinates.

(c) Plot y versus x using logarithmic (log-log) coordinates.

Compare the resulting graphs and explain any similarities in the shape of the curves.

Solutions

1a)

X

Y

0 0
10 9.46436
20 16.47841
30 22.79231
40 28.69057
50 34.29788
60 39.68371
70 44.89208
80 49.95319
90 54.88899
100 59.71608
 
y=1.5*(x^0.8)

 

 

 

 

1b)

log10x log10y
#NUM! #NUM!
1 1.976091
1.30103 2.216915
1.477121 2.357788
1.60206 2.457739
1.69897 2.535267
1.778151 2.598612
1.845098 2.65217
1.90309 2.698563
1.954243 2.739485
2 2.776091

1c:

x

y

0

0

10

9.46436

20

16.47841

30

22.79231

40

28.69057

50

34.29788

60

39.68371

70

44.89208

80

49.95319

90

54.88899

100

59.71608

y=1.5*(x^0.8)

2) A scientist has obtained a bacteria culture from a municipal water sample and allowed the bacteria to grow within a petri dish. The following data were obtained:

Time,min Bacteria Concentration,ppm

0 6

1 9

2 15

3 19

4 32

5 42

6 63

7 102

8 153

9 220

10 328

Suppose the growth of Type A bacteria is governed by a process described by the equation

CA = aebt

and the growth of Type B bacteria is governed by a process described by the equation

CB = axt

what type of bacteria is the scientist dealing with?

 

Solutions

Time, min

Bacteria Concentration, ppm

0

6

1

9

2

15

3

19

4

32

5

42

6

63

7

102

8

153

9

220

10

328

linear

polinomial

exponent

The scientist is dealing with the bacteria of TYPE A.

 

3) A polymeric material contains a solvent that dissolves as a function of time. The concentration of the solvent, expressed as a percentage of the total weight of the polymer, is shown in the following table as a function of time:

 

 

 

Solvent Concentration (weight percent) Time (sec)

55.5 0

44.7 2

38.0 4

34.7 6

30.6 8

27.2 10

22.0 12

15.9 14

8.1 16

2.9 18

1.5 20

Enter the data into an Excel worksheet, plot the data, and fit a straight line through the data. Determine the equation of the line and the corresponding r2 value.

 

Solutions

The Equation:-0.378x+19.659

The R^2:0.9847

4) The following data represent the temperature as a function of vertical depth within a pond.

Distance,cm Temp,°C Distance,cm Temp,°C

0.1 21.2 390 45.9

0.8 27.3 710 47.7

3.6 31.8 1200 49.2

12 35.6 1800 50.5

120 42.3 2400 51.4

Enter the above data into an Excel worksheet and fit an appropriate trendline to the aggregate of the data. Compare the results obtained using an exponential function, a logarithmic function, a power function, and a fifth-degree polynomial.

Solutions

exponential function

logarithmic function

power function

polynomial function

5) A computer magazine has evaluated several popular desktop computers for price and performance. The cost and performance ratings (in arbitrary units) are listed below. Plot the cost versus performance in an Excel worksheet. Fit the best possible equation through the data.

Unit No. Cost($) Performance Unit No. Cost($) Performance

1 2480 72 6 2570 112

2 2260 86 7 1750 94

3 2500 95 8 2000 109

4 1980 89 9 2200 113

5 2210 99 10 2240 122

Use the resulting curve fit to estimate the following:

(a) How much would you expect to pay for a computer with a performance rating of 105?

(b) What performance rating would you expect from a computer that cost $2400?

Solutions

polynomial function

a) y=

105

1.3433E-05

x=

1241.08

b) y=

-3355433

55185.4

x=

2400

6) Solve Van der Waals's equation: (P + a/V2)(V - b)=RT, for the volume per mole (V) of an organic compound at 10 atm pressure and 400oK. The Van der Waals's constants for this particular compound are a = 40.0 liter2 atm/mole2 and b = 0.2 liter/mole. (Hint: use Goal Seek)

Solution

V=

325.2277

a=

40

b=

0.2

P=

10

T=

400

R=

8.126

(P+a/V^2)(V-b)=R*T

3250.400005

7) Use Goal Seek to determine the smallest positive root and the largest negative root (the negative root closest to the origin) for the equation:

x tan x =2

Solution

x*tan x=2
x=

6.578318

1.999884237

 

8) Many consumers buy expensive items, such as cars and houses, by borrowing the purchase cost from a bank and then repaying the loan on a constant monthly basis. If P is the total amount of money that is borrowed initially, the amount of the monthly payment, A, can be determined from the formula

A = P[i(1 + i)n / (1+i)n -1 ]

where i is the monthly interest rate, expressed as a fraction (not a percentage), and n is the total number of payments.

Suppose you borrow RM10,000 to buy a car.

(a) If the nominal interest rate is 8 percent API (which is equivalent to a fractional monthly interest rate of 0.08/12 = 0.006667) and you borrow the money for 36 months, how much money will you have to repay each month?

(b) If you are required to repay RM350 each month for 36 months, what is the corresponding monthly interest rate?

(c) If you choose to repay RM350 each month at the 0.006667 monthly interest rate, how many payments (i.e., how many months) will be required to repay the loan?

(Hint: Do all of the above questions using Goal Seek feature in Excel.)

a)
P=

10,000

i=

0.006667

n=

36

A=

1.49728E+58

A=P(i(1+n)^n/(1+i)^n-1)
b)
P=

10000

n=

36

A=

350

i=

1.035

349.9999997

c)
P=

10000

A=

350

i=

0.006667

n=

36

350.000004

9) Solve each of the following systems of simultaneous equations, using Solver in MS Excel.

 

(a) xl -2x2 + 3x3 = 17

3x1 + x2 -2x3 = 0

2x1 + 3x2 + x3 = 7

(b) 11xl + 3x2 + x4 + 2x5 = 51

4x2 + 2x3 + x5 = 15

3x1 + 2x2 + 7x3 + x4 = 15

4x1 + 4x3 + 10x4 + x5 = 20

2x1 + 5x2 + x3 + 3x4 + 13x5 = 92

Solutions

a)
p-2q+3r=17 p=

1

3p+q-2r=0 q=

2

2p+3q+r=7 r=

3

-11

-1

4

138

 

b)
11p+3q+s+2t=51 p=

1

4q+2r+t=15 q=

2

3p+2q+7r+s=15 r=

3

4p+4r+10s+t=20 s=

4

2p+5q+r+3s+13t=92 t=

5

-20

4

17

41

0

2386

 

10) Solve each of the following problems, using Solver in MS Excel.

 

(a) Minimize

y = 60 xl + 44 x2

subject to the following constraints:

xl + x2 ³ 1000

5 xl + 3 x2 ³ 8000

x1, x2 ³ 0

(b) Maximize

y = 60 xl + 30x2

subject to the following constraints:

 

xl + x2 ³ 1000

5 xl + 3 x2 ³ 8000

x1, x2 ³ 0

Solutions

a)minimize
y=60x+44y
x=

8000

y=

8000

x+y=

16000

5x+3y=

64000

832000

b)maximize
y=60x+30y
x=

76

y=

140

x+y

216

5x+3y

800

8760

11) The cost associated with a set of electrical transmission lines is given by

C1 = 10,000 n (1 + 2d2)

where n is the number of lines in the set and d is the diameter of one line, in inches. In addition, the cost of transferring electrical power over the lines over their entire lifetime is given by

C2 = 150,000/(nd2)

To prevent major power disruptions in the event of a line breakage, it is required that n³ 10. Determine n and d that will lower the overall cost C = C1 + C2. Assume that n is a continuous variable. Solve using Excel's Solver feature.

Solutions

 

n=

10

d=

0.52331757

C1=10000*n*(1+2*d^2)

154772.2558

C2=150000/(n*d^2)

54772.25573

cost,C=C1+C2

209544.5115

 

12) Exercises done in the computer lab: Present a complete report of all the excel exercises done during the Week 3 lab hours

 

x=

-1.319501

y=

2

x^5+2y=

0.0001079

x=

1.404085

2x^5-3x^2-5=

-3.56E-05

Instructions: Complete all the exercises in MS Excel. Use appropriate titles for each exercise and add some comments, tables with borders to show how you worked out these problems. After you have completed the assignment save the file as 2mohd.zip, where 2 refers to assignment number and mohd refers to your name. All of your assignments should carry your name, matric card no, section no., degree program name, email address and the web page address of the assignment. Send both the printed and the electronic versions (by email to ibrahiman@iiu.edu.my) of your assignments before the due date. For evaluation purposes, the date of submission of the printed version would be taken as the correct submission date. All of your assignments should have complete particulars (inside the files) such as the course name, assignment number, due date, submission date, your name, your degree program, student ID number, section number, your email address, home page address, instructors name, questions and answers.

back to K.O.S