Appendix D

Solutions to Selected Exercises

Chapter 1

1.1 image

Chapter 2

2.1 

(a) comma should be replaced by decimal point

(e) asterisk should be omitted

(f) exponent must be integer

(h) comma should be replaced by decimal point

2.2 

(b) decimal point not allowed

(c) first character must be a letter

(d) quotes not allowed

(h) blanks not allowed

(i) allowed but not recommended!

(k) asterisk not allowed

(l) allowed but not recommended!

.

2.3 image

2.4 image

2.5 

(a) expression not allowed on left-hand side

(b) left-hand side must be valid variable name

(c) ditto

2.6 image

2.7 image

2.8 image

2.9 

 t = a;

 a = b;

 b = t;

2.10 image

2.11 image

2.12 image

2.13 image

2.14 image

2.15 

 sum(2: 2: 200)

2.16 

 m = [5 8 0 10 3 8 5 7 9 4];

 disp( mean(m) )

2.17 

x = 2.0833, a = 4.

2.18 image

2.19 image

2.21 

 r = 5;

 c = 10;

 l = 4;

 e = 2;

 w = 2;

i = e / sqrt(r ^ 2 + (2 * pi * W * l-1 / (2 * pi * w * c))^ 2)

2.22 image

2.24 image

2.26 image

2.27 image

2.28 image

Chapter 3

3.1 You should get a picture of tangents to a curve.

3.2 

(a) 4(b)2

(c)  The algorithm (attributed to Euclid) finds the HCF (Highest Common Factor) of two numbers by using the fact that the HCF divides exactly into the difference between the two numbers, and that if the numbers are equal, they are equal to their HCF.

3.3 image

3.4 image

3.6 image

Chapter 4

4.2 image

4.3 image

4.5 image

4.6 image

Chapter 5

5.2 image

5.3 image

5.7 image

Chapter 6

6.5 image

Chapter 7

7.1 

 function pretty(n, ch)

 line = char(double(ch)*ones(1,n));

 disp(line)

7.2 image

7.3 

 function y = double(x)

 y = x * 2;

7.4 

 function [xout, yout] = swop(x,y)

 xout = y;

 yout = x;

7.6 image

7.8 image

Chapter 8

8.1 image

8.2 image

8.3 image

8.5 image

8.6 image

8.8 image

8.10 image

Chapter 9

9.1 image

9.2 image

9.4 image

9.6 image

Chapter 11

11.1 image

Chapter 13

13.1 image

13.2 image

13.4 image

Chapter 14

14.1 

(a)  Real roots at 1.856 and −1.697, complex roots at −0.0791 ± 1.780i.

(b)  0.589, 3.096, 6.285, …(roots get closer to multiples of π).

(c)  1, 2, 5.

(d)  1.303.

(e)  −3.997, 4.988, 2.241, 1.768.

14.2 Successive bisections are: 1.5, 1.25, 1.375, 1.4375, and 1.40625. The exact answer is 1.414214…, so the last bisection is within the required error.

14.3 22 (exact answer is 21.3333).

14.4 After 30 years the exact answer is 2117 (image).

14.6 The differential equations to be solved are:

image

The exact solution after 8 h is image and image.

14.8 image

14.9 image

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.188.138