Skip to main content

Posts

Showing posts from April, 2014

Fourier Series Grapher

Here's a simple JavaScript + HTML program I wrote. It will graph a given number of terms of a Fourier series. To graph a Fourier series, type the appropriate expressions into the text fields and click "Update." The text fields support JavaScript, so you can write a whole function in there if you need to. I also added some functions. even(x)  - returns true if x is even, false otherwise. odd(x)  - returns true if x is odd, false otherwise. power(x, a)  - returns x a . Some examples of input to try: odd(k)?(2/k):0 even(k)?(4/k/PI):0 odd(k)?(4/(k+PI)/k):0 The default Fourier series is equal to sin(2.5x) on (-π, π). Enjoy! To receive updates, subscribe now!