Numerical Methods for Engineers
Numerical Methods for Engineers
7th Edition
ISBN: 9780073397924
Author: Steven C. Chapra Dr., Raymond P. Canale
Publisher: McGraw-Hill Education
bartleby

Videos

Textbook Question
Book Icon
Chapter 19, Problem 4P

Use a continuous Fourier series to approximate the sawtooth wave in Fig. P19.4. Plot the first three terms along with the summation.

FIGURE P19.4

A sawtooth wave.

Chapter 19, Problem 4P, 19.4	Use a continuous Fourier series to approximate the sawtooth wave in Fig. P19.4. Plot the first

Expert Solution & Answer
Check Mark
To determine

To calculate: The Fourier series expansion to approximate the sawtooth wave, as shown in the following figure,

Numerical Methods for Engineers, Chapter 19, Problem 4P , additional homework tip  1

Plot the first three terms along with the summation.

Answer to Problem 4P

Solution:

The Fourier series of the sawtooth curve is f(t)=2π[sin(ω0t)+12sin(2ω0t)13sin(3ω0t)+...]_.

Explanation of Solution

Given Information: The sawtooth wave shown as,

Numerical Methods for Engineers, Chapter 19, Problem 4P , additional homework tip  2

Formula used:

Consider f(t) is a periodic function with period T defined in the interval 0xT then the Fourier series expansion of the function is,

f(t)=a0+k=1[akcos(kω0t)+bksin(kω0t)];ω0=2πT

And the coefficients are defined by,

a0=1T0Tf(t)dt;ak=2T0Tf(t)cos(kω0t)dt;bk=2T0Tf(t)sin(kω0t)dt

Calculation:

Consider the sawtooth wave as shown in the following figure,

Numerical Methods for Engineers, Chapter 19, Problem 4P , additional homework tip  3

Therefore, the sawtooth wave is a periodic function f(t) with period T in the interval 0tT and from the graph,

f(t) is a straight line joining the points (0,0) and (T2,1) in 0tT2

; f(t) is a straight line joining the points (T2,1) and (T,0) in T2tT.

Therefore, the sawtooth wave,

f(t)={2Tt,0tT222Tt,T2tT

Therefore, the Fourier series expansion of the function f(t) is,

f(t)=a0+k=1[akcos(kω0t)+bksin(kω0t)] with ω0=2πT.

Here, the coefficients are defined by,

a0=1T0Tf(t)dt;ak=2T0Tf(t)cos(2kπTt)dt;bk=2T0Tf(t)sin(2kπTt)dt

Now, find ak.

ak=2T0Tf(t)cos(2kπTt)dt=2T0T2(2Tt)cos(2kπTt)dt+2TT2T(22Tt)cos(2kπTt)dt=4T20T2tcos(2kπTt)dt+4TT2Tcos(2kπTt)dt4T2T2Ttcos(2kπTt)dt

Consider,

I=tcos(2kπTt)dt=tcos(2kπTt)dt{ddt(t)cos(2kπTt)dt}dt=tT2kπsin(2kπTt)T2kπsin(2kπTt)dt=Tt2kπsin(2kπTt)+T24k2π2cos(2kπTt)

Thus,

0T2tcos(2kπTt)dt=[Tt2kπsin(2kπTt)+T24k2π2cos(2kπTt)]0T2=T2kπT2sin(2kπTT2)+T24k2π2cos(2kπTT2)T24k2π2cos(0)=T24kπsin(kπ)+T24k2π2cos(kπ)T24k2π2=T24k2π2(1)kT24k2π2

T2Tcos(2kπTt)dt=T2kπsin(2kπTt)|T2T=T2kπ{sin(2kπ)sin(kπ)}=0

T2Ttcos(2kπTt)dt=[Tt2kπsin(2kπTt)+T24k2π2cos(2kπTt)]T2T=T22kπsin(2kπ)+T24k2π2cos(2kπ)T24kπsin(kπ)T24k2π2cos(kπ)=T24k2π2T24k2π2(1)k

Therefore,

ak=4T2[T24k2π2(1)kT24k2π2]+4T×04T2[T24k2π2T24k2π2(1)k]=1k2π2(1)k+1k2π21k2π2+1k2π2(1)k=0

Now, find bk.

bk=2T0Tf(t)sin(2kπTt)dt=2T0T2(2Tt)sin(2kπTt)dt+2TT2T(22Tt)sin(2kπTt)dt=4T20T2tsin(2kπTt)dt+4TT2Tsin(2kπTt)dt4T2T2Ttsin(2kπTt)dt

Consider,

I=tsin(2kπTt)dt=tsin(2kπTt)dt{ddt(t)sin(2kπTt)dt}dt=tT2kπcos(2kπTt)+T2kπcos(2kπTt)dt=Tt2kπcos(2kπTt)+T24k2π2sin(2kπTt)

Thus,

0T2tsin(2kπTt)dt=[Tt2kπcos(2kπTt)+T24k2π2sin(2kπTt)]0T2=T24kπcos(kπ)+T24k2π2sin(kπ)=T24kπ(1)k

T2Tsin(2kπTt)dt=T2kπcos(2kπTt)|T2T=T2kπcos(2kπ)+T2kπcos(kπ)=T2kπ+T2kπ(1)k

Further,

T2Ttsin(2kπTt)dt=[Tt2kπcos(2kπTt)+T24k2π2sin(2kπTt)]T2T=T22kπcos(2kπ)+T24k2π2sin(2kπ)+T24kπcos(kπ)T24k2π2sin(kπ)=T22kπ+T24kπ(1)k

Therefore,

bk=4T2[T24kπ(1)k]+4T[T2kπ+T2kπ(1)k]4T2[T22kπ+T24kπ(1)k]=1kπ(1)k2kπ+2kπ(1)k+2kπ1kπ(1)k=2kπ(1)k

Therefore, the coefficients of the Fourier series expansions are,

a0=0, ak=0, bk=2kπ(1)k

Therefore, the Fourier series expansion defines ω0=2πT, f(t)=k=1[2kπ(1)ksin(kω0t)]=2πk=1[(1)kksin(kω0t)]

Hence, f(t)=2π[sin(ω0t)+12sin(2ω0t)13sin(3ω0t)+...]

Graph:

To plot the given sawtooth curve and the approximated Fourier series consider the period, T=1.

Therefore, the periodic sawtooth curve is expressed as,

f(t)={2t,0t1222t,12t1

And, the corresponding Fourier series is,

f(t)=2π[sin(ω0t)+12sin(2ω0t)13sin(3ω0t)+...],ω0=2π

Hence, f(t)=2πsin(2πt)+1πsin(4πt)23πsin(6πt)+...

Use the following MATLAB code to plot the first three terms along with the summation.

function Code_97924_19_4P()

% enter the time period

T = 1;

t1 = 0: 0.0001: T/2;

t2 = T/2: 0.0001: T;

% define the function

f1 = @(t) -(2/T)*t;

f2 = @(t) 2-(2/T)*t;

t = [t1, t2];

f = [f1(t1), f2(t2)];

w0 = 2*pi/T;

% define the first three terms in the series

Term1 = @(t) -(2/pi)*sin(w0*t);

Term2 = @(t) (1/pi)*sin(2*w0*t);

Term3 = @(t) -(2/(3*pi))*sin(3*w0*t);

ff = @(t) Term1(t) + Term2(t) + Term3(t);

% plot the results

figure(); hold on

plot(t,f,'–k','Linewidth',2);

plot(t, Term1(t),'-.m','Linewidth',2);

plot(t, Term2(t),'-.r','Linewidth',2);

plot(t, Term3(t),'-.g','Linewidth',2);

plot(t, ff(t),'b','Linewidth',2);

% define the graphical properties

ylim([-2 2]); grid on

legend('Original','1^{st} Term','2^{nd} Term','3^{rd} Term','Sum')

set(gca,'XTick',[0 T/4 T/2 3*T/4 T]);

set(gca,'XTickLabel',{'0' 'T/4' 'T/2' '3T/4' 'T'});

set(gca,'Fontname','Times New Roman','FontSize',12);

end

Execute the above code to obtain the plot as,

Numerical Methods for Engineers, Chapter 19, Problem 4P , additional homework tip  4

Interpretation: The above plot shows the comparison between the variation in the first three terms of the series along with the variation in summation.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Knowledge Booster
Background pattern image
Advanced Math
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, advanced-math and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
Trigonometry (MindTap Course List)
Trigonometry
ISBN:9781305652224
Author:Charles P. McKeague, Mark D. Turner
Publisher:Cengage Learning
Text book image
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage
Text book image
Trigonometry (MindTap Course List)
Trigonometry
ISBN:9781337278461
Author:Ron Larson
Publisher:Cengage Learning
But what is the Fourier Transform? A visual introduction.; Author: 3Blue1Brown;https://www.youtube.com/watch?v=spUNpyF58BY;License: Standard YouTube License, CC-BY