Chapter3 2e

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

491422594.

doc
Example 3.2-1

u (x ,t)

0 .1 u (x ,0 ) = f(x )  3 1
 x 0  x 
f ( x )   10 3
3(1  x ) 1
  x 1
0 1 x  20 3

Figure 3.2-2 Initial shape of the string in Example 3.2-1

Figure 3.2-2 shows the initial displacement u(x,t) of a string stretched along the x-axis between x
= 0 and x = 1. The string is free to vibrate in a fixed plane through the x-axis. Determine the
subsequent motion of the string if it is released from rest, given that c = 1/.

Solution

The equation that describes the string motion is the one-dimensional wave equation

 2u 2  u
2
= c 0 < x < 1, t > 0 (3.2-1)
t 2 x 2

with boundary conditions

u(0,t) = 0 and u(1,t) = 0, for t  0

and initial conditions

u
u(x,0) = f(x) and (x,0) = 0, for 0 x  1
t

The solution to the wave equation is



n
u(x,t) = 
n 1
sin
L
x[ bn cos( n t) + bn* sin( n t)] (3.2-6)

u(x,t) = 
n 1
sin(nx)[ bn cos(nt) + bn* sin(nt)]

where

cn 2 L nx
n =
L
=n bn* =
cn 
0
g ( x ) sin(
L
)dx = 0

and

2 L nx 1
bn =
L 0
f ( x ) sin(
L
)dx = 2  f ( x ) sin( nx )dx
0

41
491422594.doc
1/ 3 3 1 3
bn = 2  x sin(nx )dx + 2  (1  x ) sin( nx )dx
0 10 1 / 3 20

1/ 3
The expression 0 x sin( nx )dx can be integrated by part

d(uv) = udv + vdu

 udv =  d (uv )   vdu


 udv = uv   vdu

Let u = x  du = dx

1
dv = sin(nx) dx v =  cos(nx)
n

1/ 3 x 1 1/ 3
 x sin( nx )dx =   cos(nx )dx
1/ 3
cos( nx ) 0 +
0 n n 0

n
3 (1 / 3) cos( ) 3 1 n 1 3
bn = 3 + 2 sin( ) + 2 1 / 3 (1  x ) sin( nx )dx
5 5 ( n ) 3 20
n

 n   n 
cos  3 sin  1
bn =   3  +  3  + 0.3 1 / 3 sin( nx )dx  0.3
5
5n ( n )
2

1
1/ 3
x sin( nx )dx

 n   n 
cos  3 sin  0.3 0.3 x 0.3
bn =   3  + 5  3  
1
cos(nx ) 1 / 3 +
1
cos( nx ) 1 / 3 
n n ( n  )2
5n ( n ) 2
1
sin( nx ) 1 / 3

 n   n 
cos  3 sin  0.3 0.3 n
bn =   3  + 5  3   cos(n ) + cos( )
n n 3
5n ( n ) 2

0.3 0.3  n  0. 3  n 
+ cos(n )  cos  + 2 sin  
n 3n  3  ( n )  3 

 n   n 
cos  3 sin  0.3 n 0.3  n  0. 3
bn =   3  + 5  3  + cos( )  cos  +
n 3 3n  3  ( n ) 2
5n ( n ) 2
 n 
sin 
 3 
42
491422594.doc

 n   n 
cos  3 sin  0.2 n 0.3  n 
bn =   3  + 5  3  + cos( ) + 2 sin  
n 3 ( n  )  3 
5n ( n ) 2

 n 
0.6  n  0.3  n  0.9  n  0.9 sin 
bn = 2 sin   + 2 sin   = 2 sin   =  3 
( n )  3  ( n )  3  ( n )  3   2
2
n

The solution is then

 n 

0.9 
sin 
u(x,t) = 
n 1
bn sin(nx) cos(nt) =
2

n 1
 3  sin(nx) cos(nt)
n2

0.1 0.1 0.1

0 0 0
u

u
-0.1 -0.1 -0.1
0 0.5 1 0 0.5 1 0 0.5 1
0.1 t=0.00 0.1 t=0.50 0.1 t=1.00

0 0 0
u

-0.1 -0.1 -0.1


0 0.5 1 0 0.5 1 0 0.5 1
0.1 t=1.50 0.1 t=2.00 0.1 t=2.50

0 0 0
u

-0.1 -0.1 -0.1


0 0.5 1 0 0.5 1 0 0.5 1
t=3.00 t=3.50 t=4.00
Figure 3.2-3 The snapshot of the string at various time using 20 terms of the series solution.

43
491422594.doc
__________ Table 3.2-1 Matlab program to plot u(x,t) at various time ___________

% Plot the string motion in Example 3.2-1 at various t


%
x=0:.02:1; fx=x; nv=length(x);
%
% Label the time t for each displacement u, the character vector ax hold the data
%
ax='t=0.00t=0.50t=1.00t=1.50t=2.00t=2.50t=3.00t=3.50t=4.00';
%
% Set y-coordinate from -0.1 to 0.1
%
x1=[0 0];y1=[-0.1 0.1];x2=[0 1];y2=[0 0];
n=1:20;
for i=1:9;
t=0.5*(i-1);cosnt=cos(n*t);
%
% Extract the time from ax, label axi is used for x-axis label for the time
%
ib=1+(i-1)*6;ie=ib+5;
axi=ax(ib:ie);
for j=1:nv;
xi=x(j);sinx=sin(pi*n*xi);sincos=sinx.*cosnt;
bn=sin(n*pi/3)./n.^2;
fx(j)= bn*sincos';
end
fx=.9*fx/(pi*pi);
%
% Divide the plot window into 3 rows and 3 columns using subplot command
%
subplot(3,3,i),plot(x,fx,x1,y1,x2,y2)
xlabel(axi);ylabel('u')
end

44

You might also like