CoCalc Public FilesSpectre.sagewsOpen with one click!
Author: Juan Carlos Bustamante
Views : 44
Compute Environment: Ubuntu 18.04 (Deprecated)
typeset_mode(True)

Soit $0

Solution : Pour les besoins de la cause, prenons d=1/10,T=1/2d=1/10,\, T=1/2 et A=1A=1

f0a5a2bf-89fe-478f-8fc2-4807ca167e5cs d=1/10 L=1/2 A=1 f1(x)=0 f2(x)=A f = piecewise([[(-L,-d),f1],[(-d,d),f2],[(d,L),f1]]) CF = plot(f, thickness=4,figsize=5) show(CF)
n = 40 A = [f.fourier_series_cosine_coefficient(j,L) for j in range(n)] B = [f.fourier_series_sine_coefficient(j,L) for j in range(n)] C = [1/2*sqrt(A[j]^2+B[j]^2) for j in range(n)]
Cg=plot(sin(x*pi*d/L)/(x*pi),(x,-n,n),color='red')
L=[line([(n,0),(n,C[n])]) for n in range(n)] L1=[line([(-n,0),(-n,C[n])]) for n in range(n)] show(sum(L) + sum(L1)+Cg,aspect_ratio=120, figsize=8)