270 likes | 489 Views
Zagazig University Faculty of Engineering Phy . & Eng.Math . Dept . Engineering Mathematics (4) For Third Year (Electrical Department) (Power, Communications, and Computer Science) 2011-2012. Course Outline. Part 1 (Analytic Mathematics) Special Functions
E N D
Zagazig University Faculty of Engineering Phy. & Eng.Math. Dept. Engineering Mathematics (4) For Third Year (Electrical Department) (Power, Communications, and Computer Science) 2011-2012
Course Outline Part 1 (Analytic Mathematics) • Special Functions • PARTIAL DIFFERENTIAL EQUATIONS Part 2 (Numerical Mathematics) • Numerical Solution of Linear Equations • Numerical Solution of Nonlinear Equations • Curve Fitting • Interpolation • Numerical Integration • Numerical Solution of Ordinary Differential Equations
• Please review: (1) Linear algebra (2) Calculus and ordinary differential equation (3) Matlab or other programming languages
Introduction Why study numerical methods? • To solve problems that cannot be solved exactly
Most ( > 99.9%) of real world problems in science/engineering are complicated enough that they can only be solved numerically
True Error • True Error = True Value – Approximate Value • Numerical solutions are approximate, not exact. • Error estimation is always important. Relative True Error True Error ) = Relative True Error ( True Value Approximate Error Approximate Error ( ) = Present Approximation – Previous Approximation
In this chapter, we deal with several numerical schemes for solving a system of equations
Electrical Networks In such networks, Ohm’s law and Kirchhoff’s laws govern current flow, as follows: Ohm’s Law: The voltage drop across a resistor is the product of the current and the resistance: V=IR Kirchhoff’s first Law: The sum of the currents flowing into a node is equal to the sum of the current flowing out. Kirchhoff’s second Law: The algebraic sum of the voltage drops around a closed loop is equal to the total voltage in the loop.
Example Determine the currents I1, I2, and I3 for the following electrical network: Applying Kirchhoff’s first Law to either of the nodes B or C, we find I1=I2+I3. In other words: I1-I2-I3 =0
Applying Kirchhoff’s second Law to the loops BDCB and BCAB, we obtain the equations • -10I1+10I2=10. • 20I1+10I2 =5. • This gives a linear system of three equations
Some Facts about Linear Systems • when the number (M) of equations and the number (N) of unknowns are equal (M = N) • AM×N is square, if |A| ≠ 0. system has a unique solution • if |A| = 0 the equations may have an infinite number of solutions (if M<N), or no solutions at all (if M>N). • If the equations are ill-conditioned, numerical solutions of equations are not to be trusted.
Ill-conditioning means small changes in the coefficient matrix result in large changes in the solution. Example: The following system 2x + y =3 2x + 1.001y = 0 have the solution x = 1501.5, y = −3000. changing the second equation to 2x + 1.002y = 0 and re-solving the equations. The result is x = 751.5, y = −1500.
Note that a 0.1% change in the coefficient of y produced a 100% change in the solution. • The matrix may be ill-conditioned when: • Where Euclidean Norm of A,
Recall the system • 2x + y =3 • 2x + 1.001y = 0 Since • and • , then the equations are ill-conditioned.
1- Direct Methods • Explicit recursive formulas are used to determine the components of the vector X constituting the solution. • Advantages :simplicity and universality. • Disadvantages: • the necessity to store (in the computer memory) the whole coefficient matrix A during the computing process. • the effect of computing error accumulation, which is specially inconvenient in case of very large equation systems, such as for N>100.
Cramer’s Rule - A Direct Procedure The components of the solution are computed as: Where is the determinant of the matrix with its kth column replaced by vector B, is the determinant of matrix
Gauss-Elimination Method- A Direct Procedure Basic steps of Gauss-Elimination Method are: • Construct the augmented coefficient matrix in the form • Transform A to upper triangular matrix. The transformation is carried out by applying the following elementary row operations : • Exchanging two rows. • Multiplying row by a nonzero constant. • Adding or subtracting row from another one.
The last equation is solved first, yielding • , and then by back substitutions the remaining unknowns are determined.
2- Iterative Methods To be continued in Lecture 2
Summary • Course Outline • Introduction to numerical methods. • Chapter 3: Numerical Solution of Linear Equations • 1-Direct methods: • a)Cramer’s Rule. • b)Gauss-elimination method.