r n l n i r n VU n V#i l rm mdj~ ~j r n l n i n m n ~ n U#i r d md n jml n l n i j n V V n x Fv us ~l lm mmmr ~d~ t r q jd l jld dlj n j ~ ~ n i kUV #kUl n # n i #x e u v y v SVv Uv Ug v v u t x t t u v t t u u v x v tVk y wv t 3 y Y y f f n p f p l y p n
Final Exam, Math 151A/2, Winter 2001, UCLA, 03/21/2001, 8am-11am I. (a) Let x0 , x1 , ., xn be n + 1 distinct points in [a, b], with x0 = a and xn = b, and f C n+1 [a, b]. Let P (x) = P0,1,.,n(x) be the Lagrange polynomial interpolating the points x0 , x1
Fall 2015
Due: Oct 7, 1pm
All your answers except computer programs should be submitted in class before class begins
(please show your work). Computer programs as well as numerical results or plots generated by
your programs should be submitted to the CCL
Math 151A: Homework 4
Fall 2015
Due: Nov 4, 1pm
All your answers should be submitted in class before class begins (please show your work).
Please make sure to see both sides of this sheet.
1. (a) [15 points] Give the lower-triangular and upper-triangular
Math 151A: Homework 5
Fall 2015
Due: Nov 23, 1pm
All your answers except computer programs should be submitted in class before class begins
(please show your work). Computer programs as well as numerical results or plots generated by
your programs should
Jeffrey Wong
Math 151A
Review Problems
Winter 2016
Problem 1: Suppose A, B are positive definite. Show that
a) A T is positive definite
b) A + B is positive definite
c) A2 is positive definite
d) A B is not always positive definite
Solution: Let A, B be p
Jeffrey Wong
Math 151A
Homework 9 Solutions
Winter 2016
Problem 1: Let x0 = a, x1 = ( a + b)/2, x2 = b and h = (b a)/2. The degree two
Lagrange polynomial trhough x0 , x1 , x2 is
P2 ( x ) = f 0
( x a)( x b)
( x a)( x x1 )
( x x1 )( x b)
+ f1
+ f2
.
( a x1
Jeffrey Wong
Math 151A
Homework 8 Solutions
Winterc 2016
Problem 1: Observe that the formula is centered at x0 . We can exploit symmetry here to
skip half the terms in the Taylor expansions. We want to obtain a formula
f 000 ( x0 ) =
1
( a f ( x0 + 2h) +
Jeffrey Wong
Math 151A
Homework 6 Solutions
Winter 2016
Problem 1: Let x0 , , xn be a set of n + 1 points and i0 , in be a rearrangement of 0, 1, , n.
Let Pn be the Lagrange polynomial of degree at most n through the points x0 , xn and let Pen be
the Lagr
Applied Numerical Methods
(MATH 151A, Winter 2017)
Assignment 1
Note:
Due day: Discussion section, 19th January (Thursday). Assignments handed after the
due date will not be counted.
1. Consider the following non-linear equation:
f (x) := x2 + x 1 = 0
on
Applied Numerical Methods
(MATH 151A, Winter 2017)
Assignment 4
Note:
Due day: Discussion section, 9th February (Thursday). Assignments handed after the
due date will not be counted.
1. (a) Use the Lagrange interpolation method to find a polynomial f suc
Applied Numerical Methods
(MATH 151A, Winter 2017)
Assignment 2
Note:
Due day: Discussion section, 26th January (Thursday). Assignments handed after the
due date will not be counted.
1. Given the following sequence cfw_pn
n=0 :
(
pn+1 =
p2n +1
2pn +1
p0
Applied Numerical Methods
(MATH 151A, Winter 2017)
Assignment 7
Note:
Due day: Discussion section, 2nd March (Thursday). Assignments handed after the due
date will not be counted.
1. A function f has the values shown as below:
x
f (x)
0
1
1
2
2
1
3
2
4
1
Math 151A: Homework 3
Fall 2015
Due: Oct 28, 1pm
All your answers should be submitted in class before class begins (please show your work).
p
1. [15 points] Show that kxk2 kxk1 nkxk2 for any vector x 2 Rn .
2. A floating point system F includes many integ
Lecture 6: Fixed-point Iteration and Newtons Method
1
Fixed-point iteration
Find fixed point of g(x), i.e., g(p) = p.
(1) Choose an initial guess p0 .
(2) Generate cfw_pn = g(pn1 )
n=1 . If pn p as n and g(x) is continuous, then
p = lim pn = lim g(pn1 ) =
Math 151A: Homework 6
Fall 2015
Due: Dec 2, 1pm
All your answers should be submitted in class before class begins (please show your work).
Please make sure to see both sides of this sheet.
R1
1. [30 points] Compute the approximate value of the integral 0
Lecture 2: Machine Numbers and Errors
1
Binary Machine Numbers
The standard IEEE 754-2008 defines the set of all machine numbers commonly used by computers,
F (2, 53, 1022, 1024). It uses 64-bit (binary digit) representation (also called double precision)
Lecture 3: Algorithms and Convergence
1
Ways to Reduce Roundoff Errors
I. Avoid subtraction of 2 nearly equal numbers. Reason: it causes cancelation of significant
digits. Given 2 nearly equal numbers x > y of k-digit representation:
f l(x) = 0.d1 d2 . .
Math 151A
Winter 2016
Homework 3
Due: Friday, Jan 22, 2016.
Reading: Sections 2.2, 2.3.
1. Use Fixed-point Theorem to show that if A > 0, then the sequence defined by
xn =
converges to
A whenever x0 >
1
2A
xn1 +
,
3
3xn1
for n 1,
2A.
2. Let g(x) = + 0.5 s
Lecture 4: Bisection Method
1
Convergence Rate (cont.)
Definition 1. Let lim F (h) = L, lim G(h) = 0. If there exists K > 0 such that
h0
h0
|F (h) L| K|G(h)|
for sufficiently small h, then we write F (h) = L + O(G(h).
Remark: G(h) is usually chosen as hp
Lecture 5: Fixed-point Iteration
1
Bisection Method (cont.)
Theorem 1. Suppose that f C[a, b] and f (a)f (b) < 0. Then the sequence cfw_pn
n=1 generated by
the Bisection method approximates a zero p of f (x) with
|pn p|
ba
,
2n
n 1.
Moreover, pn = p + O
Math 151A
Winter 2016
Homework 4
Due: Friday, Jan 29, 2016.
Reading: Sections 2.4 & 2.5.
Theoretical problems
1. Let f C 2 [a, b]. If p (a, b) such that f (p) = 0 and f 0 (p) 6= 0. Show that Newtons method satisfies
|p pn+1 |
n
M
|p pn |2 ,
2|f 0 (pn )|
Lecture 1: Course Overview and Machine Numbers
1
Introduction
In this course, we will learn
1. How to represent numbers and do arithmetic on a computer? Concepts of error, and how to
track and control it? (Chap 1)
2. Algorithms to solve one-dimensional no
Lecture 8: Convergence Order and Multiple Roots
1
Convergence Order (Cond.)
Theorem 1. Let g(x) C[a, b] such that g(x) [a, b] for any x [a, b]. Suppose that g C 1 (a, b)
and 0 < k < 1 exists with |g 0 (x)| k for any x (a, b). If g 0 (p) 6= 0, then for any
Math 151A
Winter 2016
Homework 2
Due: Friday, Jan 15, 2016.
Reading: Sections 1.3, 2.1.
Theoretical problems:
1. Suppose that 0 < q < p and that n = + O(np ). Show that n = + O(nq ).
2. Let f (x) = (x 1)10 , p = 1 and pn = 1 + 1/n. Show that |f (pn )| <
Lecture 7: Convergence Order
Example 1. Let f (x) = x2 3. Use Newtons Method to find a root of f within accuracy 108 .
Solution. By Newtons method, we generate a sequence defined by
pn = pn1
p2n1 3
.
2pn1
Let p0 = 1.5. By direct computation, we get p3 =
M151A - Applied Numerical Analysis
SPRING 2015
MATH 151A - Exercise 1
This homework is due Tuesday, April 7.
Exercise 1 Reading: Section 1.2, and Matlab tutorial (www.math.ucla.edu/anderson/MDocs/index.html).
Exercise 2 A machine number with k digits of p
Math 151A: Homework 2
Fall 2015
Due: Oct 14, 1pm
All your answers except computer programs should be submitted in class before class begins
(please show your work). Computer programs as well as numerical results or plots generated by
your programs should
Applied Numerical Methods
(MATH 151A, Winter 2017)
Assignment 6
Note:
Due day: Discussion section, 23rd February (Thursday). Assignments handed after the
due date will not be counted.
1. (a) Let (i, j) cfw_0, 1, , n2 be two distinct integers. Express P0,