hw1 - is an equation of the form u ( x ) = f ( x ) + Z b a...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework 1 – Math 104B, Winter 2011 Due on Thursday, January 13th, 2011 Section 6.1: 6. Section 6.2: 1a. Section 6.3: 8a, 8e, 8f. Additional problem 1: Implement the algorithm for Gaussian Elimination with Backward Substitution seen in class. Write a subroutine that takes as input the matrix A , and the right hand side b , and returns the solution vector x , and the modified upper triangular matrix, with the multipliers in the lower triangular part. In order to test your program, consider the n × n matrix with entries A i,j = ± 1 if i = j 1 ( i + j ) 2 otherwise For n = 10 and n = 100, pick the right hand side b so that the solution to A x = b is the vector x = (1 , 2 , . . . , n ) (do this in your program, before calling your subroutine). Then solve the system of equations and compute the relative error in the solution. In order to do this, define the absolute error as: || x - y || = max {| x 1 - y 1 | , | x 2 - y 2 | , . . . , | x n - y n |} Notes: Do not print the solution or the matrix. You must compute the relative error, and print it clearly, for full credit. Additional problem 2: A Fredholm integral equation of the second kind
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: is an equation of the form u ( x ) = f ( x ) + Z b a K ( x, t ) u ( t ) dt, where a and b and the functions f and K are given. To approximate the function u on the interval [ a, b ], a partition a = x < x 1 < . . . < x m = b is selected and the equations u ( x i ) = f ( x i ) + Z b a K ( x i , t ) u ( t ) dt, i = 0 , 1 , . . . , m are solved for u ( x ) , u ( x 1 ) , . . . , u ( x m ). For this problem, consider a = 0, b = 1, f ( x ) = 3 x 2 + 4-2 e x-e 1-x , and K ( x, t ) = e | x-t | . 1 2 1. Show that u ( x ) = x 2 is the solution to the integral equation. 2. Set up and solve the linear system that results when the Compos-ite Trapezoidal rule is used with m = 10 , 20 , 40 , 80 , 160 to obtain a vector ( g , . . . , g m ). For each value of m , compute the error e m = max ≤ i ≤ m | u ( x i )-g i | . Do a loglog plot of the error as a function of h = 1 n , and determine the order of convergence of the overall method....
View Full Document

This note was uploaded on 12/27/2011 for the course MATH 104b taught by Professor Ceniceros,h during the Fall '08 term at UCSB.

Page1 / 2

hw1 - is an equation of the form u ( x ) = f ( x ) + Z b a...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online