Example ofl(x) for of - York University 9. Expand .f(x) : Ax2 + Bx + C (0 < x < 2tr) in Fourier...

Post on 24-Mar-2018

224 views 1 download

Transcript of Example ofl(x) for of - York University 9. Expand .f(x) : Ax2 + Bx + C (0 < x < 2tr) in Fourier...

Example 9. Expand .f(x) : Ax2 + Bx + C (0 < x < 2tr) in Fourierseries. Figure 22 shows the periodic extension ofl(x) for a certain choice ofthe constants A, B, and C. Using the expansions of the functions x2 and x(0 < x < 2rc), given in Examples 6 and7, we find that

Ax2 + Bx + c :o*' * B* * c+ 4r I cosjn'r3 '"" - "'k, nz

for0< x<2x.

6a

- ArA - 2,8) t gnuI,.Lr.n

n= I

Example 6. Expand f(x):1-(0' * 1^) in Fourier- se.r.ies' This

example bears a ,up",n"ili'isemblance to Example 4' but the diference is

immediately apparent ii *. -"oirtr"ct

the periodic extension of /(x) (see

Fig. l9). The criterior "i il l0 is applicable to this extended function'

At the points of aiscontiriuitf iit" f9.urf series converges to the arithmetic

mean of the right-hand "JiJfi-t'*O limits' i'e'' to the value t' The function

/(x) is neither even nor odd'

Ftcune 19

Since

I r2too:;lo :h,x dx :* trt]::l

- *t: sinzxdr = 0 (n - 1,2,...),lNN JO

o, ::f" *cosn* d,I r=2n: a Ix sin zxlfin' 'r=o

I ?2nb,:;Jo xsinnxdx

= - *t, *' *il" + *f" "o, ,* d* = - 1,

we have

tr : r - z (sinx * Y * %1I +...),for0< x<2tt.

Example 7. Expand l@) - 12 (0 < x < 2n) in Fowier series. Thisexample resembles Example l, but the graph of the periodic extension of/(.r)immediately shows the difference (see Fig. 20). The criterion or sec. io is

(r3.s)

Frounr 20

applicable, and at the points of discontinuity the series converges to thearithmetic mean of the right-hand and left-hand limits, i.e., to the valte 2tc2.The function/(x) is neither even nor odd.

Since

lfzr ^. lf13'lx=2r 8*2ao : iJo xzctx : i [-il,=o : T,

I f}n ) r2ta- : I I'-x2cosnxdx : -' I xsinnxdx

tc Jo lcn Jo

2 x=2n 1 rzn 4: -lxcoszxl - -:-^ | cosnxdx: a,NnL . 'r=0 1ln JO n.

112b,: ! [' xzsinnxdx

: - I [x2 cos n*l'='n + Z {'" x cos nx dx*n' 'r=o fin Jo

- -4n -Ll'"sinnxdx: -4n,n 7cn2 Jo nwe haYe

- 4r2 .t cos2x r sinlxxz: -T + 4(cosx - Trsln x + -,/f - 2- +...

_r cosj/rx _ 7E sin nx + . . .lnz n I (13.6)4r.2 3 /cos nx zc sin zx\:J_+o,1,\__F__ " )4nz Scoszx Ssinzx::*4 )

--47i >SErn'Ern

for0< x<2rc,

% ### EX2DfourierHPfilter.m ### 2015.09.21 CB (updated 2017.01.20) % purpose of this code is perform a high-pass filtering of an image, akin% to what is shown in Fig.12.6 of Hobbie & Roth (4th Ed.) % Notes% o Caution: axes for FFT are not (presently) properly labeled% o originally called HRfig12x6.m clear% ==========================================================fileA= './Images/HRfig12x6'; % [no need for extension]mScale= 0; % boolean re linear (0) or log (1) axes for the magnitudeL= 15; % filter length for hi-pass% ==========================================================% ---imageA = imread(fileA,'jpg'); % load in an image% ---% if color, convert to B&Wif (size(imageA,3)>1), imageA= rgb2gray(imageA); end% ---fftA = fft2((imageA)); % compute FFT% ---% create a high-pass filter "mask" and apply (kludgy; likely better bookkeeping possible)fftA(1:L,1:L)= 0;fftA(1:L,end-L:end)= 0;fftA(end-L:end,1:L)= 0;fftA(end-L:end,end-L:end)= 0;% ---imageF= ifft2(fftA, 'symmetric'); % inverse FFT% place zero-frequency position in center?if (1==1), FA= fftshift(fftA); else FA= fftA; end% ---% plot originalfigure(1); clf;subplot(221); imagesc(imageA); title('Image A'); colorbar;if mScale==0 subplot(223); imagesc(abs(FA),[0 100000]); colormap gray; title('Mag.'); colorbar; % linear axeselse subplot(223); imagesc(db(FA)); colormap gray; title('Mag.'); colorbar; % log axesendsubplot(224); imagesc(angle(FA),[-pi pi]); colormap gray; title('Phase'); colorbar;xlabel('Freq. scale incorrect')subplot(222); imagesc(imageF); title('Hi-pass filtered version'); colorbar;