Question: Please use python. b) Write a program that demonstrates the Fourier Series method as defined on the MAE 3013 equation sheet. f(x)=a0+n=1(ancosLnx+bnsinLnx)a0=2L1LLf(x)dx(11.25)b0=0an=L1LLf(x)cosLnxdxn=1,2,(11.26)bn=L1LLf(x)sinLnxdxn=1,2, You must write
Please use python.
b) Write a program that demonstrates the Fourier Series method as defined on the MAE 3013 equation sheet. f(x)=a0+n=1(ancosLnx+bnsinLnx)a0=2L1LLf(x)dx(11.25)b0=0an=L1LLf(x)cosLnxdxn=1,2,(11.26)bn=L1LLf(x)sinLnxdxn=1,2, You must write the following 2 functions: def FourierCoeffs(func, L, nterms) \# which calculates and returns the Fourier a's and b's \# the a's and b's are each numpX arrays of length nterms \# func is the name of the function. L is the half-period. \# this function must call scipxintegrateenuado def PlotFourier(func, L, nterms, xmin, xmax npoints =5000 ) \# which sends func to FgurierCoeffo to get the Fourier coefficients and then plots the Fourier Series \# copy the following codes and paste them after your definitions of the above functions. def main( ): def Sharkfin (x) : if x
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
