Docsity

solutions for numerical methods for engineers, Exercises of Numerical Methods in Engineering

Toggle sidebar
bg1
1
PROPRIETARY MATERIAL. © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual
may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the
publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their
individual course preparation. If you are a student using this Manual, you are using it without permission.
CHAPTER 20
20.1 A plot of log10k versus log10f can be developed as
y = 0.4224x - 0.83
R
2
= 0.9532
-0.6
-0.4
-0.2
0
0.2
0.7 0.9 1.1 1.3 1.5 1.7 1.9 2.1 2.3
As shown, the best fit line is
10 10
log 0.422363log 0.83fk
Therefore,
2 = 100.83 = 0.147913 and
2 = 0.422363, and the power model is
0.422363
0.147913yx
The model and the data can be plotted as
y = 0.1479x
0.4224
R
2
= 0.9532
0
0.5
1
1.5
0 20 40 60 80 100 120 140 160
20.2 We can first try a linear fit
y = 2.5826x + 1365.9
R
2
= 0.9608
1200
1400
1600
1800
-60-30 0 30 60 90120
As shown, the fit line is somewhat lacking. Therefore, we can use polynomial regression to fit a parabola
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download solutions for numerical methods for engineers and more Exercises Numerical Methods in Engineering in PDF only on Docsity!

PROPRIETARY MATERIAL. © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their

CHAPTER 20

20.1 A plot of log 10 k versus log 10 f can be developed as

y = 0.4224x - 0. R^2 = 0. -0.

-0.

-0.

0

0.

0.7 0.9 1.1 1.3 1.5 1.7 1.9 2.1 2.

As shown, the best fit line is

log 10 f  0.422363log 10 k 0.

Therefore,  2 = 100.83^ = 0.147913 and  2 = 0.422363, and the power model is

y 0.147913 x 0.

The model and the data can be plotted as

y = 0.1479x 0. R^2 = 0.

0

0.

1

1.

0 20 40 60 80 100 120 140 160

20.2 We can first try a linear fit

y = 2.5826x + 1365. R^2 = 0.

1200

1400

1600

1800

-60 -30 0 30 60 90 120

As shown, the fit line is somewhat lacking. Therefore, we can use polynomial regression to fit a parabola

PROPRIETARY MATERIAL. © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their

y = 0.0128x 2 + 1.8164x + 1331 R^2 = 0.

1200

1400

1600

1800

-60 -30 0 30 60 90 120

This fit seems adequate in that it captures the general trend of the data. Note that a slightly better fit can be attained with a cubic polynomial, but the improvement is marginal.

20.3 (a) The linear fit is

y = 1.05897x + 0. R^2 = 0.

0

20

40

60

80

0 20 40 60 80

The tensile strength at t = 32 can be computed as

y  1.05897(32)  0.81793 34.

(b) A straight line with zero intercept can be fit as

y = 1.07514x R^2 = 0.

0

20

40

60

80

0 20 40 60 80

For this case, the tensile strength at t = 32 can be computed as

y  1.07514(32) 34.

20.4 Linear regression with a zero intercept gives [note that T (K) = T ( oC) + 273.15].

PROPRIETARY MATERIAL. © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their

y = 0.2617x R^2 = 0.

0

2

4

6

8

10

12

0 5 10 15 20 25 30 35 40

For this model, the chlorophyll level in western Lake Erie corresponding to a phosphorus concentration of 10 mg/m^3 is

c  0.2617(10) 2.

Thus, as expected, the result differs from that obtained with a nonzero intercept.

Finally, it should be noted that in practice, such data is usually fit with a power model. This model is often adopted because it has a zero intercept while not constraining the model to be linear. When this is done, the result is

y = 0.1606x 1. R^2 = 0.

0

2

4

6

8

10

12

0 5 10 15 20 25 30 35 40

For this model, the chlorophyll level in western Lake Erie corresponding to a phosphorus concentration of 10 mg/m^3 is

c  0.1606(10)1.1426 2.

m  

n  

Use the following values

x 0 = 0.3 f ( x 0) = 0. x 1 = 0.4 f ( x 1) = 0. x 2 = 0.5 f ( x 2) = 0. x 3 = 0.6 f ( x 3) = 0.

MATLAB can be used to perform the interpolation

format long

PROPRIETARY MATERIAL. © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their

x=[0.3 0.4 0.5 0.6]; y=[0.08561 0.10941 0.13003 0.14749]; a=polyfit(x,y,3) a = Columns 1 through 3 0.00333333333331 -0.16299999999997 0. Column 4 -0. polyval(a,0.46)

ans =

This result can be used to compute the vertical stress

q  

 z  1.552795(0.1221623) 0.

20.28 This is an ideal problem for general linear least squares. The problem can be solved with MATLAB:

t=[0.5 1 2 3 4 5 6 7 9]'; p=[6 4.4 3.2 2.7 2.2 1.9 1.7 1.4 1.1]'; Z=[exp(-1.5t) exp(-0.3t) exp(-0.05t)]; a=inv(Z'Z)(Z'p) a =

Therefore, A = 4.0046, B = 2.9213, and C = 1.5647.

20.29 First, we can determine the stress

We can then try to fit the data to obtain a mathematical relationship between strain and stress. First, we can try linear regression:

y = 1.37124E-06x - 2.28849E- R^2 = 0.

-0.

0

0.

0.

0.

0.

0.

0 2000 4000 6000 8000

This is not a particularly good fit as the r^2 is relatively low. We therefore try a best-fit parabola,

PROPRIETARY MATERIAL. © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their

y = -3.0895E-10x 3 + 7.4268E-07x 2 - 3.5269E-04x + 1.0860E+ R^2 = 9.9994E-

1

1.

1.

1.

1.

1.

200 300 400 500 600 700 800 900 1000

20.60 This part of the problem is well-suited for Newton interpolation. First, order the points so that they are as close to and as centered about the unknown as possible, for x = 4.

y 0 = 4 f ( y 0) = 38. y 1 = 2 f ( y 1) = 53. y 2 = 6 f ( y 2) = 30. y 3 = 0 f ( y 3) = 80 y 4 = 8 f ( y 4) = 30

The results of applying Newton’s polynomial at y = 3.2 are

Order f ( y ) Error 0 38.43 6. 1 44.458 -0. 2 43.6144 -0. 3 43.368 0. 4 43.

The minimum error occurs for the third-order version so we conclude that the interpolation is 43.368.

(b) This is an example of two-dimensional interpolation. One way to approach it is to use cubic interpolation along the y dimension for values at specific values of x that bracket the unknown. For example, we can utilize the following points at x = 2.

y 0 = 0 f ( y 0) = 90 y 1 = 2 f ( y 1) = 64. y 2 = 4 f ( y 2) = 48. y 3 = 6 f ( y 3) = 38.

T ( x = 2, y = 2.7) = 58.

All the values can be tabulated as

T ( x = 2, y = 2.7) = 58. T ( x = 4, y = 2.7) = 47. T ( x = 6, y = 2.7) = 42. T ( x = 8, y = 2.7) = 46.

These values can then be used to interpolate at x = 4.3 to yield

T ( x = 4.3, y = 2.7) = 46.

PROPRIETARY MATERIAL. © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their

Note that some software packages allow you to perform such multi-dimensional interpolations very efficiently. For example, MATLAB has a function interp2 that provides numerous options for how the interpolation is implemented. Here is an example of how it can be implemented using linear interpolation,

Z=[100 90 80 70 60; 85 64.49 53.5 48.15 50; 70 48.9 38.43 35.03 40; 55 38.78 30.39 27.07 30; 40 35 30 25 20]; X=[0 2 4 6 8]; Y=[0 2 4 6 8]; T=interp2(X,Y,Z,4.3,2.7) T =

It can also perform the same interpolation but using bicubic interpolation,

T=interp2(X,Y,Z,4.3,2.7,'cubic') T =

Finally, the interpolation can be implemented using splines,

T=interp2(X,Y,Z,4.3,2.7,'spline') T =

20.61 This problem was solved using an Excel spreadsheet and TrendLine. Linear regression gives

y = 0.0455x + 0. R^2 = 0.

0

0.

0.

0.

0 2 4 6 8 10

Forcing a zero intercept yields

y = 0.061x R^2 = 0.

One alternative that would force a zero intercept is a power fit