AMATH 352 HW2

# AMATH 352 HW2 - discretization. The approximation is...

This preview shows pages 1–3. Sign up to view the full content.

AMATH 352 HW2 1) Actual: Matlab : >> quad(@(x) cos(x), 0, 6.283, 1e-4) ans = -1.7612e-004 a) Absolute Error: Relative Error: 1 correct digit. Based on the relative error though, it’s estimated at approx. 2 correct digits. b) Matlab: >> x = linspace(0, 6.283, 1000); >> f = @(x) cos(x) f = @(x) cos(x) >> plot(x, f(x)) I would suspect the trouble in computing this accurately would be due to

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: discretization. The approximation is computed through a finite set of values, but that isn’t equal to the integral. 2) a) b) c) d) 3) a) , , , , b) c) Absolute error = 1.712 x 10^-4 Relative error = 4.483 x 10^-4...
View Full Document

## This note was uploaded on 04/14/2008 for the course AMATH 352 taught by Professor Leveque during the Winter '07 term at University of Washington.

### Page1 / 3

AMATH 352 HW2 - discretization. The approximation is...

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

View Full Document
Ask a homework question - tutors are online