numerical methodsjuiching/nmsyllabus.pdf · • chapra, “applied numerical methods with matlab...
TRANSCRIPT
![Page 1: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/1.jpg)
Numerical Methods
![Page 2: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/2.jpg)
Textbook• Chapra, “Applied Numerical Methods with
MATLAB for Engineers and Scientists, 3nd Edition.”
• Publisher: McGraw-Hill• Class Note: www.ntut.edu.tw/~juiching
![Page 3: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/3.jpg)
Grading Policy• 15 Weekly programming home work:
75%.• Programming capability evaluation:
25%.
![Page 4: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/4.jpg)
Teaching Hours• Lecture: 1:10 pm ~ 2:00 pm, Wednesday.• Lab: 2:10 pm ~ 4:00 pm, Wednesday.• Office hour: 4:10 pm~6:00 pm, Mon., Wed.
and Thur..
![Page 5: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/5.jpg)
Goal• Learn numerical methods. • Learn MATLAB.
![Page 6: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/6.jpg)
What is “Numerical Methods”?
• Solving mathematical equations by computer programs numerically.
![Page 7: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/7.jpg)
Why learn “Numerical Methods”?
• Equations in engineering mathematics– the simplest.– solutions in functional form.
• Problems in real life– usually not solvable by the technique in engineering
mathematics.– solutions not necessarily in functional form.
![Page 8: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/8.jpg)
Why learn “Numerical Methods”? (cont.)
• Example: the volume of liquid V in a hollow horizontal cylinder of radius r and length L is related to the depth of the liquid h by
• If r is fixed, can youdetermine h for a given V?
V' r 2cos&1 r&hr
&(r&h) 2rh&h 2 LV' r 2cos&1 r&hr
&(r&h) 2rh&h 2 L
Lh
![Page 9: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/9.jpg)
Symbolical v.s. Numerical
• Symbolical– Solve equations by derivative technique.– Mimic the way human brains solve problems.– Solutions are in function form.– Specific but not general.– Efficient but limited. Many are not solvable.– Software: Mathemetica, Maple
![Page 10: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/10.jpg)
Symbolical v.s. Numerical (cont.)
• Numerical– Utilize the advantages of computers: fast, large and
repetitive.– Very different from the way human brains solve
problems.– Solutions are in numerical form.– General.– Not efficient but not limited.– Software: MATLAB and any programming languages.
![Page 11: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/11.jpg)
Symbolical v.s. Numerical (cont.)
• Symbolical– Example:
&d 2f(x)dx 2
'1%4x 2, f(0)'f(1)'0
Y f(x)'5x6&
x 2
2&
x 4
3
&d 2f(x)dx 2
'1%4x 2, f(0)'f(1)'0
Y f(x)'5x6&
x 2
2&
x 4
3
![Page 12: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/12.jpg)
Symbolical v.s. Numerical (cont.)
• Numerical– Example: same as previous.
f )(x)' f(x%Δ x)& f(x&Δx)2Δx
f ))(x)' f(x%Δ x)&2 f(x)% f(x&Δ x)Δx 2
&fi% 1& 2 fi% fi& 1
Δ x 2' 1% 4x 2
i
Δx'0 .1
1Δx2
2 &1 0 0 0 0 0 0 0&1 2 &1 0 0 0 0 0 00 &1 2 &1 0 0 0 0 00 0 &1 2 &1 0 0 0 00 0 0 &1 2 &1 0 0 00 0 0 0 &1 2 &1 0 00 0 0 0 0 &1 2 &1 00 0 0 0 0 0 &1 2 &10 0 0 0 0 0 0 &1 2
f1f2!
f9
'
1%4x 21
1%4x 22
!
1%4x 29
1Δx2
2 &1 0 0 0 0 0 0 0&1 2 &1 0 0 0 0 0 00 &1 2 &1 0 0 0 0 00 0 &1 2 &1 0 0 0 00 0 0 &1 2 &1 0 0 00 0 0 0 &1 2 &1 0 00 0 0 0 0 &1 2 &1 00 0 0 0 0 0 &1 2 &10 0 0 0 0 0 0 &1 2
f1f2!
f9
'
1%4x 21
1%4x 22
!
1%4x 29
![Page 13: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/13.jpg)
Symbolical v.s. Numerical (cont.)
• Comparison
0
0.05
0.1
0.15
0.2
0.25
0.3
0 0.2 0.4 0.6 0.8 1
f(x)
x
exactfinite difference
![Page 14: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/14.jpg)
Symbolical v.s. Numerical (cont.)
DescriptionOf Problem
Formulate
SolveSymbolically
SolveNumerically
NumericalData
![Page 15: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/15.jpg)
Contents
• Roots of Equations• Linear Algebraic Equations and Matrices
– Direct solver– Iterative solver
• Curve Fitting• Numerical Integration Formulas• ODEs• Eigenvalues
![Page 16: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/16.jpg)
What is MATLAB?• Short for MATrix LABoratory• A numerical computing environment and
programming language.• Merits:
– Interactive– Easy matrix manipulation– Plotting of functions and data– Creation of user interfaces– Interface with programs in other languages– Many libraries of useful functions
![Page 17: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/17.jpg)
Importance of MATLAB• A must-have tool for engineers.• A common software engineering students
must learn in the United States.• At least, a good replacement of calculators.• Example: computing the following formula
V' r 2cos&1 r&hr
&(r&h) 2rh&h 2 LV' r 2cos&1 r&hr
&(r&h) 2rh&h 2 L
![Page 18: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/18.jpg)
A Simple Demo of MATLAB• Every variable is a matrix. Case sensitive.• Assigning values to variables
– Real number– Complex number– Matrix
• Mathmatical operations– Matrix operation– Element-by-element operation
![Page 19: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/19.jpg)
A Simple Demo of MATLAB(cont.)
• Built-in functions• Graphics• Script files• Function files• Conditional statement “if”• Loops
– “for”– “while”
![Page 20: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/20.jpg)
Free Compatible MATLAB Packages
• Octave• FreeMAT• SciLAB
![Page 21: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/21.jpg)
Milestones of AI
• Autonomous Cars• Robots• Chess• Quiz
![Page 22: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/22.jpg)
Autonomous Cars
• DARPA Grand Challenge 2004– Route: Mojave Desert, 150 miles.– Prize: 1 million.– Result: no team succeeded.
• DARPA Grand Challenge 2005– Result: 5 teams succeeded.
• DARPA Grand Challenge 2007– Route: urban area in California, 60 miles.– Prize: 3.5 million total.– Result: 6 teams succeeded.
![Page 23: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/23.jpg)
Robots
• DARPA Robotics Challenge 2015– Semi-autonomous ground robots that could do
complex tasks in dangerous, degraded, human-engineered environments.
– Complete 8 tasks simulating disaster response.– Prize: 3.5 millions total.– Winner: Korea KAIST (Korea Advanced
Institute of Science and Technology).
![Page 24: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/24.jpg)
Chess
• IBM Deep Blue chess computer defeated World Champion Kasparov in 1997.
• In 2016, Google Alpha Go defeated Lee Sedol, the second-highest in Go international Championship ranking.
![Page 25: Numerical Methodsjuiching/NMSyllabus.pdf · • Chapra, “Applied Numerical Methods with MATLAB for Engineers and Scientists, 3nd Edition.”](https://reader030.vdocuments.site/reader030/viewer/2022040104/5eb561f7bffcb20091172154/html5/thumbnails/25.jpg)
Quiz
• In 2011, IBM Watson defeated on quiz show Jeopardy! former winners Brad Rutterand Ken Jennings and received the first place prize of $1 million.