Download Linear Approximation

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Computational fluid dynamics wikipedia , lookup

Computational electromagnetics wikipedia , lookup

Mathematics of radio engineering wikipedia , lookup

Receiver operating characteristic wikipedia , lookup

Least squares wikipedia , lookup

Root-finding algorithm wikipedia , lookup

Newton's method wikipedia , lookup

False position method wikipedia , lookup

Transcript
Linear Approximation
• It is a way of finding the equation of a line tangent
to a curve and using it to approximate a y value of
the curve.
Method #1
Using f(x) = x³ + 4x – 1, approximate f(3.001).
~ f ‘(x) = 3x² + 4
1) Choose nice number (most likely whole)  a = 3
2) dx = given value – a  3.001 – 3 = .001
3) dy = f ‘(a) times dx  (3(3²) + 4) x ( .001) = 0.031
4) f(3.001) = f(a) + dy  (3³ + 4(3) – 1) + .031 = 38.031
Method #2
Approximate f (2.1). f(x) = x³ – 2x + 3.
~ f ‘(x)= 3x² – 2
a) nice number  x = 2  y = (2³ - 2(2) + 3) = 7
slope: f ‘ (2) = 10
b) point slope: y-y1 = m ( x- x1)  y – 7= 10 (x – 2)
y = 10x – 13
c) approx. with given y-value  y = 10(2.1) – 13
y=8
Newton’s Method
• Using a tangent line to find the zeros (x-intercepts,
roots) of a given function.
~ Find the slope of the tangent line.
Slope: f ‘(xn) = f (xn)
xn- xn + 1 hint: xn + 1 is the next number
Therefore: xn + 1 = xn - f (xn)
f ‘(xn)
Example:
f(x) = x³ - x – 1; x0 = 1.5, find x2.
~ f ‘(x) = 3x² - 1
x1 = x0 – [f(x0) / f ‘(x0)]  x1 = 1.5 – ( 0.875 / 5.75)
= about 1.347826087
x2 = x1 – [f(x1) / f ‘ (x1)]  x2 = 1.347 – (0.101 / 1.030)
= about 1.248941748
•Best way to calculate these numbers is to store them in
your calculator.
*graphing calc: press “STO ” button, then select
variable to store as.
Graphing Calculator Shortcut!!
Example:
f(x) = x³ + 4x –1, find root using Newton’s Method
First, graph the function and recognize a whole
number the zero is close to. Remember it! In this
case, it is 0.
\Y1 = x^3+4x-1
 unhighlight equal sign here by
pressing “ENTER” on it.
Scroll down to bottom of screen…
\Y0 = x - Y1 / nDeriv(Y1,x,x)
equal sign should be
highlighted here
Go to “TBLSET” by pressing “2nd” then “WINDOW”
Select “Ask” for Indpnt.
Go to “TABLE” by pressing 2nd “GRAPH”
The table should be blank
Remember that number you chose before? For this
equation, 0. Type that in for X and press “ENTER”. You
get .25 for Y0. Then enter .25 for the next X. You get
.24627. Then enter .24627 for the next X. You get
.24627 for Y0 again. The zero for this problem is at
where x= .24627.
~The zero is at where you get the same Y0 on the
table twice.
Reimann’s Sums
•They are used to
approximate the area under
a curve.
•Example on the right is
y = x² [0,4]
• Left - width of each
rectangle times (sum
of each height)
1 ( 0 + 1 + 4 + 9) = 14
• Right - width of each
rectangle (sum of each
height)
1 ( 1 + 4 + 9 + 16) = 30
• Midpoint- width of
each rectangle (sum of
each height)
1 [ (1/4) + (9/4) + (25/4) +
(49/4)] = 21
• Trapezoid
area of trapezoid =
(1/2)(width)(b1 + b2)
use similar equation like
below
(1/2)(1)( 0 + 1 + 1 +4 + 4 + 9
+ 9 + 16) = 22