dt=.;ω=.;
Integrate[(1/π)(1/dt)Cos[ω t],{t,-dt/2,dt/2}]

Interaktivní zobrazení frekvenčního spektra pro obdélníkový puls

Manipulate[
Plot[{((2 Sin[((dt ω)/2)])/(dt π ω))},
{ω,0,50},PlotRange->{-1/4,1/2},PlotStyle->Black,AxesLabel->{"ω","B(ω)"}]
,Item[Style["4.12 Fourierova analýza",Bold,14],Alignment->Center]
,Delimiter
,Item["B(ω) = (2/π) (∫_0^∞) f(t) cos ωt \[DifferentialD]t = \!\(\*FractionBox[\(\(\\ \)\(2  sin \((\*FractionBox[\(ω\), \(2\)] Δt)\)\)\), \(π\\ Δt\\ ω\)]\),",Alignment->Center]
,Delimiter
,Item["kde f(t) = (1/(Δt)) pro -((Δt)/2) ≤ t ≤ ((Δt)/2), jinak 0"]
,Delimiter
,{{dt,0.4,"Δt"},0.1,2}
,ControlPlacement->Left
]

Export

p=Plot[{((2 Sin[((dt ω)/2)])/(dt π ω))}/.{dt->0.6},
{ω,0,50},PlotRange->{-0.2,0.4},PlotStyle->Black,AxesLabel->{"ω","B(ω)"},LabelStyle->Medium,ImageSize->400]

Export["4.12.png",p]