25
Nonlinear Equations System

Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

  • Upload
    dinhthu

  • View
    223

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Nonlinear Equations System

Page 2: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Content

• Methods Used to Solve Nonlinear Equations System• Newton 1st Order Method• Newton 2nd Order Method

Page 3: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Methods Used to Solve Nonlinear Equations System• The methods used to solve a system of nonlinear equations are:

• Newton 1st Order Method• Newton 2nd Order Method

• To solve a system of nonlinear equations, such that:𝒇𝒇 𝒙𝒙,𝒚𝒚 = 𝟎𝟎𝒈𝒈 𝒙𝒙,𝒚𝒚 = 𝟎𝟎

with estimates of (𝒙𝒙𝟎𝟎,𝒚𝒚𝟎𝟎), it is necessary to use the Taylor Series.

Page 4: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Methods Used to Solve Nonlinear Equations System• In this way we can express the above functions as:

• Newton methods are used for solving systems of nonlinear equations in the approximation of functions of several variables by linear polynomials Taylor.

Page 5: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Newton 1st Order Method

• Suppose that the estimates (𝒙𝒙𝟎𝟎,𝒚𝒚𝟎𝟎) of the solution of equations 𝒇𝒇 𝒙𝒙,𝒚𝒚 =𝟎𝟎, 𝒈𝒈 𝒙𝒙,𝒚𝒚 = 𝟎𝟎, are known. If these estimates 𝒙𝒙𝟎𝟎,𝒚𝒚𝟎𝟎 are increased respectively by 𝜹𝜹𝒙𝒙, 𝜹𝜹𝒚𝒚, then the first order approximations resulting from changes in 𝒇𝒇 𝒙𝒙,𝒚𝒚 = 𝟎𝟎 and 𝒈𝒈 𝒙𝒙,𝒚𝒚 = 𝟎𝟎 are given by the total differentials:

• A solution of the system can be obtained by determining 𝜹𝜹𝒙𝒙, 𝜹𝜹𝒚𝒚 so that the total differential satisfy constraints:

Page 6: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Newton 1st Order Method

• A set of linear equations 𝜹𝜹𝒙𝒙 and 𝜹𝜹𝒚𝒚 can be found by replacing these restrictions:

and these linear equations can be solved for 𝜹𝜹𝒙𝒙 and 𝜹𝜹𝒚𝒚.• If the functions 𝒇𝒇 and 𝒈𝒈 are evaluated at (𝒙𝒙𝟎𝟎 + 𝜹𝜹𝒙𝒙,𝒚𝒚𝟎𝟎 + 𝜹𝜹𝒚𝒚) and

represent the Taylor Series, we obtain:

Page 7: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Newton 1st Order Method

• If these Taylor Series are sufficiently accurate, it is clear that (𝒙𝒙𝟎𝟎 +𝜹𝜹𝒙𝒙,𝒚𝒚𝟎𝟎 + 𝜹𝜹𝒚𝒚) be very good approximations to the solutions of the equations.

• If 𝜹𝜹𝒙𝒙 > 𝜺𝜺 or if 𝜹𝜹𝒚𝒚 > 𝜺𝜺, where 𝜺𝜺 is a small positive number, it is necessary to replace 𝒙𝒙𝟎𝟎 by 𝒙𝒙𝟎𝟎 + 𝜹𝜹𝒙𝒙 and 𝒚𝒚𝟎𝟎 by 𝒚𝒚𝟎𝟎 + 𝜹𝜹𝒚𝒚, and repeat this throughout the process.

• Usually with a few iterations of this process, exact values of the roots occur when their initial values (𝒙𝒙𝟎𝟎,𝒚𝒚𝟎𝟎) are sufficiently close to the true solution.

• The extension of this method to the solution of 𝒏𝒏 equations with 𝒏𝒏unknowns is obtained by replacing the expression of two variables in the above equations by their counterparts in 𝒏𝒏 variables.

Page 8: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Newton 1st Order MethodExample:• Since the initial values 𝒙𝒙𝟎𝟎,𝒚𝒚𝟎𝟎 = (𝟏𝟏,𝟏𝟏), determine a solution of the system of nonlinear

equations:

• For each iteration, calculate the differential solving the following linear equation:

• The following values of 𝒙𝒙 and 𝒚𝒚 are:

• Continue iterating until differentials are negligible.

Page 9: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Newton 1st Order MethodSolution:• It is necessary to obtain the first derivative of each function

𝑓𝑓𝑥𝑥 𝑥𝑥, 𝑦𝑦 = 2𝑥𝑥 𝑓𝑓𝑦𝑦 𝑥𝑥, 𝑦𝑦 = 2𝑥𝑥

𝑔𝑔𝑥𝑥 𝑥𝑥,𝑦𝑦 =29𝑥𝑥 𝑔𝑔𝑦𝑦 𝑥𝑥, 𝑦𝑦 = 2𝑦𝑦

⇒2𝑥𝑥 2𝑦𝑦29𝑥𝑥 2𝑦𝑦

𝛿𝛿𝑥𝑥𝛿𝛿𝑦𝑦

=− 𝑥𝑥2 + 𝑦𝑦2 − 4

−𝑥𝑥2

9+ 𝑦𝑦2 − 1

• Replace the initial values 𝒙𝒙𝟎𝟎,𝒚𝒚𝟎𝟎 = (𝟏𝟏,𝟏𝟏) in the functions 𝒇𝒇 𝒙𝒙,𝒚𝒚 and 𝒈𝒈 𝒙𝒙,𝒚𝒚 , and each of their derivatives for use in the matrix

2 229

2𝛿𝛿𝑥𝑥𝛿𝛿𝑦𝑦

=− −2− 1

9⇒ 𝛿𝛿𝑥𝑥 =

2 2−1/9 22 22/9 2

, 𝛿𝛿𝑦𝑦 =2 22 −1/92 22/9 2

• The solution of this matrix is

Page 10: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Newton 1st Order Method

• The new values of 𝒙𝒙𝟎𝟎 and 𝒚𝒚𝟎𝟎 will be

• Substituting these values of the functions 𝒇𝒇 𝒙𝒙,𝒚𝒚 and 𝒈𝒈 𝒙𝒙,𝒚𝒚 , and each one of its derivatives for use in the matrix

• The solution of this matrix is

Page 11: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Newton 1st Order Method

• The new values of 𝒙𝒙𝟎𝟎 and 𝒚𝒚𝟎𝟎 will be

• Substituting these values of the functions 𝒇𝒇 𝒙𝒙,𝒚𝒚 and 𝒈𝒈 𝒙𝒙,𝒚𝒚 , and each one of its derivatives for use in the matrix

• The solution of this matrix is

Page 12: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Newton 1st Order Method

• The new values of 𝒙𝒙𝟎𝟎 and 𝒚𝒚𝟎𝟎 will be

• Substituting these values to functions we obtain𝒇𝒇 𝒙𝒙,𝒚𝒚 = 𝟎𝟎.𝟎𝟎𝟎𝟎𝟏𝟏𝟎𝟎𝟎𝟎𝟎𝟎𝒈𝒈 𝒙𝒙,𝒚𝒚 = 𝟎𝟎.𝟎𝟎𝟎𝟎𝟏𝟏𝟎𝟎𝟎𝟎𝟎𝟎

• Since 𝒇𝒇 and 𝒈𝒈 are approximately zero, the last values of 𝒙𝒙𝟎𝟎 and 𝒚𝒚𝟎𝟎 are good approximations of the roots of the given equations.

Page 13: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Newton 1st Order Method

• A more practical way to solve it manually is making a table with the values obtained:

𝒇𝒇 = 𝑥𝑥2 + 𝑦𝑦2 − 4;𝒇𝒇𝒙𝒙 = 2𝑥𝑥;𝒇𝒇𝒚𝒚 = 2𝑦𝑦; 𝜹𝜹𝒙𝒙 = −𝑓𝑓 𝑔𝑔𝑦𝑦 − −𝑔𝑔 𝑓𝑓𝑦𝑦𝑓𝑓𝑥𝑥 𝑔𝑔𝑦𝑦 − 𝑔𝑔𝑥𝑥 𝑓𝑓𝑦𝑦

𝒈𝒈 = 𝑥𝑥2

9+ 𝑦𝑦2 − 1;𝒈𝒈𝒙𝒙 = 2

9𝑥𝑥;𝒈𝒈𝒚𝒚 = 2𝑦𝑦; 𝜹𝜹𝒚𝒚 = 𝑓𝑓𝑥𝑥 −𝑔𝑔 − 𝑔𝑔𝑥𝑥 −𝑓𝑓

𝑓𝑓𝑥𝑥 𝑔𝑔𝑦𝑦 − 𝑔𝑔𝑥𝑥 𝑓𝑓𝑦𝑦

Page 14: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Newton 2nd Order Method

• Newton's method can be modified to account for the second derivatives of the Taylor series. That is, if the estimates 𝒙𝒙𝟎𝟎,𝒚𝒚𝟎𝟎, are increased respectively by 𝜹𝜹𝒙𝒙, 𝜹𝜹𝒚𝒚, then the approximations of second order resulting from changes in 𝒇𝒇(𝒙𝒙,𝒚𝒚) = 𝟎𝟎 and 𝒈𝒈(𝒙𝒙,𝒚𝒚) = 𝟎𝟎 are given by the differential total:

• One solution to the system of equations can be obtained by determining𝜹𝜹𝒙𝒙, 𝜹𝜹𝒚𝒚 such that 𝜹𝜹𝒇𝒇, 𝜹𝜹𝒈𝒈 satisfy the following restrictions:

Page 15: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Newton 2nd Order Method

• Combining the above equations and factoring the right side we obtain:

Page 16: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Newton 2nd Order Method

• Now, if 𝜹𝜹𝒙𝒙, 𝜹𝜹𝒚𝒚 within the parentheses are approximate respectively − 𝒇𝒇/𝒇𝒇𝒙𝒙 and −𝒇𝒇/𝒇𝒇𝒚𝒚 in the first equation and −𝒈𝒈/𝒈𝒈𝒙𝒙 and −𝒈𝒈/𝒈𝒈𝒚𝒚 in the second equation, the above system can be represented by a system of linear equations 𝜹𝜹𝒙𝒙 and 𝜹𝜹𝒚𝒚 :

Page 17: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Newton 2nd Order Method

• These equations can be solved directly for 𝜹𝜹𝒙𝒙 and 𝜹𝜹𝒚𝒚, y (𝒙𝒙𝟎𝟎 +𝜹𝜹𝒙𝒙,𝒚𝒚𝟎𝟎 + 𝜹𝜹𝒚𝒚) should be improved solving the system of nonlinear equations with an accuracy of quadratic Taylor series for the approximations estimate 𝜹𝜹𝒙𝒙 and 𝜹𝜹𝒚𝒚 by these restrictions.

• If |𝜹𝜹𝒙𝒙| > 𝜺𝜺 o if |𝜹𝜹𝒚𝒚| > 𝜺𝜺, where 𝜺𝜺 is a small positive number, it is necessary to replace 𝒙𝒙𝟎𝟎 by 𝒙𝒙𝟎𝟎 + 𝜹𝜹𝒙𝒙 and 𝒚𝒚𝟎𝟎 by 𝒚𝒚𝟎𝟎 + 𝜹𝜹𝒚𝒚, and repeat this throughout the process.

Page 18: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Newton 2nd Order Method

Example:• Using the previous example where

• The values of 𝜹𝜹𝒙𝒙 and 𝜹𝜹𝒚𝒚 can be obtained by solving the following system of linear equations in matrix form:

Page 19: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Newton 2nd Order Method

• The derivatives are:

Page 20: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Newton 2nd Order Method

• Using the table we obtain:

• As can be seen from the second iteration have a very approximate solution.

Page 21: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the
Page 22: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the
Page 23: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Homework 4 (Individual)

• Find the intersection in the first quadrant of the graphs of the following functions:

• using:a) Method of Newton First Orderb) Method of Newton Second Order

Page 24: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Computer Program 3 (by team)

• Submit a computer program that solves the above problem, for each of the following methods:

a) Newton First Orderb) Newton Second Order

• Hand over:• Computational algorithm (printed)• Source Code (printed and file)• Executable (file)

Page 25: Nonlinear Equations System - ITESM€¦ · Methods Used to Solve Nonlinear Equations System ... • Newton methods are used for solving systems of nonlinear ... a solution of the

Nonlinear Equations System