Computer Problems for Fourier Series and Transforms

Similar documents
In this section we extend the idea of Fourier analysis to multivariate functions: that is, functions of more than one independent variable.

Math 3150 HW 3 Solutions

Examples of the Fourier Theorem (Sect. 10.3). The Fourier Theorem: Continuous case.

Mathematic 108, Fall 2015: Solutions to assignment #7

3 rd class Mech. Eng. Dept. hamdiahmed.weebly.com Fourier Series

1.5 Inverse Trigonometric Functions

Calculus I Practice Problems 8: Answers

Math 489AB A Very Brief Intro to Fourier Series Fall 2008

Fourier series A periodic function f(x) with period T = 2π can be represented by a Fourier series: sinnx dx = sinnxsinmx dx =

CALCULUS AB SUMMER ASSIGNMENT

Mathematics for Chemists 2 Lecture 14: Fourier analysis. Fourier series, Fourier transform, DFT/FFT

Advanced Mathematics Unit 2 Limits and Continuity

Advanced Mathematics Unit 2 Limits and Continuity

Making Piecewise Functions Continuous and Differentiable by Dave Slomer

3. Use absolute value notation to write an inequality that represents the statement: x is within 3 units of 2 on the real line.

AP Calculus AB Summer Math Packet

Math 115 Spring 11 Written Homework 10 Solutions

Albertson AP Calculus AB AP CALCULUS AB SUMMER PACKET DUE DATE: The beginning of class on the last class day of the first week of school.

Math 12 Final Exam Review 1

More on Fourier Series

Calculus 221 worksheet

MATH 408N PRACTICE FINAL

5.5. The Substitution Rule

2. If the values for f(x) can be made as close as we like to L by choosing arbitrarily large. lim

2. Algebraic functions, power functions, exponential functions, trig functions

Fourier and Partial Differential Equations

Ma 221 Eigenvalues and Fourier Series

MA 201: Differentiation and Integration of Fourier Series Applications of Fourier Series Lecture - 10

Analysis of Functions

Tangent Lines Sec. 2.1, 2.7, & 2.8 (continued)

The Plane of Complex Numbers

STEP CORRESPONDENCE PROJECT. Postmortem: Assignment 32

1.4 Techniques of Integration

Power Series Solutions We use power series to solve second order differential equations

0 3 x < x < 5. By continuing in this fashion, and drawing a graph, it can be seen that T = 2.

Math 150 Midterm 1 Review Midterm 1 - Monday February 28

The highest degree term is x $, therefore the function is degree 4 (quartic) c) What are the x-intercepts?

AP Calculus AB Summer Assignment

Fourier Integral. Dr Mansoor Alshehri. King Saud University. MATH204-Differential Equations Center of Excellence in Learning and Teaching 1 / 22

Roots and Coefficients of a Quadratic Equation Summary

Calculus I Review Solutions

Chapter 17: Fourier Series

Physics 250 Green s functions for ordinary differential equations

1.2 Functions and Their Properties Name:

NAME: DATE: CLASS: AP CALCULUS AB SUMMER MATH 2018

Math 2Z03 - Tutorial # 6. Oct. 26th, 27th, 28th, 2015

natural frequency of the spring/mass system is ω = k/m, and dividing the equation through by m gives

Fourier Series. Now we need to take a theoretical excursion to build up the mathematics that makes separation of variables possible.

14 Increasing and decreasing functions

Learning Objectives for Math 165

MATH141: Calculus II Exam #4 review solutions 7/20/2017 Page 1

Math 261 Calculus I. Test 1 Study Guide. Name. Decide whether the limit exists. If it exists, find its value. 1) lim x 1. f(x) 2) lim x -1/2 f(x)

2.2 The Limit of a Function

Absolute and Local Extrema. Critical Points In the proof of Rolle s Theorem, we actually demonstrated the following

Last Update: April 7, 201 0

Partial Derivatives for Math 229. Our puropose here is to explain how one computes partial derivatives. We will not attempt

8.5 Taylor Polynomials and Taylor Series

AP Calculus AB Summer Assignment

1.10 Continuity Brian E. Veitch

Section 7.3 Double Angle Identities

AP Calculus AB Summer Assignment

[Limits at infinity examples] Example. The graph of a function y = f(x) is shown below. Compute lim f(x) and lim f(x).

Review for Final Exam, MATH , Fall 2010

Sec 2.2: Infinite Limits / Vertical Asymptotes Sec 2.6: Limits At Infinity / Horizontal Asymptotes

Sec 2.2: Infinite Limits / Vertical Asymptotes Sec 2.6: Limits At Infinity / Horizontal Asymptotes

Rational Functions. Elementary Functions. Algebra with mixed fractions. Algebra with mixed fractions

Practice Problems: Integration by Parts

Lecture 5: Function Approximation: Taylor Series

Math 251 December 14, 2005 Answer Key to Final Exam. 1 18pt 2 16pt 3 12pt 4 14pt 5 12pt 6 14pt 7 14pt 8 16pt 9 20pt 10 14pt Total 150pt

11.10a Taylor and Maclaurin Series

Calculus with Analytic Geometry I Exam 8 Take Home Part.

Calculus I Exam 1 Review Fall 2016

MATH 18.01, FALL PROBLEM SET # 6 SOLUTIONS

Objectives List. Important Students should expect test questions that require a synthesis of these objectives.

22. Periodic Functions and Fourier Series

Homework Solutions: , plus Substitutions

Graphs of Antiderivatives, Substitution Integrals

Math 5a Reading Assignments for Sections

SUMMATION TECHNIQUES

FOURIER SERIES, HAAR WAVELETS AND FAST FOURIER TRANSFORM

Systems of Linear ODEs

Partial Differential Equations Summary

Limits at Infinity. Horizontal Asymptotes. Definition (Limits at Infinity) Horizontal Asymptotes

Math 112 (Calculus I) Midterm Exam 3 KEY

Determine whether the formula determines y as a function of x. If not, explain. Is there a way to look at a graph and determine if it's a function?

Fourier Series and the Discrete Fourier Expansion

The Relation between the Integral and the Derivative Graphs. Unit #10 : Graphs of Antiderivatives, Substitution Integrals

The First Derivative and Second Derivative Test

MATH 32 FALL 2012 FINAL EXAM - PRACTICE EXAM SOLUTIONS

Ma 530 Power Series II

Taylor Series and Numerical Approximations

APPLICATIONS OF DIFFERENTIATION

+ i sin. + i sin. = 2 cos

The First Derivative and Second Derivative Test

Bonus Homework and Exam Review - Math 141, Frank Thorne Due Friday, December 9 at the start of the final exam.

5.3 Other Algebraic Functions

Time-Frequency Analysis

CH 2: Limits and Derivatives

MA1021 Calculus I B Term, Sign:

1 + lim. n n+1. f(x) = x + 1, x 1. and we check that f is increasing, instead. Using the quotient rule, we easily find that. 1 (x + 1) 1 x (x + 1) 2 =

Transcription:

Computer Problems for Fourier Series and Transforms 1. Square waves are frequently used in electronics and signal processing. An example is shown below. 1 π < x < 0 1 0 < x < π y(x) = 1 π < x < 2π... and so on (a) Write an integral for a 0, the constant term in the Fourier series expansion. You should be able to evaluate this integral by just looking at the graph. (b) The coefficients of the cosine terms lead us to a piecewise integral: Evaluate this integral. a n = 1 ( 0 cos(nx) dx + π π π 0 ) cos(nx) dx (c) Write an integral for b n. Evaluate this integral to find the coefficients of the sine terms in the Fourier series expansion. (d) Some of the coefficients you calculated in Parts (a) (c) should have come out equal to 0. Explain how you could have predicted some of those without doing any calculations, just by looking at the plot of the square wave. (e) Write the Fourier expansion for this square wave. 2. [This problem depends on Problem 1.] For the series you found in Problem 1, have a computer draw the 1 st, 5 th, 20 th, and 100 th partial sums. Sketch the results and verify that they are approaching the original square wave. What happens at the x-values for which the original function is discontinuous? 3. Plot each function g(x) given below on the same plot with the function f(x) = 13 cos(2x). For each one describe how the plot of g(x) is similar to or different from the plot of f(x). (a) g(x) = 5 cos(2x) + 12 sin(2x) (b) g(x) = 12 cos(2x) + 5 sin(2x) (c) g(x) = 10 cos(2x) + 24 sin(2x) (d) g(x) = 5 cos(4x) + 12 sin(4x) 1

4. The function f(x) equals x from x = 4 to x = 4 and is extended periodically from there, with a period of 8. (a) How can you know without doing any calculations that the Fourier series for f(x) contains only sine terms? (b) Write a sine function with period 8. (c) Write a sine function with period 4. This function will also repeat when x increases by 8. (d) What is the next largest period that a sine function can have and still repeat when x increases by 8? Write a sine function with that period. (e) Write a Fourier series for f(x) without the coefficients filled in: f(x) = b n sin(something x) where b n is not-yet-determined, but where you do fill in what that something is. (f) Find the coefficients b n and write the Fourier series for f(x). Simplify your answer as much as possible. 5. [This problem depends on Problem 4.] For the series you found in Problem 4, have a computer draw the 1 st, 5 th, 20 th, and 100 th partial sums on the domain [ 12, 12]. Sketch the results and explain why they make sense. 6. In this problem you ll find a Fourier series of the function f(x) = e x on the domain 0 x 5. (a) We define a new function g(x) that is an odd extension of f(x). In other words, in the domain 0 x 5, g(x) = e x. In the domain 5 < x 0, g(x) = e x. Beyond that g(x) repeats with period 10. Sketch a graph of g(x) from x = 30 to x = 30. (b) If you create a Fourier series to represent g(x), you know without doing any work that either the a n or the b n coefficients will be zero. Which one, and how do you know? (c) Write down integrals for the non-zero coefficients. Note that you will have to split your integrals into two parts: one going from 5 to 0, and the other from 0 to 5. (d) Explain how you can know without doing any calculations that both parts of your integral will give the same result. This means you can simply evaluate one of them and multiply the result by 2. (e) Evaluate your integrals and write the resulting Fourier series. Simplify as much as possible. 7. [This problem depends on Problem 6.] For the series you found in Problem 6, have a computer draw the 1 st, 5 th, 20 th, and 100 th partial sums on the domain [ 10, 10]. Sketch the results and explain why they make sense. For Problems 8 10, find a Fourier sine series and a Fourier cosine series for the given function on the given domain. 8. f(x) = x 2 on 0 x 2 9. f(x) = x 4 on 0 x 2 10. f(x) = sin x on 0 x π 2

For Problems 11 14 calculate the Fourier transform of f(x). Set up the integral by hand, but you may use a computer to evaluate it for you. Then sketch f(x) and ˆf(p). 11. f(x) = e 3x2 12. f(x) = 5e 3x2 13. f(x) = 1/(1 + x 2 ) 14. f(x) = (cos x)e x2 15. In this problem you ll see how a Fourier series becomes a Fourier transform in the correct limit. (a) Let f(x) = e x2 from x = 1 to 1, repeated periodically thereafter. Find the complex exponential Fourier series for f(x) and plot the coefficients as a function of frequency p (not of n), with p going from -10 to 10. (b) Repeat Part (a) for f(x) = e x2 from x = 2 to 2, repeated periodically thereafter. (c) Repeat Part (a) for f(x) = e x2 from x = 10 to 10, repeated periodically thereafter. (d) What is happening to the frequencies of the coefficients as you increase the period? What is happening to the shape of the plot? What is happening to the height of the plot? (e) Plot the Fourier transform of f(x) = e x2 as p goes from 10 to 10. How does this plot compare to the previous ones in what frequencies are included, the shape of the plot, and the height of the plot? 16. Create an animation showing the plot of the Fourier transform of f(x) = Ae (x/x0)2 as you vary A and x0 over some ranges of values. Describe the effect each of them has on the plot of ˆf(p). 17. Consider the points f(0) = 2, f(3) = 7, f(6) = 2, f(9) = 1, f(12) = 4, f(15) = 3, f(18) = 2, f(21) = 2. (a) Calculate the DFT coefficients ˆf n for 0 n 7. (b) On one plot show the real and imaginary parts of (1/8) 7 n=0 ˆf n e 2πinx/12. Show the original 8 points f r on the same plot. (c) Repeat Part (b) for 3 n 4. Hint: you can easily get all the ˆf n values you need from the ones you already calculated. (d) On one plot show the original points f r and the real and imaginary parts of (1/8)[(1/2)( ˆf 4 e 8πinx/12 + ˆf 4 e 8πinx/12 + 3 n= 3 ˆf n e 2πinx/12 ]. (e) You should have found that all three functions you just defined go through all of the original data points f r, but behave differently in between them. Looking at your plots, which of these functions is likely to be the most useful for modeling your original function, and why? 18. Have a computer generate a table of 256 points f(x) where x goes from 0 to 30. At each point let f(x) = 2 sin(2x) + 2 sin(5x) + R, where R is a random number (different at each point) from -4 to 4. Plot the data points on a graph of f(x) vs. x. Then take a discrete Fourier transform of the data and plot the results on a graph of ˆf(p) vs. p. Explain why the results appear the way they do. 3

19. Consider the function f(x) = e cos x. (a) Have a computer generate a table of 200 values of f(x) ranging from x = 0 to x = 99.5. Plot these values on a graph of f vs. x. (Just plot the values in your table, not the curve for the function.) (b) Take a discrete Fourier transform of your list of values. What frequency is associated with the n th term in that list? Plot the moduli of the values of the discrete Fourier transform from n = 1 to n = 100, with the horizontal axis showing the associated frequencies. (Leave out n = 0, which just represents the constant term.) (c) What frequency shows the highest peak in the DFT? What does that tell you about the original function? Hint: you could have predicted this peak before doing the calculations. (d) What frequency shows the second highest peak in the DFT? What does that tell you about the original function? You probably couldn t have predicted this one. 20. Consider the list f r = (1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2). (a) Plot these data points, using the x-values 1, 2, 3, 4, 5, 6,.... (b) Take a discrete Fourier transform of the list, then take an inverse discrete Fourier transform, and then plot the resulting points. This plot should look identical to the previous one. (c) Take a discrete Fourier transform of f r, set ˆf 0 = 0 in the resulting list, then take its inverse discrete Fourier transform and plot the results. How does this look different from your original plot? (d) Take a discrete Fourier transform of f r, set ˆf 2 = ˆf 2 = 0, take an inverse discrete Fourier transform, and plot the results. How does this plot look different from your original plot? Hint: some computers store the results in the order ˆf 0 ˆf N 1, so the component ˆf 2 may be stored as ˆf N 2. 21. Choose an image, import it into a computer algebra program, take a discrete Fourier transform of the image data, set the high frequency components to zero, and inverse transform it to get a new image. Describe how the new image looks similar to, and different from, the original. You may need to do some trial and error to figure out exactly which components to eliminate. Be aware that when you eliminate Fourier coefficients the inverse discrete Fourier transform will usually give you complex numbers. The easiest way to deal with this is to just take the real part after you take the IDFT. Hint: If you use a color image then each pixel will most likely be a list of three numbers instead of a single number. You can still do the same thing. Each component in Fourier space will be a list of three numbers and you can set them all equal to zero for the high frequency modes. 4

22. Consider a rectangular drumhead pulled up into four planes. (a) Assuming the drumhead extends along 0 x L and 0 y W, and the middle point is raised to height H above the plane, write the equations for the four planes. (b) To create a Fourier series for this shape, you need to create a periodic extension. Is it best to use an odd or even extension in x? In y? Explain. (c) Write the Fourier series for your periodic function and write the integrals for finding the coefficients. You do not need to evaluate those integrals for this problem. 23. [This problem depends on Problem 22.] (a) Evaluate the integrals you found in Problem 22 for the Fourier coefficients. (You could do this by hand but it would be very tedious. Whether you do it by hand or on a computer, you will need to consider the case m = n separately from the case m n.) (b) Set L = 4, W = 2, and H = 1 and plot the Fourier series, including all terms up to m = n = 20. Verify that it matches the original shape of the drumhead. For Problems 24 25, find the Fourier series of the indicated function twice, first using sines and cosines and then using complex exponentials. If it is given over a finite domain assume that it extends periodically beyond that domain. (Do not assume an even or odd extension.) 24. f(x) = sin 5 x. Hint: don t just naively accept what the computer gives you if it doesn t make sense. 25. f(x) = x 2 sin x, 0 < x < π 26. (a) Write a Fourier series that represents the function y = x 2 from x = 20 to x = 20. (b) Draw the 1 st, 5 th, 20 th, and 100 th partial sums of the resulting series on one plot, along with y = x 2. 27. Let f(x) = x 1/3 from π to π and repeat thereafter. (a) This function only satisfies the Dirichlet conditions if π f(x)dx is finite. Show that it is. (Because of π the vertical asymptote, you have to break it up into 0 π f(x)dx + π f(x)dx and show that both parts 0 are finite.) (b) Use a computer to generate the 20 th partial sum of the Fourier series for this function between x = π and x = π, and then plot that series from x = 2π to x = 2π. (c) The resulting graph should look a lot like x 1/3 between π and π. What does the graph do at x = 0 and why? What does the graph do at x = π and why? (d) What are the values of the Fourier series at x = 0 and x = π? Why do these values make sense? 5

28. The Gibbs Phenomenon If a function f(x) satisfies the Dirichlet conditions then its Fourier series converges to its value where it is continuous and converges to the average of its left and right limits at jump discontinuities. However, the convergence at such discontinuities suffers from a problem known as the Gibbs phenomenon. You ll explore this by considering the function f(x) defined as the odd extension of f(x) = 1 from x = 0 to x = 1. (a) Find the Fourier sine-cosine series of f(x). (It should only have sines.) (b) Plot the partial sum of the Fourier series including the first three nonzero terms. Your plot should go from x = 1 to x = 1 and should include horizontal lines at y = 1 and y = 1 for reference. (c) For negative x the series should be near 1 and for positive x its should be near 1, but in going from negative to positive it overshoots by a bit, going higher than 1. Looking at your plot, estimate the amount it overshoots by. (d) Show all of the partial sums up through the sixth nonzero term together on one plot. As you use more terms, you should find that the amount by which the series overshoots 1 does not decrease, but that it moves back down near 1 more quickly. (e) Plot the 50 th partial sum of the Fourier series and show that it still overshoots by the same amount. Zoom in your plot enough to estimate the value of x at which it returns back to 1 after overshooting. (f) The fact that a Fourier series overshoots a jump discontinuity by an amount that doesn t decrease as you add more terms is the Gibbs phenomenon. Explain how we can still say that the series converges to the function even though this occurs. www.felderbooks.com/mathmethods/exercises 6