# Example. f(x) = exp(-x)*u(x) # Display the signal graph, the magnitude graph, # and the phase graph. # Fourier transforms need the integral of |f(x)| to be finite. # Justify this detail below. u:=x->piecewise(x<0,0,1);f:=unapply(exp(-x)*u(x),x);cv:=1/sqrt(2*Pi): int(abs(f(x)),x=-infinity..infinity); # Need a finite integral. F:=unapply(inttrans[fourier](cv*f(x),x,w),w); Mag:=unapply(abs(F(w)),w); Phase:=unapply(arctan(Im(F(w))/Re(F(w))),w); optx:=-3..3,scaling=unconstrained,thickness=3: optw:=-10..10,-2..2,scaling=unconstrained,thickness=2,color=blue: plot(f,optx);plot(Mag,optw);plot(Phase,optw);