Download presentation
Presentation is loading. Please wait.
Published byRalf Lawrence Modified over 6 years ago
1
Computer Programming for Engineers ENGR 2304-56619 Summer 2015 Class 4
ENGINEERING 2304 Computer Programming for Engineers ENGR Summer 2015 Class 4
2
Class Outline Quiz Review Homework Interpolation
Area Approximation: Rectangle Method and Trapezoidal Rule Simpson’s Rule Newton-Raphson Method Practice Exercises
3
Week 3 Quiz Pull out a sheet of paper and solve the following problems: Compute an amortization table for a six-month loan of $6000 at 5% real interest value. For a reminder, the formula for a monthly payment is: If f(x)=3x^2-2x+3, and g(x)=x+2, find: a) f(3) and f’(4). f(g(x)). M=𝑃∗ 𝑟 1− 𝑟 𝑛
4
Quotes of the Day: “If in other sciences we should arrive at certainty without doubt and truth without error, it behooves us to place the foundations of knowledge in mathematics.” –Roger Bacon, Opus Majus, 1267
5
"Mankind has made giant steps forward…However, what we know is really very, very little compared to what we still have to know.“ –Fabiola Gianotti, CERN Particle Physicist, ATLAS detector coordinator, 2012
6
Homework Questions
7
Linear Interpolation Interpolation can be used to approximate an unknown value between two known points. It consists of finding an equation between the two known points, and finding the desired point on that equation. Numerous interpolation methods exist. For linear interpolation: 𝑦= 𝑦 0 + 𝑦 1 − 𝑦 0 𝑥−𝑥 0 𝑥 1 −𝑥 0
8
Approximating Area: Rectangle Method
Method of Approximating Area Under a Polynomial or Other Function 𝑎 𝑏 𝑓 𝑥 𝑑𝑥≈ℎ 𝑛=0 𝑁−1 𝑓( 𝑥 𝑛 ) Where ℎ= 𝑏−𝑎 𝑁 and 𝑥 𝑛 =𝑎+𝑛ℎ
9
Approximating Area: Trapezoidal Rule
Another Method of Approximating Area Under a Polynomial or Other Function 𝑎 𝑏 𝑓 𝑥 𝑑𝑥≈ ℎ 2 𝑘=1 𝑁 𝑓 𝑥 𝑘+1 +𝑓( 𝑥 𝑘 )
10
Numerical Integration: Simpson’s Rule
A method of numerical integration by dividing an equation up into regions and approximating the area of each region by the function: Width of each region need not be the same. 𝑎 𝑏 𝑓 𝑥 𝑑𝑥≈ 𝑏−𝑎 6 𝑓 𝑎 +4𝑓 𝑏+𝑎 2 +𝑓(𝑏)
11
Approximating Roots: The Newton-Raphson Method
A method of iterating to the roots of a real-value, differentiable function. 𝑥:𝑓 𝑥 =0 𝑥 1 = 𝑥 0 − 𝑓( 𝑥 0 ) 𝑓′( 𝑥 0 ) 𝑥 𝑛+1 = 𝑥 𝑛 − 𝑓( 𝑥 𝑛 ) 𝑓′( 𝑥 𝑛 )
12
Example 1: Interpolation Exercise
13
Example 2: Area Example y=3x^2-2x+3 Find the area from x=-3 to x=+3 using various numerical integration methods.
14
Example 3: Newton-Raphson Method
Use the Newton-Raphson Method to find the two intercepts of y=-3x^2-2x+3
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.