Project IV Fourier Series

Similar documents
ES205 Analysis and Design of Engineering Systems: Lab 1: An Introductory Tutorial: Getting Started with SIMULINK

Name Student ID # Instructor Lab Period Date Due. Lab 5 Continuity

Math 3150 HW 3 Solutions

University of Toronto MAT137Y1 Calculus! Test 2 1 December 2017 Time: 110 minutes

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

Defense Acquisition University

Lab 15 Taylor Polynomials

2: SIMPLE HARMONIC MOTION

An introduction to plotting data

Motion II. Goals and Introduction

Unit 4 Day 4 & 5. Piecewise Functions

Created: 2/3/96 Modified: September 29, Author: Theresa Julia Zielinski Page 1

2: SIMPLE HARMONIC MOTION

Physics 212E Spring 2004 Classical and Modern Physics. Computer Exercise #2

Calculus II (Fall 2015) Practice Problems for Exam 1

Higher Order ODE's (3A) Young Won Lim 7/8/14

Section 5.8. Taylor Series

OCEAN/ESS 410 Lab 4. Earthquake location

Computer Problems for Fourier Series and Transforms

Electric Fields and Equipotentials

Arnie Pizer Rochester Problem Library Fall 2005 WeBWorK assignment LimitsRates0Theory due 01/01/2006 at 02:00am EST.

Instructor Notes for Chapters 3 & 4

Math 308 Week 8 Solutions

3.1 Day 1: The Derivative of a Function

5 Transcendental Functions

Week #1 The Exponential and Logarithm Functions Section 1.2

Differentiation 1. The METRIC Project, Imperial College. Imperial College of Science Technology and Medicine, 1996.

Fourier Series and the Discrete Fourier Expansion

7.1 Indefinite Integrals Calculus

LAB 2 - ONE DIMENSIONAL MOTION

(c) Find the equation of the degree 3 polynomial that has the same y-value, slope, curvature, and third derivative as ln(x + 1) at x = 0.

Radnor High School Course Syllabus Advanced Placement Calculus BC 0460

MATH The Derivative as a Function - Section 3.2. The derivative of f is the function. f x h f x. f x lim

Finite Element Modules for Enhancing Undergraduate Transport Courses: Application to Fuel Cell Fundamentals

Weighted SS(E) = w 2 1( y 1 y1) y n. w n. Wy W y 2 = Wy WAx 2. WAx = Wy. (WA) T WAx = (WA) T b

Graphical Analysis and Errors MBL

f(r) = (r 1/2 r 1/2 ) 3 u = (ln t) ln t ln u = (ln t)(ln (ln t)) t(ln t) g (t) = t

Representations of Motion in One Dimension: Speeding up and slowing down with constant acceleration

Logarithms Dr. Laura J. Pyzdrowski

General CORDIC Description (1A)

l Hǒpital s Rule and Limits of Riemann Sums (Textbook Supplement)

Taylor series. Chapter Introduction From geometric series to Taylor polynomials

Chapter 1, Section 1.2, Example 9 (page 13) and Exercise 29 (page 15). Use the Uniqueness Tool. Select the option ẋ = x

Derivatives and Continuity

Calculus (Math 1A) Lecture 4

REVIEW FOR TEST I OF CALCULUS I:

10.12 INTRODUCTION TO FOURIER SERIES

Calculus (Math 1A) Lecture 4

8.5 Taylor Polynomials and Taylor Series

Expected Value (10D) Young Won Lim 6/12/17

ODE Background: Differential (1A) Young Won Lim 12/29/15

Physics 250 Green s functions for ordinary differential equations

Higher Order ODE's, (3A)

Due: Mon Feb :00 AM MST Question Instructions

Calculus. Weijiu Liu. Department of Mathematics University of Central Arkansas 201 Donaghey Avenue, Conway, AR 72035, USA

Section 2: Limits and Continuity

DSP First. Laboratory Exercise #10. The z, n, and ˆω Domains

Continuity. MATH 161 Calculus I. J. Robert Buchanan. Fall Department of Mathematics

Please do not start working until instructed to do so. You have 50 minutes. You must show your work to receive full credit. Calculators are OK.

Fourier Series User Guide

4.4 Graphs of Logarithmic Functions

Lab 1 Uniform Motion - Graphing and Analyzing Motion

Name Student ID # Instructor Lab Period Date Due. Lab 1 Polynomials

Physics 1050 Experiment 1. Introduction to Measurement and Uncertainty

Secondary Math 3 Honors Unit 10: Functions Name:

Alg2H Ch6: Investigating Exponential and Logarithmic Functions WK#14 Date:

Time-Frequency Analysis

Complex Trigonometric and Hyperbolic Functions (7A)

Assignment #0 Using Stellarium

AP Calculus AB Summer Assignment

EXPERIMENT 7: ANGULAR KINEMATICS AND TORQUE (V_3)

Introduction. Pre-Lab Questions: Physics 1CL PERIODIC MOTION - PART II Fall 2009

WISE Regression/Correlation Interactive Lab. Introduction to the WISE Correlation/Regression Applet

Students should read Sections of Rogawski's Calculus [1] for a detailed discussion of the material presented in this section.

We saw in Section 5.1 that a limit of the form. arises when we compute an area.

CALCULUS AB SUMMER ASSIGNMENT

Math 5a Reading Assignments for Sections

Lecture 5 - Logarithms, Slope of a Function, Derivatives

Lab: Newton s Second Law

Differentiation 2. The METRIC Project, Imperial College. Imperial College of Science Technology and Medicine, 1996.

The Revolution of the Moons of Jupiter Student Manual

Fourier Analysis Overview (0A)

Math 1102: Calculus I (Math/Sci majors) MWF 3pm, Fulton Hall 230 Homework 4 Solutions

11.5. The Chain Rule. Introduction. Prerequisites. Learning Outcomes

Introduction. Pre-Lab Questions: Physics 1CL PERIODIC MOTION - PART II Spring 2009

Logarithmic, Exponential, and Other Transcendental Functions

Calculus Honors and Introduction to Calculus

EPUB / SOLVING EQUATIONS WITH VARIABLES ON BOTH SIDES WORKSHEET DOCUMENT

Experiment 3. d s = 3-2 t ANALYSIS OF ONE DIMENSIONAL MOTION

Star Cluster Photometry and the H-R Diagram

Investigating Weather and Climate with Google Earth Teacher Guide

1.4 Techniques of Integration

Introduction to Statics

AP Calculus AB Summer Assignment. Due Date: First day of school.

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

AP Calculus AB Summer Assignment

(THIS IS AN OPTIONAL BUT WORTHWHILE EXERCISE)

a n cos 2πnt L n=1 {1/2, cos2π/l, cos 4π/L, cos6π/l,...,sin 2π/L, sin 4π/L, sin 6π/L,...,} (2)

Horizontal asymptotes

Assignment 1 Physics/ECE 176

Transcription:

Project IV Fourier Series Robert Jerrard Goal of the project To develop understanding of how many terms of a Fourier series are required in order to well-approximate the original function, and of the differences between the Fourier series of functions with jumps, functions with no jumps but with corners, and functions with no jumps and no corners. Instructions Answer Questions 1 and 2 in the spaces provided, in Section 2. 1 Preliminaries Launch Iode, and get into the Fourier series module. 1. When you start the module, it plots two graphs. The upper one shows an odd 2πperiodic square wave f(x). (Notice you are shown two periods of this function, over a length 4π.) It also shows, in red, a partial sum a 0 N 2 + (a n cos nx + b n sin nx) n=1 of the Fourier series. (If your upper graph does not show the partial sum as a thin red curve, then please quit Iode and Matlab, and download and install Iode again to get the latest version.) The final terms in this partial sum are cos(nx) and sin(nx), and so Iode calls N the top harmonic. The current value of the top harmonic is displayed in the middle of the plotting window, and you can increase or decrease it by clicking on the arrow buttons; doing so repeatedly creates an animation effect. Or, you can just enter a new top harmonic number directly into the box. When you increase the value of the top harmonic, the partial sum should better approximate the function. Copyright c 2002, The Triode (iode@math.uiuc.edu). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at http://www.fsf.org/copyleft/fdl.html. 1

2. Now use the Function menu to enter a new function, perhaps f(x) = x (the Matlab code for this absolute value function is abs(x)). Try increasing and decreasing top harmonic, to see the effect on the partial sums. 3. The lower graph in the window shows the error between f and the partial sum of its Fourier series, defined just to be the difference [ N ] a 0 error (x) = f(x) 2 + (a n cos nx + b n sin nx). n=1 When we make the top harmonic N bigger, we expect the error to get smaller. Try it and see. (Note. The vertical scale on the error plot changes, when the error gets smaller, in order to keep the error visible.) 4. Now go back to the Function menu and again select Enter function. Change the function to sin(x), and enter new numbers for the left and right ends of the period interval, perhaps 1 and 4. These numbers define one period of the function, and then Iode extends the function periodically. Look at the upper graph, showing the graph of the function. Is it different from the usual sine curve? Why does the graph now have a jump? 5. Click on Plot coefficients A n and B n in the middle of the window. This plots the A n and B n Fourier coefficients versus n, for n > 0. (The n = 0 coefficient A 0 is a special case, and is not graphed.) Do you observe some patterns in the coefficients? Patterns are usually clear when top harmonic is 25, but you may want to go up to 50. By the way, Iode evaluates the Fourier coefficients approximately, by doing the integrals numerically with the trapezoidal rule (which you might have learned in calculus). 6. Finally, remember that you can always change the name of the variable x, using Relabel variables in the Function menu. Tip. For more information on the Fourier series module, browse the Iode manual online. Self assessment. If you ve read down to here, but haven t actually carried out any of the above tasks, then it s time to re-think your approach to the project... 2

2 Questions 1 Fill in the table on the next page. Column 1. All functions are assumed to be 2π periodic, with the formula in the first column defining the function for π < x < π. So when you enter these functions into Iode, take the left end of the period interval to be -pi and the right end to be pi. Column 2. If f is not continuous, then state the x-value(s) at which it jumps. Similarly in Column 3 for points at which f is continuous but the slope f is not. This can all be determined graphically. (Aside. Discontinuities of f and f frequently occur at x = π in this exercise. Why?) Column 4. To determine naked eye convergence, look at the plots of the partial sums and errors, in Iode. For this Project, we say that naked eye convergence occurs if the plot of the function and the plot of the partial sum of the Fourier series look the same to your naked eye (without any magnification, 2 feet away from the screen). Of course this is very vague, and so there is no exactly right answer. But you should try to apply a consistent standard to all the functions in the exercise. If naked eye convergence seems to happen for some value of top harmonic, then write this value in the table. Otherwise just write a dash. Note. Naked eye convergence happens if and only if the error gets small everywhere, in comparison to the size of the function. So keep an eye on your error plot too! Column 5. Relative error is defined as size of error size of function. Here size of function means the difference between the maximum and mimimum values of the function, and similarly, size of error is defined to be the difference between the maximum and minimum values of the error (as seen from the error plot). Do not try to compute the relative error very precisely; just estimate it to within about a factor of 2. Note that the minimum value of the error will be negative. A technical aside, not part of the Project. The above definition of relative error is specialized to Fourier series, and relies on the fact that the first term of the Fourier series equals the average value of the function: 1 2 A 0 = 1 2π π π f(x) dx = (average value of f). It follows that every partial sum of the Fourier series has the same average value as f, and so the absolute size of the function plays no role when trying to approximate it with the higher partial sums, and it is only the variations of f around its average that matter. Similarly, the error has average value zero, and so always takes on both positive and negative values. 3

[1, continued.] Fill in the table below, according to the directions on the previous page. (For your own records, print a plot of the partial sum of each Fourier series, showing the naked eye convergence if it occurs. But you need not hand in any graphs.) f = 2π-periodic extension of: discontinuities of f, for π < x π discontinuities of f, for π < x π Top harmonic N value for naked eye convergence? Relative error when top harmonic = 25? (x 2 π 2 ) 2 6 12 10 4 x + 1 e x sign(2 x) x 2 sin((2/π)x 2 + π/2) x 3 π 3 sin(x/2) (x π) sinh(x + π) (log(x + 6)) 2 cos( 1 2 (x 1)2 ) Reminders. In Matlab, the absolute value function is abs(), the exponential is exp(), and log (the natural logarithm) is just log(). To multiply you need a *, and π is pi. The sign function picks off the sign of x, in other words +1, if x > 0 sign (x) = 0, if x = 0. 1, if x < 0 Obviously this is not the same as the sine function sin(x)! 4

2 Answer the following questions, based on what you have observed in Question 1 above. Advice. Think hard about your observations and write a rough draft before composing the final version. Carefully written answers will receive more credit. a Compare and contrast the naked eye convergence you observed in i functions with discontinuities ii functions that are continuous but have corners (that is discontinuities in the first derivative.) iii functions that are continuous, and with the first derivative continuous as well. b Compare and contrast the relative error you observed in i functions with discontinuities ii continuous functions with corners iii functions that are continuous, with the first derivative continuous as well. c For functions with jumps, discuss more carefully the kind of convergence you observed: can the Fourier series be said to converge at all? What happens to the error away from the discontinuities? d Suppose that f is a function with both a discontinuity and a corner. What would you predict will be the relative error for f when the top harmonic = 25? Explain your answer. (If you think it is impossible to predict, explain why.) 5