Post Reply 
Fourier Series
03-17-2016, 11:23 PM
Post: #1
Fourier Series
Bug/error: Prime
eg. function x (-pi <x< pi); enter as fourier_bn(x,x,2*pi,n)
Prime: fourier_bn(x,x,2*π,n)---->((-2*n*pi*cos(2*n*pi)+sin(2*n*pi))/(n^2*pi)) WRONG
   


Correct Answer Should Be:
((-2*n*pi*cos(n*pi)+sin(n*pi))/(n^2*pi)) which is true for code written by Salvomic
   
Find all posts by this user
Quote this message in a reply
03-18-2016, 01:24 AM
Post: #2
RE: Fourier Series
PocketCASpro on my iPad gives the same answer as the Prime.

— Dirk Hartland
Find all posts by this user
Quote this message in a reply
03-18-2016, 07:42 AM
Post: #3
RE: Fourier Series
You must add an additional parameter a if the function is defined on [a,a+T] instead of [0,T] where T is the period. You should also do assume(n,integer) before calling fourier_bn.
Find all posts by this user
Quote this message in a reply
03-18-2016, 09:55 AM
Post: #4
RE: Fourier Series
   
Prime doesn't, well i think the source code must be revisited and the Help info improve:
eg; if one wants the value for a0 prime outputting a0/2.
Prime DO NOT:
   


Salvomic DOES IT;
   
Find all posts by this user
Quote this message in a reply
03-18-2016, 11:24 AM
Post: #5
RE: Fourier Series
I don't think you understand my answer, compare
Code:
assume(n,integer); fourier_bn(x,x,2*π,n,-pi)
and
Code:
assume(n,integer); fourier_bn(x,x,2*π,n)
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: