sin(3x) fourier serie
- Subject: sin(3x) fourier serie
- From: jfr.maurel at gmail.com
- Date: Sat, 13 Apr 2013 16:35:54 +0200
Hi,
I don't understand why the fourier serie for sin(3x) is nul in the
following (ft2).
Could you please explain this behaviour?
reset()$
kill(all)$
ratprint:false$
f1(_x):=(3*_x)$
f2(_x):=sin(3*_x)$
load(fourie)$
T:2*%pi/3$
p:T/2$
l1:foursimp(fourier(f1(x),x,p))$
l2:foursimp(fourier(f2(x),x,p))$
k:5$
ft1:fourexpand(l1,x,p,k)$
ft2:fourexpand(l2,x,p,k)$
display(p,l1,l2,ft1,ft2)$
plot2d([f1,ft1],[x,-T,T],[legend,"f1(x)",concat("ft1(x) package fourie k
= ",k)])$
plot2d([f2,ft2],[x,-T,T],[legend,"f2(x)",concat("ft2(x) package fourie k
= ",k)])$
I obtain:
(%t7) a[0]=0
(%t8) a[n]=0
(%t9) b[n]=(6*(sin(%pi*n)/(3*n^2)-(%pi*cos(%pi*n))/(3*n)))/%pi
(%t10) a[0]=0
(%t11) a[n]=0
(%t12) b[n]=-(2*(-1)^n)/n
(%t13) a[0]=0
(%t14) a[n]=0
(%t15) b[n]=(6*(sin(%pi*n)/(6*n+6)-sin(%pi*n)/(6*n-6)))/%pi
(%t16) a[0]=0
(%t17) a[n]=0
(%t18) b[n]=0
p=%pi/3
l1=[%t10,%t11,%t12]
l2=[%t16,%t17,%t18]
ft1=(2*sin(15*x))/5-sin(12*x)/2+(2*sin(9*x))/3-sin(6*x)+2*sin(3*x)
ft2=0
For information:
build_info("5.28.0-2","2012-08-27 23:16:48","i686-pc-mingw32","GNU
Common Lisp (GCL)","GCL 2.6.8")
wxMaxima 12.04.0
Regards
--
Jean-Fran?ois MAUREL
PIMECA
http://www.pimeca.com