EigenMathScript01
From Physiki
Main Page | > | Mathematical and Computer Sciences Course Wikis |
Script for f(x) = x, x \in (-\pi, \pi), where f is 2\pi - periodic
a=0
a(n)=0
b(n) = (2 (-1)^(n+1))/n
N=10
f(x) = a+ sum(n,1,N, a(n) * cos(n*x)+b(n)*sin(n*x))
draw(f)