Date post: | 14-Apr-2018 |
Category: |
Documents |
Upload: | augustus1189 |
View: | 215 times |
Download: | 0 times |
of 12
7/27/2019 hw5_solutions_complete.pdf
1/12
Assigned: March 1, 2011Due: March 9, 2011
MATH 480: Homework 5
SPRING 2011
Fourier Series:
1. (a) Find the Fourier sine series for f(x) = 1 x defined on the interval 0 x 1.
(b) In MATLAB, plot the first 20 terms and the first 200 terms of the sine seriesin the interval 3 x 3.
(c) To what value does the series converge at x = 0?
2. (a) Find the Fourier cosine series for f(x) = 1x defined on the interval 0 x 1.
(b) In MATLAB, plot the first 20 terms and the first 200 terms of the cosine seriesin the interval 3 x 3.
(c) To what value does the series converge at x = 0?3. (a) Find the Fourier series for
f(x) =
0 if 1 x < 0
1 x2 if 0 < x 1
defined on the interval 1 x 1.
(b) In MATLAB, plot the first 20 terms and the first 200 terms of the Fourier seriesin the interval 3 x 3.
(c) To what value does the series converge at x = 0?
4. The Fourier series of the function f(x) = cos(ax) on the interval [, ], when a isnot an integer, is given by
cos(ax) =2a sin(a)
1
2a2+n=1
(1)n+1
n2 a2cos(nx)
for x .
(a) Differentiate both sides of this equation with respect to x, differentiating theseries term by term, to find the Fourier series for sin(ax):
sin(ax) = 2sin(a) n=1
(
1)
n
nn2 a2 sin(nx)
for < x < .
(b) Explain why this method for computing the Fourier series is valid.
(c) If you know the Fourier series for sin(ax) given in (a), why can you not dif-ferentiate it term by term with respect to x to derive the Fourier series forcos(ax).
1
7/27/2019 hw5_solutions_complete.pdf
2/12
7/27/2019 hw5_solutions_complete.pdf
3/12
FV
=r4@, {k=(
,
C/La
)
D
=r
/7g#
7/27/2019 hw5_solutions_complete.pdf
4/12
zA-c** tp Fo un'e-re1
f7t*n'z'r _/
/ -x" o
7/27/2019 hw5_solutions_complete.pdf
5/12
Assigned: March 1, 2011Due: March 9, 2011
Problem # 1 (b)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% HW # 5: pr1b.m%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all; clf;
x=-3:1e-3:3;
NN=20;
FS=0;
for n=1:NN
Bn=2/(n*pi);
FS=FS+Bn*sin(n*pi*x);
end
figure(1); clf(1)
subplot(2,1,1), plot(x,FS);
xlabel(x)
ylabel([First ,num2str(NN), terms of Fourier sine series])
title([First ,num2str(NN), ...
terms of the Fourier sine series for the function f(x)=1-x defined on 0
7/27/2019 hw5_solutions_complete.pdf
6/12
Assigned: March 1, 2011Due: March 9, 2011
3 2 1 0 1 2 31.5
1
0.5
0
0.5
1
1.5
x
First20termsofFouriersineseries
First 20 terms of the Fourier sine series for the function f(x)=1x defined on 0
7/27/2019 hw5_solutions_complete.pdf
7/12
Assigned: March 1, 2011Due: March 9, 2011
terms of the Fourier cosine series for the function f(x)=1-x defined on 0
7/27/2019 hw5_solutions_complete.pdf
8/12
Assigned: March 1, 2011Due: March 9, 2011
Problem # 3 (b)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% HW # 5: pr3b.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all; clf;
x=-3:1e-3:3;
NN=20;
FS=1/3;
for n=1:NN
An=2*(-1)^(n+1)/(n^2*pi^2);
Bn=(2*(-1)^(n+1)+n^2*pi^2+2)/(n^3*pi^3);
FS=FS+An*cos(n*pi*x)+Bn*sin(n*pi*x);end
figure(1);clf(1)
subplot(2,1,1), plot(x,FS);
xlabel(x)
ylabel([First ,num2str(NN), terms,of Fourier series])
title([First ,num2str(NN), ...
terms of the Fourier series for the function f(x)=1-x defined on 0
7/27/2019 hw5_solutions_complete.pdf
9/12
Assigned: March 1, 2011Due: March 9, 2011
print -depsc2 pr3b_graph.eps
3 2 1 0 1 2 30.2
0
0.2
0.4
0.6
0.8
1
1.2
x
First20terms,o
fFourierseries
First 20 terms of the Fourier series for the function f(x)=1x defined on 0
7/27/2019 hw5_solutions_complete.pdf
10/12
{-9:L4zJ 1=?Z oa,/ (zzr,
-v-z 7p zz1/4 zrz at "1Xa a4 /za-a._k. d,,"/4/ td( /z.eA4 761 4t72)-o 2t
O / zzr+ lt rzz#c;
,Qzt-.ao /z.kr. {i ", z"rrrz-+.2,q42- /1/- Fzl/szZ
7/27/2019 hw5_solutions_complete.pdf
11/12
v_+-E_at.,-r--
,/5;el;s=-4."t?a4= :- /1l*t
7/27/2019 hw5_solutions_complete.pdf
12/12
'..) * z - * . nFr/z-c,"ey't) e
aP a6s'7'-,r'72roro.-=a ff.) = lft;
*{,, e "q:J / /+t ee-r rrtrrol l l : C.