Download Math 344 Exercise Set 4 May 21, 2012 Error Analysis

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Fundamental theorem of algebra wikipedia , lookup

Transcript
Math 344
May 21, 2012
Exercise Set 4
Error Analysis, Classical Fourier Series
1. Show that the family 1, cos πx, cos 2πx, cos 3πx, . . . , cos nπx, . . . is orthogonal in P S[0, 1].
0 , x < 1/2
and obtain its
1 , x > 1/2
P
hf (x), cos kπxi
.
nth least squares approximation hn (x) = nk=0 ak cos kπx, where ak =
hcos kπx, cos kπxi
a) Plot the graph of the piecewise smooth function f (x) =
b) Plot f and the approximations h4 , h8 , h12 . Compute the squared error and RSE when
h4 is used to approximate f . Use Equation (1) in the Error Analysis notes to compute
the squared error.
2. (Amplitude/Phase Angle Form of a Sinusoid) As an aid in the process of writing a sinusoid
a cos(ωx) + b sin(ωx) in amplitude/phase angle form plot the point (a, b) and connect it to
the origin with a straight line. Once this is done, A is the length of this line and δ is its polar
angle. That is, δ is the angle from the positive x-axis to the line that you drew. Measure δ so
that it satisfies −π < δ ≤ π. Do this to convert the following sinusoids to amplitude/phase
angle form. In each case use 3 digit accuracy for the phase angle if an exact value is not easily
available (radians).
(a) 3 cos(2x) − 4 sin(2x)
(c) 3 cos(4x) − 3 sin(4x)
(e) sin(x) + 2 cos(x)
(b) −3 cos(x) + 2 sin(x)
(d) −4 sin(πx)
(f) sin(x) + cos(x)
3. Obtain the Fourier series expansions for the following functions. In each case plot the function
first. Then find the formulas for the coefficients and do the following.
i. Write the series in summation notation.
ii. Write out the sum of the constant term and the first three non-zero harmonics.
iii. Plot the function and S3 (x).
a) f (x) = 1, 0 < x < 1, f (x) = 0 otherwise. f in P S[−1, 1].
b) f (x) = 1, 0 < x < 1, f (x) = 0 otherwise. f in P S[−2, 2].
c) f (x) = x2 , 0 < x < 1, f (x) = 0 otherwise. f in P S[−1, 1].
d) f (x) = 1, −1 < x < 0, f (x) = 1 − x otherwise. f in P S[−1, 1].
4. Analyze the error associated with the approximation in Example 3 in the Classical Fourier
Series handout and in Exercise 3 above, parts a and d. In each case do the following.
i. Obtain a simplified formula for the nth mean square error, MSE.
ii. Calculate MSE and the relative root square error associated with S3 and S20 .
iii. Determine the first value of n for which the relative root square error associated
with Sn (x) is less than 10%.
5. (Even and Odd Functions)
a) Circle T for true and F for false.
i.
ii.
iii.
iv.
v.
vi.
vii.
The
The
The
The
The
The
The
sum of two even functions is even.
sum of two odd functions is odd.
sum of an even and an odd function is even.
composition of two odd functions is odd.
composition of two even functions is even.
composition f ◦g of f even, g odd, is even.
composition g◦f of f even, g odd, is odd.
T
T
T
T
T
T
T
F
F
F
F
F
F
F
b) Let f (x) = x − x2 .
i. Prove that f is neither odd nor even by finding a number a > 0 such that f (−a) 6=
f (a) and f (−a) 6= −f (a).
ii. Let g be the odd function whose values on (0, ∞) are g(x) = x − x2 . Write the
formula for g(x) when x ≤ 0.
iii. Let h be the even function whose values on (0, ∞) are h(x) = x − x2 . Write the
formula for h(x) when x ≤ 0.
iv. After you have decided on suitable formulas for g and h, sketch them on [−1, 1] to
verify that g is odd and h is even.
6. For the Fourier series expansion in Example 4 of the Classical Fourier Series handout, find
the smallest value of n for which Sn (t) has a relative RSE of less than 10%.
7. Obtain a simplified formula for the mean square error when Sn (t) is used to approximate the
periodic function defined in Example 5 of the Classical Fourier Series handout.
a) Use the formula for MSE to determine the smallest value of n for which the relative RSE
is less than 5%.
b) Sketch the one-sided amplitude spectrum and the one-sided power spectrum for the
function in Example 5.
8. Obtain the Fourier series representation for each of the following periodic functions. Begin
by sketching the graph of the function over the interval [−P, P ] where P is the period. Check
for symmetry before calculating the coefficient formulas. Then do the following.
i. Write the series in summation notation.
ii. Write out the sum of the constant term and the first three non-zero harmonics.
iii. Obtain formulas for the amplitude and phase angle of the k th harmonic. Evaluate to 3 digit accuracy for k = 3.
iv. Plot the function and S3 (t) over the interval [−P, 2P ].
a) f (t) = 2, 0 < t < 1; f (t) = 0, 1 < t < 2; P = 2.
b) f (t) = 1, −1 < t < 1; f (t) = 0, 1 < t < 2; P = 3.
c) f (t) = −t2 , −2 < t < 0; f (t) = t2 , 0 < t < 2; P = 4.
d) f (t) = 0, −1 < t < 0; f (t) = 1, 0 < t < 1; f (t) = 2, 1 < t < 2; P = 3.
9. Obtain simplified formulas for the mean square error associated with the nth order Fourier
series approximation for the periodic functions in parts a and c of Exercise 8. Determine the
smallest value of n such that the relative root square error is less than 10% in each case.
10. Sketch the one-sided amplitude spectrum and the one-sided power spectrum for the periodic
function defined in Exercise 8 part c.
a) Based upon the appearance of the amplitude spectrum estimate how many terms in the
Fourier series must be added to obtain a “good” approximation.
b) Based upon the appearance of the power spectrum estimate how many terms in the
Fourier series must be added to obtain a “good” approximation to the output when the
periodic function is used to drive a linear system.
Hint. When most of the input power is accounted for, the remaining terms have very
little effect upon the output.