Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

P1: KUF/OVY

P2: OSO/OVY

JWCL374-09-II

QC: SCF/OVY

T1: SCF

JWCL374-Brannan-v1

710

Chapter 9

October 23, 2010

Partial Differential Equations and Fourier Series

Project 2 PROBLEMS
1. Derive the telegraph equation (5) from the
transmission line equations (3) and (4).
2. Show that if we look for solutions of Eq. (5) in
the form v(x, t) = z(t)y(x, t), then first derivative
terms can be removed if we choose z to satisfy
2 z + z = 0, and consequently, y(x, t) must
satisfy Eq. (7).
3. Show that if (x) = sin x is a solution of Eq. (11),
then the dependence of phase velocity on spatial
frequency is given by Eq. (12).
4. (a) Find the steady-state solution v(x)

of Eq. (5)
subject to the boundary conditions in Eq. (14)
by setting vt = vtt = 0 in Eq. (5), and then substituting the general solution of the resulting
equation into the boundary conditions to determine the constants of integration. Use Eq. (3)
to then find the steady-state current in the cable.
(b) Show that the transient term u(x, t) in Eq. (15)
must satisfy the initial boundary value problem
defined by Eqs. (16), (17), (18).
5. Use the method of separation of variables to solve
the inital boundary value problem defined by Eqs.
(16), (17), (18).
6. Use the relations sin ia = isinh a and
cos ia = cosh a and the trigonometric identities
sin (a b) = sin a cos b cos a sin b

and

cos (a b) = cos a cos b sin a sin b


to derive the propagating mode representation (22)
from Eq. (19).

7. Derive the condition (24) for distortionless


transmission and show that in this case, N = 0, so
that all modes propagate.
8. In order to examine the effects of dispersion,12 we
consider the problem defined by Eqs. (16), (17) on
a transmission line of length l = 5, using for initial
conditions the square wave pulse
!
1, 2 < x < 3
u(x, 0) = f (x) =
0, otherwise,
and
u t (x, 0) = 0, 0 x 5,
and the following sets of unrealistic, but computationally convenient, parameter values:
(i) = 12 , = 12 , = 14 ;
(ii) = 12 , = 12 , = 12 ;
(iii) = 12 , = 12 , = 1.
Using the coefficients
"
2 5
f (x) sin n x
and
An =
5 0
2 An
,
Bn = #
2n + 2 ( )2

plot and compare the graphs of


#
1000%
$
2t
e
u(x, t) =
An cos 2n + 2 ( )2 t
n=1
&
#
+Bn sin 2n + 2 ( )2 t sin n x
versus x, 0 x 5, for each of the cases (iiii) on
a single set of coordinate axes at the time t = 20.
Repeat the experiment for the time t = 40.

Project 3 Solving Poissons Equation by Finite Differences


Laplaces equation or the potential equation, is a partial differential
equation used to model physical phenomena such as the steady-state temperature distribution
in an isotropic and homogeneous material or the electric potential field generated by a
distribution of electric charge. It also arises in gravitational potential field theory and in
fluid mechanics. In two-dimensional rectangular coordinates, Laplaces equation is
2u =

2u
2u
+ 2 = 0.
2
x
y

(1)

12
Using Fourier transforms, we can perform the numerical simulation in this problem on a transmission
line of infinite length. We have chosen instants of time where both halves of the initial wave pulse have
coalesced at the center of the finite interval following an even number of reflections from the endpoints.
The shape of the pulse at these times is identical to that of the same initial pulse after it has propagated
along an infinite transmission line for equivalent periods of time.

CONFIRMING PAGES

16:29

P1: KUF/OVY
JWCL374-09-II

P2: OSO/OVY

QC: SCF/OVY

T1: SCF

JWCL374-Brannan-v1

October 23, 2010

Projects

711

The operator
2 =

2
2
+
x2
y2

is called the Laplacian operator or just the Laplacian. It is often the case that Laplaces
equation has a nonhomogeneous term, say, f (x, y), representing a distributed source13
( f > 0) or sink ( f < 0):
2u =

2u
2u
+ 2 = f (x, y).
2
x
y

(2)

Equation (2), Laplaces equation with a nonhomogeneous term, is referred to as Poissons


equation. A well-posed problem involving Laplaces or Poissons equation requires boundary conditions. If the value of the dependent variable u is specified on the boundary, then
the boundary conditions are called Dirichlet conditions and the resulting problem is called
a Dirichlet problem. For example, the Dirichlet problem for Poissons equation in a rectangular region (see Figure 9.P.3)
R = {(x, y): 0 < x < a, 0 < y < b}

(3)

is prescribed by
2u
2u
+
= f (x, y),
x2
y2

(x, y) R,

(4)

u(x, 0) = p(x),

u(x, b) = q(x),

0 < x < a,

(5)

u(0, y) = r ( y),

u(a, y) = s( y),

0 < y < b.

(6)

Equations (5) specify the values of u along the bottom and top edges of the rectangle,
whereas Eqs. (6) specify the values of u along the left and right edges of the rectangle.

(0, b)

u(0, y) = r(y)

(0, 0)

FIGURE 9.P.3

u(x, b) = q(x)

uxx + uyy + f(x, y) = 0 in R

u(x, 0) = p(x)

u(a, y) = s(y)

(a, 0)

The boundary value problem described by Eqs. (4), (5), (6).

A numerical method for approximating the solution of the Dirichlet problem (4), (5),
(6) is the finite difference method. The finite difference method is based on approximating
13
To see this, for example, in the case of heat transport in a flat plate, the time-dependent heat equation
with a distributed heat source in the interior of the plate is u t = u xx + u yy + f (x, y), where f > 0. Thus
the steady-state equation with a heat source in the interior is u xx + u yy = f (x, y).

CONFIRMING PAGES

16:29

P1: KUF/OVY
JWCL374-09-II

712

P2: OSO/OVY

QC: SCF/OVY

T1: SCF

JWCL374-Brannan-v1

Chapter 9

October 23, 2010

Partial Differential Equations and Fourier Series


derivatives by difference quotients. For example, a centered difference formula for the
second derivative of a function F(x) at the point x0 is given by
F(x0 !x) 2F(x0 ) + F(x0 + !x) 2 F
(x0 ),
=
x2
(!x)2

(7)

where !x is typically a small increment (see Problem 1). We partition the region R into
rectangular elements with mesh point coordinates defined by
x m = m!x,

m = 0, 1, 2, . . . , M + 1,

(8)

yn = n!y,

n = 0, 1, 2, . . . , N + 1,

(9)

and

where
!x =

a
M +1

and

!y =

b
.
N +1

It is convenient to introduce the following notation to represent values of u, f , p, q, r, and s


at the grid points:
u mn = u(xm , yn ),

f mn = f (xm , yn ),
pm = p(xm ),
rn = r ( yn ),

0 m M + 1,

qm = q(xm ),
sn = s( yn ),

0 n N + 1,

0 m M + 1,
0 n N + 1.

(10)
(11)
(12)

Applying finite difference approximations to the partial derivatives appearing in Eq. (4) at
the grid point (xm , yn ) yields, using the notation in Eq. (10),
u m,n1 2u mn + u m,n+1
u m1,n 2u mn + u m+1,n
+
= f mn .
2
(!x)
(!y)2

(13)

If we choose !x = !y = h, then Eq. (13) can be written as


u m1,n 4u mn + u m+1,n + u m,n1 + u m,n+1 = h 2 f mn .

(14)

Observe that if the point (xm , yn ) at which the discretization is centered is an interior point
adjacent to the boundary, then one or two of the terms on the left-hand side of Eq. (14)
are known from the boundary conditions. For example, the finite difference approximation
applied at the point (x1 , y1 ) may be written as
4u 11 + u 21 + u 12 = h 2 f (x1 , y1 ) p1 r1 ,

(15)

since u 01 = r1 and u 10 = p1 . Only the MN values of u mn , m = 1, . . . , M, n = 1, . . . , N ,


at the interior grid points are regarded as unknowns since the values of grid points on the
boundary of R are prescribed by the boundary conditions (5), (6).
We associate with Eq. (14) the computational molecule shown in Figure 9.P.4, where the
weights 1, 1, 1, 1 are assigned to the four grid points (xm1 , yn ), (xm+1 , yn ), (xm , yn1 ), and
(xm , yn+1 ) adjacent to (xm , yn ), which has a weight of 4. This computational molecule
makes it easy to write down directly, using matrices, the system of equations satisfied by
the unknowns. For example, using the computational molecule in Figure 9.P.4 on the 3 2

CONFIRMING PAGES

16:29

P1: KUF/OVY
JWCL374-09-II

P2: OSO/OVY

QC: SCF/OVY

T1: SCF

JWCL374-Brannan-v1

October 23, 2010

Projects

713

grid of interior points shown in Figure 9.P.5, we can write down the following system of six
equations for the unknown values u mn , m = 1, 2, 3, n = 1, 2 at the interior nodes:



4 1 0 1 0 0
u 11
f 11
p1
r1
0
0



1 4 1 0 1 0 u 21
f 21 p2 0 0 0



0 1 4 0 0 1 u 31
p 3 0 0 s 1
2 f 31

= h ,
1 0 0 4 1 0 u 12
f 12 0 q1 r2 0



0 1 0 1 4 1 u 22
f 22 0 q2 0 0
0 0 1 0 1 4
0
s2
u 32
f 32
q3
0
(16)

or, multiplying both sides of Eq. (16) by 1,



4 1 0 1 0 0
u 11
f 11
p1
r1
0
0



1 4 1 0 1 0 u 21
f 21 p2 0 0 0



0 1 4 0 0 1 u 31
f 31 p3 0 0 s1

= h 2 + + + + .
1 0 0 4 1 0 u 12
f 12 0 q1 r2 0



0 1 0 1 4 1 u 22
f 22 0 q2 0 0
0 0 1 0 1 4
u 32
f 32
0
q3
0
s2
(17)

Using obvious matrix notation, we can write Eq. (17) as


Au = h 2 f + p + q + r + s.

(18)

We infer from Eq. (17) the pattern of entries that allow us to easily define, using a computer
algebra system, the required matrix entries for a more densely defined grid:
! The MN MN matrix A is symmetric and banded with 4s along the main diagonal,
1s along the first subdiagonal above and below the main diagonal except for every
Mth entry which is zero, and 1s along the Mth subdiagonal above and below the main
diagonal. All other entries of A are zero.

FIGURE 9.P.4

Computational molecule for two-dimensional Laplace operator.

CONFIRMING PAGES

16:29

P1: KUF/OVY
JWCL374-09-II

714

P2: OSO/OVY

QC: SCF/OVY

T1: SCF

JWCL374-Brannan-v1

Chapter 9

October 23, 2010

Partial Differential Equations and Fourier Series


y

q1

r2

r1

p1

FIGURE 9.P.5

q2

q3

u12

u22

u32

u11

u21

u31

p2

s2

s1

p3

A 5 4 grid with 3 2 interior points.

! Beginning with the first entry, each set of M consecutive entries of the vector f corresponds to values of f (x, y) at interior nodal points along the rows of the computational
grid.
! The first M entries of the p vector correspond to p(x) evaluated at the interior bottom
row of grid points, with the remaining entries equal to 0.
! The last M entries of the q vector correspond to q(x) evaluated at the interior top row
of grid points, with the remaining entries equal to 0.
! Beginning with the first entry, each Mth consecutive entry of the r vector is equal to
r ( y) evaluated at a grid point along the left boundary of R.
! Beginning with the Mth entry, each Mth consecutive entry of the s vector is equal to
s( y) evaluated at a grid point along the right boundary of R.

While decreasing the distance h between nodes in the finite difference algorithm decreases the error in the approximate solution of the boundary value problem (4), (5), (6),
it increases the number of unknowns. For example, multiplying internodal distances by a
factor of 12 increases the number of unknowns by 4. However understanding the pattern of
the entries in A and the vectors f, p, q, r, and s allows us to construct a system of equations
that can easily be solved using a computer algebra system, provided that the dimension of
the system is not too large.
The method of finite differences is one of several different types of algorithms used to
compute numerical approximations to solutions of partial differential equations. Numerical
approximation methods enjoy three major advantages over the method of separation of
variables: (1) they generalize to equations with variable coefficients, (2) they can be used
on problems that have domains with irregular geometries, and (3) they can be applied to
nonlinear problems. In all cases, numerical linear algebra plays an important role in the
solution algorithms.

CONFIRMING PAGES

16:29

P1: KUF/OVY
JWCL374-09-II

P2: OSO/OVY

QC: SCF/OVY

T1: SCF

JWCL374-Brannan-v1

October 23, 2010

Projects

715

Project 3 PROBLEMS
1. If a function F(x) has n continuous derivatives,
the Taylor series expansion of F(x0 + !x) with
remainder about the point x0 is
1
F(x0 + !x) = F(x0 ) + F (1) (x0 )!x
1!
1
1
+ F (2) (x0 )(!x)2 + +
F (n1) (x0 )(!x)n1
2!
(n 1)!
1
+ F (n) (x1 )(!x)n ,
n!
(i)

(a) In the case that the increment size h = 13 , sketch


the computational grid and write out by hand the
matrices A, f, p, q, r and s analogous to those
appearing in Eq. (18).
(b) Use a computer algebra system to solve the
resulting system of equations obtained in
part (a).
(c) Verify that u(x, y) = x2 2x 4y 2 + 4yxy3/6
satisfies Eqs. (i), (ii), (iii).
(d) At each of the computational grid points, comwhere |x1 x0 | < |!x|. Use Eq. (i) to show that
pute the difference between the approximation
if F(x) has four continuous derivatives, then the
obtained in part (b) and the exact solution.
local error between the second order centered finite
3. Using a computer algebra system, construct the madifference approximation at x0 and ( 2 F/ x 2 )(x0 )
trix A and the vectors f, p, q, r, and s and then
satisfies
solve Eq. (18) for each of the following increment
!
!
! F(x0 !x) 2F(x0 ) + F(x0 + !x) 2 F
!
sizes: (i) h = 0.2, (ii) h = 0.1, and (iii) h = 0.05.
2
!
!

(x0 )! C(!x) ,
!
x2
In each case, compute the maximum error between
(!x)2
the numerical approximation and the exact solution
where C is a constant. If the increment size !x is
at each of the grid points:
reduced by a factor of 2, by what factor is the local
error reduced?
2. Consider the following Dirichlet problem:
2u
2u
+
= 6 xy,
x2
y2
u(x, 0) = x 2 2x,

0 < x < 2,

0 < y < 1,
(i)

"
u(x, 1) = x x

0 < x < 2,
u(0, y) = 4y(1 y),

E M,N =

u(2, y) = 4y
0 < y < 1.

13
6

,
(ii)

1 y y2
,
12
(iii)

max

1mM, 1nN

|u mn u(xm , yn )|

Does it appear that E M,N constant h as h 0?


4. How many unknowns are there in the resulting linear system and how many entries does the full matrix A (counting zero and nonzero entries) have
in the case h = 0.025? How many nonzero entries
does A have in this case? What percentage of the
entries of A are nonzero in this case?
5. Draw a surface plot of the numerical approximation
to the solution of Eqs. (21), (22), (23) for the case
h = 0.04.

CONFIRMING PAGES

16:29

You might also like