Pages

10/19/2010

How to do a Fourier Series in Excel

Now, I'm not actually going to go into the whole detail here, so anyone who is coming here from a Google search, sorry, but this is what one of the cells from our spreadsheet looks like:
=(2/(1*3.14159)*($DY$3-$A$3)*EXP(-1*Sheet1!$E$37*(1*3.14159/34.75)^2*$C3)*SIN(1*3.14159*Sheet2!D$2/34.75))+(($DY$3-$A$3)/34.75*D$2+$A$3)+(2/(2*3.14159)*($DY$3-$A$3)*EXP(-1*Sheet1!$E$37*(2*3.14159/34.75)^2*$C3)*SIN(2*3.14159*Sheet2!D$2/34.75))+(2/(3*3.14159)*($DY$3-$A$3)*EXP(-1*Sheet1!$E$37*(3*3.14159/34.75)^2*$C3)*SIN(3*3.14159*Sheet2!D$2/34.75))+(2/(4*3.14159)*($DY$3-$A$3)*EXP(-1*Sheet1!$E$37*(4*3.14159/34.75)^2*$C3)*SIN(4*3.14159*Sheet2!D$2/34.75))+(2/(5*3.14159)*($DY$3-$A$3)*EXP(-1*Sheet1!$E$37*(5*3.14159/34.75)^2*$C3)*SIN(5*3.14159*Sheet2!D$2/34.75))+(2/(6*3.14159)*($DY$3-$A$3)*EXP(-1*Sheet1!$E$37*(6*3.14159/34.75)^2*$C3)*SIN(6*3.14159*Sheet2!D$2/34.75))+(2/(7*3.14159)*($DY$3-$A$3)*EXP(-1*Sheet1!$E$37*(7*3.14159/34.75)^2*$C3)*SIN(7*3.14159*Sheet2!D$2/34.75))+(2/(8*3.14159)*($DY$3-$A$3)*EXP(-1*Sheet1!$E$37*(8*3.14159/34.75)^2*$C3)*SIN(8*3.14159*Sheet2!D$2/34.75))+(2/(9*3.14159)*($DY$3-$A$3)*EXP(-1*Sheet1!$E$37*(9*3.14159/34.75)^2*$C3)*SIN(9*3.14159*Sheet2!D$2/34.75))+(2/(10*3.14159)*($DY$3-$A$3)*EXP(-1*Sheet1!$E$37*(10*3.14159/34.75)^2*$C3)*SIN(10*3.14159*Sheet2!D$2/34.75))
Basically you just have to go out to a (ridiculously) large number of n's by hand.  Our teacher said it couldn't be done! shouldn't be done! and that you could do it very easily in Mathcad, but we weren't deterred!  Boldly stepping into unknown territory, we made a very large and complicated spreadsheet!

You might be an engineer if...
...you have no life and can prove it mathematically.
...you enjoy pain.
...you know vector calculus but you can't remember how to do long division...

4 comments:

Steve said...

Are you high?!

bluesun said...

No sir! I'm an ENGINEER!

Steve said...

Ha!

I'm sure we did Fourier by hand in one of my calc classes. And Taylor and McLaren expansions. Even got pretty good at LaPlace transforms. And no, we didn't use tables, we did them by hand with a few handy rules.

bluesun said...

This was a case of "Well, we know that we could do it in MathCad--but do you think we could figure out how to do it in Excel?" Kinda just for kicks and giggles.