This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: C HEMICAL E NGINEERING 132A Professor Todd Squires Spring Quarter, 2006 Computer Lab Assignment 4 Laplace Transforms E XERCISES New Commands: := Sum[a[n],{n,0,10} Today we’re going to explore Fourier Series. This will involve learning several new Mathematica commands, but it will also involve some ‘exploratory’ work with Fourier Series. The idea is to give you a sense for how well they work, what the things look like, and so on. It is easy to lose sight of what is happening when you write something like ∞ summationdisplay n =1 ( 1) n +1 ( πn ) 2 cos( nπx ) . (1) So we are going to use Mathematica to evaluate Fourier coefficients for us. Recall that the Fourier Series coefficients a n and b n are given by a n = 1 L integraldisplay L L f ( x ) cos nπx L dx (2) b n = 1 L integraldisplay L L f ( x ) sin nπx L dx (3) So let’s evaluate these integrals. The trick is that we want to do it for arbitrary n . Sometimes Mathematica can do this, and sometimes it can not; often it will leave things in terms of sin nπ because it does not know that n is an integer. Say we want to find the Fourier Series of x , defined between L and L . Here is what you do: L = 1 a[n_] = (1/L)Integrate[x Cos[n Pi x/L], {x, L, L}] b[n_] = (1/L)Integrate[x Sin[n Pi x/L], {x, L, L}]...
View
Full
Document
This note was uploaded on 12/29/2011 for the course CHE 132a taught by Professor Gordon,m during the Fall '08 term at UCSB.
 Fall '08
 Gordon,M
 Chemical Engineering

Click to edit the document details