CURVE FITTING LEAST SQUARE LINE. Consider the class of linear function of the form

Similar documents
CURVE FITTING LEAST SQUARE LINE. Consider the class of linear function of the form. = Ax+ B...(1)

5.1 Least-Squares Line

Logarithmic and Exponential Equations and Change-of-Base

Name: Partners: PreCalculus. Review 5 Version A

Exponential and. Logarithmic Functions. Exponential Functions. Logarithmic Functions

9 11 Solve the initial-value problem Evaluate the integral. 1. y sin 3 x cos 2 x dx. calculation. 1 + i i23

APPENDIX : PARTIAL FRACTIONS

Lesson 3: Linear differential equations of the first order Solve each of the following differential equations by two methods.

Math 4381 / 6378 Symmetry Analysis

Regression and Nonlinear Axes

Preliminaries Lectures. Dr. Abdulla Eid. Department of Mathematics MATHS 101: Calculus I

2.6 Logarithmic Functions. Inverse Functions. Question: What is the relationship between f(x) = x 2 and g(x) = x?

Function Junction: Homework Examples from ACE

, a 1. , a 2. ,..., a n

Functions and Equations

Solutions 2. January 23, x x

y = 7x 2 + 2x 7 ( x, f (x)) y = 3x + 6 f (x) = 3( x 3) 2 dy dx = 3 dy dx =14x + 2 dy dy dx = 2x = 6x 18 dx dx = 2ax + b

Solutions to Homework 2

Mock Final Exam Name. Solve and check the linear equation. 1) (-8x + 8) + 1 = -7(x + 3) A) {- 30} B) {- 6} C) {30} D) {- 28}

10/22/16. 1 Math HL - Santowski SKILLS REVIEW. Lesson 15 Graphs of Rational Functions. Lesson Objectives. (A) Rational Functions

3 Algebraic Methods. we can differentiate both sides implicitly to obtain a differential equation involving x and y:

i x i y i

Integration - Past Edexcel Exam Questions

a factors The exponential 0 is a special case. If b is any nonzero real number, then

How might we evaluate this? Suppose that, by some good luck, we knew that. x 2 5. x 2 dx 5

7.4* General logarithmic and exponential functions

8 + 6) x 2 ) y = h(x)

LECTURE 16 GAUSS QUADRATURE In general for Newton-Cotes (equispaced interpolation points/ data points/ integration points/ nodes).

Section 6.5. Least Squares Problems

1.6 and 5.3. Curve Fitting One of the broadest applications of linear algebra is to curve fitting, especially in determining unknown coefficients in

SKILL BUILDER TEN. Graphs of Linear Equations with Two Variables. If x = 2 then y = = = 7 and (2, 7) is a solution.

Chapter 2. First-Order Differential Equations

JUST THE MATHS UNIT NUMBER ORDINARY DIFFERENTIAL EQUATIONS 1 (First order equations (A)) A.J.Hobson

ECONOMICS 207 SPRING 2006 LABORATORY EXERCISE 5 KEY. 8 = 10(5x 2) = 9(3x + 8), x 50x 20 = 27x x = 92 x = 4. 8x 2 22x + 15 = 0 (2x 3)(4x 5) = 0

Partial Fraction Decomposition

College Algebra. Basics to Theory of Equations. Chapter Goals and Assessment. John J. Schiller and Marie A. Wurster. Slide 1

Lesson 9 Exploring Graphs of Quadratic Functions

Integration of Rational Functions by Partial Fractions

Here are the exams I wrote when teaching Math 115 in Fall 2018 at Ferris State University. Each exam is followed by its solutions.

Differential Equations of First Order. Separable Differential Equations. Euler s Method

f(x) = 2x + 5 3x 1. f 1 (x) = x + 5 3x 2. f(x) = 102x x

DIFFERENTIAL EQUATIONS

Sect Polynomial and Rational Inequalities

Integration of Rational Functions by Partial Fractions

The coordinates of the vertex of the corresponding parabola are p, q. If a > 0, the parabola opens upward. If a < 0, the parabola opens downward.

1 Functions and Graphs

A Library of Functions

MS 2001: Test 1 B Solutions

Edexcel GCE Further Pure Mathematics (FP1) Required Knowledge Information Sheet. Daniel Hammocks

King Fahd University of Petroleum and Minerals Prep-Year Math Program Math Term 161 Recitation (R1, R2)

Jim Lambers MAT 419/519 Summer Session Lecture 13 Notes

8.4 Partial Fractions

Foundations of Math II Unit 5: Solving Equations

Logarithmic Functions

Maths Class 11 Chapter 5 Part -1 Quadratic equations

(a) Write down the value of q and of r. (2) Write down the equation of the axis of symmetry. (1) (c) Find the value of p. (3) (Total 6 marks)

Given the table of values, determine the equation

M GENERAL MATHEMATICS -2- Dr. Tariq A. AlFadhel 1 Solution of the First Mid-Term Exam First semester H

Math Exam Jam Solutions. Contents. 1 Linear Inequalities and Absolute Value Equations 2

Logarithmic Functions and Their Graphs

Homework Solutions Week of November = 1(1) + 0(x 1) + 0(x 1) 2 x = 1(1) + 1(x 1) + 0(x 1) 2 x 2 = 1(1) + 2(x 1) + 1(x 1) 2

RF2 Unit Test # 2 Review Quadratics (Chapter 6) 1. What is the degree of a quadratic function?

Chapter 3. Second Order Linear PDEs

Classification of cubics up to affine transformations

Final Exam A Name. 20 i C) Solve the equation by factoring. 4) x2 = x + 30 A) {-5, 6} B) {5, 6} C) {1, 30} D) {-5, -6} -9 ± i 3 14

MATH LECTURE NOTES FIRST ORDER SEPARABLE DIFFERENTIAL EQUATIONS OVERVIEW

Maths Higher Prelim Content

b g if f x x x x x x

Calculus I Homework: The Derivatives of Polynomials and Exponential Functions Page 1

Quadratic function and equations Quadratic function/equations, supply, demand, market equilibrium

3. Identify and find the general solution of each of the following first order differential equations.

MATH 1040 CP 11 SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question.

2 Functions of random variables

Root Finding (and Optimisation)

CALCULUS ASSESSMENT REVIEW

Algebra III: Blizzard Bag #1 Exponential and Logarithm Functions

UNDETERMINED COEFFICIENTS SUPERPOSITION APPROACH *

Math 1131 Multiple Choice Practice: Exam 2 Spring 2018

RELATIONS AND FUNCTIONS through

Linear DifferentiaL Equation

Solutions to the Review Questions

Secret Sharing CPT, Version 3

8 Systems of Linear Equations

5.6 Logarithmic and Exponential Equations

University of Toronto Solutions to MAT186H1F TERM TEST of Tuesday, October 15, 2013 Duration: 100 minutes

Local Maximums and Local Minimums of Functions. f(x, y) has a local minimum at the point (x 0, y 0 ) if f(x 0, y 0 ) f(x, y) for

Assignment 1, SOLUTIONS

PUTNAM PROBLEMS SEQUENCES, SERIES AND RECURRENCES. Notes

This Week. Basic Problem. Instantaneous Rate of Change. Compute the tangent line to the curve y = f (x) at x = a.

Solutions 2017 AB Exam

Introduction to Differentials

Analytic Geometry and Calculus I Exam 1 Practice Problems Solutions 2/19/7

Announcements. Topics: Homework: - sections 4.5 and * Read these sections and study solved examples in your textbook!

Math 201 Solutions to Assignment 1. 2ydy = x 2 dx. y = C 1 3 x3

Lecture 5 - Logarithms, Slope of a Function, Derivatives

11.5. The Chain Rule. Introduction. Prerequisites. Learning Outcomes

AP Calculus Chapter 3 Testbank (Mr. Surowski)

MATH College Algebra Review for Test 2

MATH 019: Final Review December 3, 2017

Name: ID: Math 233 Exam 1. Page 1

Transcription:

CURVE FITTIG LEAST SQUARE LIE Consider the class of linear function of the form f ( x) B...() In previous chapter we saw how to construct a polnomial that passes through a set of points. If all numerical values x, are nown to several significant digits of accurac, then the polnomial interpolation can be used successfull ; other wise it can not. For values x,, it realize that the true value f( x ) satisfies f ( x ) e.() where e is the measurement error How do find the best approximation of the form () that goes near (not alwas through) the points? To answer this question we need to discuss the errors e f ( x ) () There are several norms that can be used with the residuals in () to measure how far the curve f ( x) lies from the data max MAXIMUM ERROR : E ( f ) max f ( x ) e...() AVERAGE ERROR : E ( f ) f ( x ) e...(5) K K K ROOT MEA SQUARE ERROR ( RMS): E ( f ) f ( x ) e K...(6)

Example Compare the maximum error, average error and RMS error for the linear approximation f ( x) 8.6.6x to the data points (-,), (,9), (,7), (,5), (,), (,), (5,) and (6,-). x f ( x) 8.6.6x e f ( x ) e - 5 6 9 7 5 -. 8.6 7. 5..8..6 -......8.6..6.6..6.6.6. =8 MAXIMUM ERROR : E ( f ) max.,.,.,.,.8,.6,.8 AVERAGE ERROR : E ( f ) e (.6).5 8 K K 8 ROOT MEA SQUARE ERROR ( RMS): E ( f ) e (.).8 Best fitting line is found b minimizing one of the quantities in equation () through (6). Hence there are three best fitting lines that we could find. The third norm E ( f ) is the traditional choice because it is much easier to minimize computationall.

FIDIG THE LEAST SQUARES LIES Let x, be a set of points ( where x are distinct). The least square line f ( x) B is the line minimize the RMS error E ( f ). ( x, ) ( x, ) ( x, ) ( x, ) The quantit E ( f ) will be minimum if and onl if the quantit ( E ( f )) ( B) is minimum Theorem Suppose that x, are points. The coefficients of the least square line B are the solution of the following linear sstem x A x B x x A B...(7)

Proof Where E( A, B) B The minimum value of E( A, B ) is determined b setting the partial derivatives E( A, B) E( A, B) and equal to zero and solving these equation for A and B. A B E( A, B) A B x Bx x ( ) ( )...(8) E( A, B) ( B ) ( Bx )...(9) B from (8) and (9) x A x B x x A B

Example Find the least squares line B for the following data and evaluate E ( f ) x -6-6 7 5 f( x ) 7.6.. -. According to the above table x f( x ) x x e f ( x ) ( e ) -6-6 7 5 7.6.. -. 6 6 - -......6.6.. Where =5 then 7 8-8. 8 A B= -8 A 5B= 7 solve x sstem to find A= -.6 and B=. B.6x. and E( f)..8 5 5

THE POWER FIT m Theorem Suppose that x, squares power curve points, where x are distinct. The coefficients A of the least m is given b Proof, where m x A x m E( A) m m x E m m x A A m x Example Find the power fits and for the following data and use ( ) determine which curve is best. x..6.9. 5. 7.5.6. 9 5 5 x x for A and for A 5 5 6 x x 6

Establish following table x x x x 6 x x x..6.9. 5. 7.5.6. 9. 5.9 6.76 8.. 8.67 7.576.8.768 6 7.98 5.697 7.78.7 6 8. 8.95 59.8 7.7. 9.675 7.656. 9.56.8 9.55 86.56 5.6 6.59 65.66 89.5 7.95 9.56 7.95 9.56 for A.687 and for A.59 65.66 89.5 f ( x).687 x and g( x).59x Find best curve fit using E ( f ) x f( x ) gx ( ) e f ( x ) e g( x ) e e..6.9. 5. 7.5.6. 9. 6.78 8.9..9 7.7.7 7.8.7.9 9..68..8..7.8.....75.7.6..99...59..89 8.9.8 for.687 x E ( f ) 8.9.97 and for.59 x E ( f ).8.85 5 5 the best power fit is.59x 7

DATA LIEARIZATIO METHOD FOR Ce Suppose that we are given points x, and we want to fit an exponential curve Ce...() The first step is to tae logarithm of both sides ln ln( Ce ) ln C ln e then ln ln C...() Then sa Y ln, X x, and B lnc from () Y AX B Then use X A X B X Y X A B Y to find A, B and C Example Use data linearization method and find the exponential fit Ce for the following data x.5.5.5 5 7.5 where, Ce then ln lnc let Y ln, x X and B lnc 8

Establish table x X Y ln XY X.5.5.5 5 7.5.5.96.5.69.5.96.56.87 8.6 9 6 6.96 6.9 =5 AB=6.9 -x A 5B=6.98 A=.9 A=.9 B=.57.57 lnc B.57 C e.579 Ce.579e.9x 9

CHAGE OF VARIABLES FOR DATA LIEARIZATIO Function =f(x) A B x Linearized form Y=AXB A B x Change of variables and constants X, Y x D x C x C D D C Y, A, B D D B B Y, X x x B A B x Y, X x Aln x B Aln x B X ln x, Y Ce ln ln C Y ln, X x, B lnc A Cx ln ln ln A x C Y ln, X ln x, B lnc B B X x, Y Cxe Dx ln B x Y ln, X x x L L ln lnc Ce L Y ln, X x, B lnc

Example : Fit a curve of the form A Cx to the following data x 5 and determine E ( f ) A A then Cx Cx ln Aln x ln C A Cx where Y ln, X ln x, B ln C x X ln x Y ln X XY 5.98.69.86.8.96.98.97.5..796.68.685.7 =.685 A.796 B =.7.796 A B =.68 solve x sstem then Where -.85 A= -.75 -------- A=.9889 and B=.9996.989.9996 A.989 and B ln C C e C e.77 f ( x).77x ow find E ( f ) using f(x) and given data B

x ( ) f x e f ( x ) e 5 5.8.8...779.66.9.9.7.85 E( f).85.5 EXERCISE : Let a x a x Find the curve fit for the function using the following table and determine E ( f ) x.5. -.6.78.66.8 EXERCISE : Find the curve fit f ( x) Cxe B with f (), for the points (-,), (, 6) and (,9) using the least square technique and determine E ( f ).

LEAST SQUARE PARABOLA Theorem: Suppose that x, coefficients of the least squares parabola, are points, where the abscissas are disdinct. The f ( x) Bx C...() are the solution values A,B and C of the linear sstem, x A x B x C x x A x B x C x x A x B C...() Proof: The coefficients A,B and C will minimize the quantit, The partial derivatives,, E A B C Bx C E, A Bx C x x A x B x C x E Bx C x, x A x B x C x B E Bx C, x A x B C C

Example: Find the least squares parabola fort he four points,,,,, and, x x^ x^ x^ (x)() (x^)() - 9-7 8-9 7 8 6 6 6 56 8 8 9 5 5 5 79 The linear sstem for finding A,B and C becomes x A x B x C x x A x B x C x x A x B C 5A 5B 9C 79 5A 9B C 5 9A B C 8

ow we should solve x sstem. Using Cramer s Rule, 5 5 9 5 9 78 9 79 5 9 5 9 585 585 A.786 8 78 5 79 9 5 5 6 6 B.995 9 8 78 5 5 79 5 9 5 788 788 C.8559 9 8 78 Thus, the least-square parabola is.786 x.995 x.8559 5