Download presentation

Presentation is loading. Please wait.

Published byNasir Fossey Modified over 3 years ago

1
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)

2
Summary 2 1 exam, 1project and some exercises http://zoro.ee.ncku.edu.tw/na/

3
Target 3 Solve problems with numerical methods

4
In this slide Why numerical methods? –differences between human and computer –a very simple numerical method What is algorithm? –definition and components –three problems and three algorithms Convergence –compare rate of convergence 4

5
Why such methods? 5 Computer is stupid

6
x-2=0 6 Human says, x=2, easy!

7
{ x-2=0; } 7 Computer says, compilation error!

8
What is the difference? 8

9
9 Human is logical (thinking) http://www.wallcoo.com/paint/Donald_Zolan_Early_Childhood_02/wallpapers/1280x1024/painting_children_kjb_DonaldZolan_68TheThinker_sm.jpg

10
10 Can do inference http://files.myopera.com/conansakura/albums/31567/thumbs/2.jpg_thumb.jpg

11
11 Computer is procedural (executing) http://www.aclibrary.org/eventkeeper/Graphics/SLZ/computer.jpg

12
An example (((x+3)-2)+6)=0 –Human requires only the rules (in this case, arithmetic), –and can inference the steps for the solution 12

13
Computer (((x+3)-2)+6)=0 –Requires the exact procedure (steps) { x0=0–6; } { x1=x0+2; } { x=x1–3; } –These steps is numerical method 13

14
14 Does computer have any advantage?

15
15 It is fast http://www.masternewmedia.org/images/fast_snail_id86636_size350.jpg

16
So, why numerical methods? Computer is stupid Computer is fast (and works hard) Sometimes, stupid methods can solve difficult problems 16

17
17

18
18

19
19

20
We know that 20

21
21 rubbish =.=

22
A systematic procedure 22

23
23 Bisection method http://www.leda-tutorial.org/en/unofficial/Pictures/BisectionMethod.png

24
Bisection method 24

25
And very accurate 25 Actually, it is getting accurate after every trial

26
26 Computer works hard, so it could happen

27
Any Questions? 27

28
Algorithm 28 The heart of numerical analysis

29
Algorithm Definition –A precisely defined sequence of steps In this course –design; –implement; and –examine the performance 29

30
30 How to implement?

31
By hand 31 too painful (but you might need to)

32
With computer 32 in other words, do programming

33
Programming 33 Even scared!

34
34 Algorithm could be simple

35
An example from statistics 35

36
36

37
In action 37

38
38

39
It is also an algorithm 39 (a precisely defined sequence of steps)

40
Not 40 A difficult sequence of steps

41
Any Questions? 41

42
Another example 42 Definite integral using trapezoidal rule

43
43

44
44

45
45

46
In action 46

47
47

48
Error 48

49
49

50
Observations of the errors 50

51
Any Questions? 51

52
The third example 52

53
53

54
Stopping condition 54

55
In action 55

56
56

57
So far 57 a statistics problem, the integral problem, and the square root problem

58
Any Questions? 58

59
59 What is the differences among them? (hint: the concepts of the output)

60
Type of methods The statistics algorithm –generates an exact (analytic) solution The integral algorithm –generates an approximate (numerical) solution –many numerical methods work in much the same way The square root algorithm –generates a sequence of approximations which converge to the solution –another typical class of numerical methods 60

61
Poll 61 Programming ability

62
Learnt 62 C/C++ (??/24) Java (??/24) Other (??/24)

63
Learnt 63 Data structure (??/24) Algorithm (??/24)

64
Language vs. algorithm Two languages –The same concept, different patterns –e.g., Chinese and English –, feel sleepy English vs. C –Increase i by 1 –{ ++i; } Language is/defines the pattern Algorithm is/describes the concept 64

65
Pseudo-code 65 Not any real programming language

66
A pseudo-code example 66

67
Can You 67 Read/write pseudo-code?

68
Convergence 68 When several numerical methods are available, choose the fastest one

69
69

70
Rate of convergence 70

71
71

72
72

73
73

74
74

75
Any Questions? 75

76
Which Is Better? 76

77
Using L'Hôpital's rule ( ) 77

78
78

79
Rate of Convergence 79 There is another definition for function

80
Another definition of rate of convergence for function 80

81
81

82
Rate of convergence 82

83
Order of Convergence A different measure of convergence speed than rate of convergence Examines the relationship between successive error values 83

84
Order of Convergence Iterative Method 84

85
85 Note the dramatic difference between 1 and 2, and the slight difference between 2 and 3

86
86

Similar presentations

Presentation is loading. Please wait....

OK

The basics for simulations

The basics for simulations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google