Download presentation
Presentation is loading. Please wait.
1
Stability and Sensitivity of Certain Computational Methods: A Symbolic-Numeric Treatment with Mathematica Ali YAZICI Software Engineering Department Atilim University Ankara, Turkey 06836 aliyazici@atilim.edu.tr aliyazici@atilim.edu.tr
2
SYNASC 2010 - Timisoara2 Introduction Computer Algebra Systems (CAS) such as Mathematica, Maple and Matlab offer so many different capabilities, which can be used as an aid in Computer Assisted Instruction. The use of Mathematica (especially its symbolic power) in teaching some of the numerical methods is shown to be effective ([1], [2],[3], [4]). In this study, symbolic and numerical properties of stability and sensitivity of some basic computational procedures are given using Mathematica.
3
SYNASC 2010 - Timisoara3 Definitions Sensitivity: The question how much does a function change under perturbations of its arguments is of importance in numerical computations. Stability: An algorithm, is numerically stable if an error, whatever the reason is, does not grow unexpectedly larger during the calculation. In this work, Mathematica notebooks have been prepared to demonstrate the issues of sensitivity and stability problems for some introductory numerical computations.
4
SYNASC 2010 - Timisoara4 Sensitivity of Polynomials Obviously, the zeros of p(x) are 1,2,...,10 and are simple. However, it can be shown that a small change in the coefficient of x 9 from -55 to -55 + eps for very small values of eps may change some of the real roots of p(x) to be complex (Wilkinson). The roots of the perturbed polynomial are simply calculated (Mathematica) as: {x->1}, {x->2}, {x->2.9998}, {x->4:0061}, {x-> 4.9396},{x-> 10.194}, {x->6.3473-0.37935i}, {x->6.3473 + 0.37935i},{x->8.5828-0.69933i}, {x->8.5828 + 0.69933i}
5
SYNASC 2010 - Timisoara5 Sensitivity animated
6
SYNASC 2010 - Timisoara6 Analysis By differentiating the equation p(x,eps) = 0 with respect to eps, one gets [10] This equation can be used to compute the measure of sensitivity against the roots 1,2,3,...,9, and 10.
7
SYNASC 2010 - Timisoara7 Analysis by Mathematica
8
SYNASC 2010 - Timisoara8...Mathematica The input commands 1-3 below computes the sensitivity constants by invoking the module above.
9
SYNASC 2010 - Timisoara9 Stability of Gram-Schmidt &QR Let A = (a 1, a 2,..., a n ) be a mxn matrix with real values with m ¸ n and rank(A) = n. The CGS process produces an orthogonal basis Q = (q 1, q 2,..., q n ) of span(A), such that A = QR where R is an upper triangular matrix of order n. This factorization can be utilized to determine the eigenvalues of A.
10
SYNASC 2010 - Timisoara10 CGS Algorithm
11
SYNASC 2010 - Timisoara11 Stability Measures The accuracy of the QR factorization based on the CGS process can be simply measured by computing the norm ||A-QR|| The measure of orthogonalization can be obtained similarly by computing the norm ||Q T Q -I||
12
SYNASC 2010 - Timisoara12 Mathematica Implementation of CGS
13
SYNASC 2010 - Timisoara13 Running CGS To display the instability numerically, Hilbert’s matrix (highly ill-conditioned) of order n is chosen. Mathematica commands to produce the Hilbert matrix of order 5 and running the CGS program
14
SYNASC 2010 - Timisoara14...Running CGS
15
SYNASC 2010 - Timisoara15 Results
16
SYNASC 2010 - Timisoara16 Divided Differences
17
SYNASC 2010 - Timisoara17 Mathematica in action
18
SYNASC 2010 - Timisoara18 Propagation of initial error
19
SYNASC 2010 - Timisoara19 Conclusions This study is about using one of the well-known CAS, namely, Mathematica to demonstrate rather complicated concepts just mentioned in a numerical computing course taught to engineering undergraduates. The code segments produced in this study have been successfully used and class tested in the Numerical Methods courses taught at the undergraduate level. The learner with some intermediate knowledge of Mathematica can easily modify the codes at his/her wish and perform additional experiments to understand the concepts of stability, sensitivity and error analysis in scientific problems. This study can be expanded to cover the stability of other (more sophisticated) computational methods. A GUI based interactive tool is also necessary to provide an educational environment for computational problems of similar nature.
20
SYNASC 2010 - Timisoara20
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.