Partial differential equation

2 downloads 0 Views 1MB Size Report
Nov 4, 2011 - A partial differential equation (or briefly a PDE) is a mathematical ..... Below are solutions to the homogeneous Monge–Ampere equation for the ...
19/2/2014

Partial differential equation - Scholarpedia

Partial differential equation

+1 Recommend this on Google

Dr. Andrei D. Poly anin, Institute for Problems in Mechanics, Moscow, Russia Prof. William E. Schiesser, Lehigh Univ ersity , USA Dr. Alex ei I. Zhurov , Cardiff Univ ersity , UK, and Institute for Problems in Mechanics, Moscow, Russia. A partial differential equation (or briefly a PDE) is a mathematical equation that inv olv es two or more independent v ariables, an unknown function (dependent on those v ariables), and partial deriv ativ es of the unknown function with respect to the independent v ariables. The order of a partial differential equation is the order of the highest deriv ativ e inv olv ed. A solution (or a particular solution) to a partial differential equation is a function that solv es the equation or, in other words, turns it into an identity when substituted into the equation. A solution is called general if it contains all particular solutions of the equation concerned. The term exact solution is often used for second- and higher-order nonlinear PDEs to denote a particular solution (see also Preliminary remarks at Second-Order Partial Differential Equations). Partial differential equations are used to mathematically formulate, and thus aid the solution of, phy sical and other problems inv olv ing functions of sev eral v ariables, such as the propagation of heat or sound, fluid flow, elasticity , electrostatics, electrody namics, etc.

First-Order Partial Differential Equations General Form of First-Order Partial Differential Equation A first-order partial differential equation with n independent v ariables has the general form ∂w F (x 1 , x 2 , … , x n , w, ∂ x1

where w

= w(x 1 , x 2 , … , x n )

∂w ,

∂w )= 0,

,… , ∂ x2

∂ xn

is the unknown function and F (…) is a giv en function.

Quasilinear Equations. Characteristic System. General Solution General form of first-order quasilinear PDE A first-order quasilinear partial differential equation w ith tw o independent variables has the general form ∂w f(x, y, w)

∂w + g(x, y, w)

∂x

= h(x, y, w).

(1)

∂y

Such equations are encountered in v arious applications (continuum mechanics, gas dy namics, hy drody namics, heat and mass transfer, wav e theory , acoustics, multiphase flows, chemical engineering, etc.). If the functions f , g , and h are independent of the unknown w, then equation (1 ) is called linear.

Characteristic system. General solution The sy stem of ordinary differential equations dx http://www.scholarpedia.org/article/Partial_differential_equation

dy =

dw =

1/39

19/2/2014

Partial differential equation - Scholarpedia dy

dx

dw

=

=

f(x, y, w)

(2)

g(x, y, w)

h(x, y, w)

is known as the characteristic system of equation (1 ). Suppose that two independent particular solutions of this sy stem hav e been found in the form u 1 (x, y, w) = C 1 ,

u 2 (x, y, w) = C 2 ,

(3)

where C and C are arbitrary constants; such particular solutions are known as integrals of sy stem (2). Then the general solution to equation (1 ) can be written as 1

2

Φ(u 1 , u 2 ) = 0,

(4)

where Φ is an arbitrary function of two v ariables. With equation (4) solv ed for u , one often specifies the general solution in the form u = Ψ(u ), where Ψ(u) is an arbitrary function of one v ariable. 2

2

Remark. If h(x, y, w)

, then w

≡ 0

1

can be used as the second integral in (3).

= C2

Example. Consider the linear equation ∂w

∂w + a

= b.

∂x

∂y

The associated characteristic sy stem of ordinary differential equations dy

dx = 1

dw =

a

b

has two integrals y − ax = C 1 ,

w − bx = C 2 .

Therefore, the general solution to this PDE can be written as w − bx

, or

= Ψ(y − ax)

w = bx + Ψ(y − ax),

where Ψ(z) is an arbitrary function.

Cauchy Problem: Two Formulations. Solving the Cauchy Problem Generalized Cauchy problem Generalized Cauchy problem: find a solution w x = φ (ξ), 1

where ξ is a parameter (α

≤ ξ ≤ β)

and the

= w(x, y)

y = φ (ξ),

φ (ξ) k

to equation (1 ) satisfy ing the initial conditions

2

w = φ (ξ), 3

(5)

are giv en functions.

Geometric interpretation: find an integral surface of equation (1 ) passing through the line defined parametrically by equation (5).

Classical Cauchy problem Classical Cauchy problem: find a solution w

= w(x, y)

w = φ(y)

of equation (1 ) satisfy ing the initial condition at

x = 0,

(6)

where φ(y) is a giv en function.

http://www.scholarpedia.org/article/Partial_differential_equation

2/39

19/2/2014

Partial differential equation - Scholarpedia

It is often conv enient to represent the classical Cauchy problem as a generalized Cauchy problem by rewriting condition (6) in the parametric form x = 0,

y = ξ,

w = φ(ξ).

Existence and uniqueness theorem If the coefficients f , g , and h of equation (1 ) and the functions φ in (5) are continuously differentiable with k

respect to each of their arguments and if the inequalities f φ − gφ ≠ 0 and (φ ) + (φ ) ≠ 0 hold along the curv e (5), then there is a unique solution to the Cauchy problem (in a neighborhood of the curv e (5)). 2







2

1

1



2

2

Procedure of solving the Cauchy problem The procedure for solv ing the Cauchy problem (1 ), (5) inv olv es sev eral steps. First, two independent integrals (3) of the characteristic sy stem (2) are determined. Then, to find the constants of integration C and C , the initial data (5) must be substituted into the integrals (3) to obtain 1

2

u 1 (φ (ξ), φ (ξ), φ (ξ)) = C 1 , 1

2

3

u 2 (φ

1

(ξ), φ

2

(ξ), φ

3

(ξ)) = C 2 .

(7)

Eliminating C and C from (3) and (7 ) y ields 1

2

u 1 (x, y, w) = u 1 (φ (ξ), φ (ξ), φ (ξ)), 1

2

3

(8)

u 2 (x, y, w) = u 2 (φ (ξ), φ (ξ), φ (ξ)). 1

2

3

Formulas (8) are a parametric form of the solution to the Cauchy problem (1 ), (5). In some cases, one may succeed in eliminating the parameter ξ from relations (8), thus obtaining the solution in an ex plicit form. In the cases where first integrals (3) of the characteristic sy stem (2) cannot be found using analy tical methods, one should employ numerical methods to solv e the Cauchy problem (1 ), (5) (or (1 ), (6)).

Second-Order Partial Differential Equations Linear, Semilinear, and Nonlinear Second-Order PDEs Linear second-order PDEs and their properties. Principle of linear superposition A second-order linear partial differential equation w ith tw o independent variables has the form ∂

2

w

a(x, y) ∂x

2



2

w

+ 2b(x, y)



2

w

+ c(x, y) ∂x ∂y

∂y

2

∂w = α(x, y)

∂w + β(x, y)

∂x

+ γ(x, y)w + δ(x, y). (9) ∂y

If δ ≡ 0 , equation (9) is a homogeneous linear equation, and if δ ≢ 0 , it is a nonhomogeneous linear equation. The functions a(x, y) , b(x, y) , ..., γ(x, y), δ(x, y) are called coefficients of equation (9). Some properties of a homogeneous linear equation (with δ

≡ 0

):

1 . A homogeneous linear equation has a particular solution w

= 0 .

2. The principle of linear superposition holds; namely , if w (x, y), w (x, y), ..., w (x, y) are particular solutions to homogeneous linear equation, then the function A w (x, y) + A w (x, y) + ⋯ + A w (x, y), where A , A , ..., A are arbitrary numbers is also an 1

1

1

2

2

http://www.scholarpedia.org/article/Partial_differential_equation

n

n

1

2

2

n

n

3/39

19/2/2014

Partial differential equation - Scholarpedia

ex act solution to that equation. ~ ~ 3. Suppose equation (9) has a particular solution w = w (x, y; μ) that depends on a parameter μ, and the coefficients of the linear differential equation are independent of μ (but can depend on x and y ). Then, ~ by differentiating w with respect to μ , one obtains other solutions to the equation, ~ ∂w ∂μ

,



2

~ w 2

∂μ

,



…,

~ w

k

k

,



∂μ

~ ~ ~ 4. Let w = w (x, y; μ) be a particular solution as described in property 3. Multiply ing w by an arbitrary function φ(μ) and integrating the resulting ex pression with respect to μ ov er some interv al [μ , μ ], ~ one obtains a new function ∫ w (x, y; μ)φ(μ) dμ,which is also a solution to the original homogeneous 1

2

μ

2

μ

1

linear equation. 5. Suppose the coefficients of the homogeneous linear equation (9) are independent of x . Then: (i) there is a particular solution of the form w = e u(y) , where λ is an arbitrary number and u(y) is determined by a linear second-order ordinary differential equation, and (ii) differentiating any particular solution with respect to x also results in a particular solution to equation (9). λx

Properties 2–5 are widely used for constructing solutions to problems gov erned by linear PDEs. Ex amples of particular solutions to linear PDEs can be found in the subsections Heat equation and Laplace equation below.

Semilinear and nonlinear second-order PDEs A second-order semilinear partial differential equation w ith tw o independent variables has the form ∂

2

w

a(x, y) ∂x

2



2

w

+ 2b(x, y)



2

w

+ c(x, y) ∂x ∂y

∂y

2

∂w = F (x, y, w,

∂w ).

, ∂x

(10)

∂x

In the general case, a second-order nonlinear partial differential equation with two independent v ariables has the form ∂w F (x, y, w,

∂w ,

∂x



2

w

, ∂y

∂x



2

w

,

2



2

w

, ∂x ∂y

∂y

2

) = 0.

The classification and the procedure for reducing linear and semilinear equations of the form (9) and (1 0) to a canonical form are only determined by the left-hand side of the equations (see below for details).

Some Linear Equations Encountered in Applications Three basic ty pes of linear partial differential equations are distinguished—parabolic, hyperbolic, and elliptic (for details, see below). The solutions of the equations pertaining to each of the ty pes hav e their own characteristic qualitativ e differences.

Heat equation (a parabolic equation) 1 . The simplest ex ample of a parabolic equation is the heat equation ∂w



2

w

− ∂t

∂x

2

= 0,

(11)

where the v ariables t and x play the role of time and a spatial coordinate, respectiv ely . Note that equation (1 1 ) contains only one highest deriv ativ e term.

http://www.scholarpedia.org/article/Partial_differential_equation

4/39

19/2/2014

Partial differential equation - Scholarpedia

Equation (1 1 ) is often encountered in the theory of heat and mass transfer. It describes one-dimensional unsteady thermal processes in quiescent media or solids with constant thermal diffusiv ity . A similar equation is used in study ing corresponding one-dimensional unsteady mass-ex change processes with constant diffusiv ity . 2. The heat equation (1 1 ) has infinitely many particular solutions (this fact is common to many PDEs); in particular, it admits solutions w(x, t) = A(x

2

+ 2t) + B, 2

w(x, t) = A exp(μ t ± μx) + B, 1

2

x

w(x, t) = A

) + B,

exp(− 4t

√t 2

w(x, t) = A exp(− μ t) cos(μx + B) + C , 2

w(x, t) = A exp(−μx) cos(μx − 2 μ t + B) + C ,

where A, B,

C

, and

μ

are arbitrary constants.

See also Linear heat equations (http://eqworld.ipmnet.ru/en/solutions/lpde/heat-toc.htm) from EqWorld and Heat equation (http://en.wikipedia.org/wiki/Heat_equation) from Wikipedia.

Wave equation (a hyperbolic equation) 1 . The simplest ex ample of a hyperbolic equation is the w ave equation ∂

2

w −

∂t

2



2

w = 0,

(12)

∂ x2

where the v ariables t and x play the role of time and the spatial coordinate, respectiv ely . Note that the highest deriv ativ e terms in equation (1 2) differ in sign. This equation is also known as the equation of vibration of a string. It is often encountered in elasticity , aerody namics, acoustics, and electrody namics. 2. The general solution of the wav e equation (1 2) is w = φ(x + t) + ψ(x − t),

(13)

where φ(x) and ψ(x) are arbitrary twice continuously differentiable functions. This solution has the phy sical interpretation of two traveling w aves of arbitrary shape that propagate to the right and to the left along the x -ax is with a constant speed equal to 1 . See also Wav e equation (http://en.wikipedia.org/wiki/Wav e_equation) from Wikipedia and Linear hy perbolic equations (http://eqworld.ipmnet.ru/en/solutions/lpde/lpdetoc2.htm) from EqWorld.

Laplace equation (an elliptic equation) 1 . The simplest ex ample of an elliptic equation is the Laplace equation ∂

2

w

∂x

2



2

w

+ ∂y

2

= 0,

(14)

where x and y play the role of the spatial coordinates. Note that the highest deriv ativ e terms in equation (1 4) hav e like signs. The Laplace equation is often written briefly as Δw = 0 , where Δ is the Laplace operator. http://www.scholarpedia.org/article/Partial_differential_equation

5/39

19/2/2014

Partial differential equation - Scholarpedia

The Laplace equation is often encountered in heat and mass transfer theory , fluid mechanics, elasticity , electrostatics, and other areas of mechanics and phy sics. For ex ample, in heat and mass transfer theory , this equation describes steady -state temperature distribution in the absence of heat sources and sinks in the domain under study . A solution to the Laplace equation (1 4) is called a harmonic function. 2. Note some particular solutions of the Laplace equation (1 4): w(x, y)

=

Ax + By + C ,

w(x, y)

=

A(x

w(x, y)

=

2

− y

2

) + Bxy,

Ax + By 2

x

where A, B,

C

,

D

+ y

2

+ C,

w(x, y)

=

(A sinh μx + B cosh μx)(C cos μy + D sin μy),

w(x, y)

=

(A cos μx + B sin μx)(C sinh μy + D cosh μy),

, and μ are arbitrary constants.

A fairly general method for constructing solutions to the Laplace equation (1 4) inv olv es the following. Let f(z) = u(x, y) + iv(x, y)be any analy tic function of the complex v ariable z = x + iy (u and v are real functions of the real v ariables x and y ; i = −1 ). Then the real and imaginary parts of f both satisfy the Laplace equation, 2

Δu = 0,

Δv = 0.

Thus, by specify ing analy tic functions f(z) and taking their real and imaginary parts, one obtains v arious solutions of the Laplace equation (1 4).

Classification of Second-Order Partial Differential Equations Types of equations Any semilinear partial differential equation of the second-order with two independent v ariables (1 0) can be reduced, by appropriate manipulations, to a simpler equation that has one of the three highest deriv ativ e combinations specified abov e in ex amples (1 1 ), (1 2), and (1 4). Giv en a point (x, y) , equation (1 0) is said to be parabolic hyperbolic elliptic

if if if

2

b

2

b

2

b

− ac = 0, − ac > 0, − ac < 0

at this point.

Characteristic equations In order to reduce equation (1 0) to a canonical form, one should first write out the characteristic equation a (dy)

which with a

≢ 0

2

− 2b dx dy + c (dx)

2

= 0,

splits into two equations − − − −− − 2 a dy − (b + √b − ac ) dx = 0

(15)

and http://www.scholarpedia.org/article/Partial_differential_equation a dy −

− − − −− − 2 (b − √ − ac ) dx = 0,

6/39

19/2/2014

Partial differential equation - Scholarpedia − − − −− − 2 a dy − (b − √b − ac ) dx = 0,

(16)

and then find their general integrals. Remark. If a

≡ 0

, the simpler equations dx

=

0,

2b dy − c dx

=

0

should be used instead of (1 5) and (1 6). The first equation has the obv ious general solution x

Canonical form of parabolic equations (case b2

= C .

)

− ac = 0

In this case, equations (1 5) and (1 6) coincide and hav e a common general integral, u(x, y) = C .

By passing from x ,

y

to new independent v ariables ξ , η in accordance with the relations ξ = u(x, y),

where η = Jacobian

η(x, y)

D(ξ,η) D(x,y)

η = η(x, y),

is any twice differentiable function that satisfies the condition of nondegeneracy of the

in the giv en domain, one reduces equation (1 0) to the canonical form ∂

2

w

∂η

As η , one can take

η = x

or

2

= F 1 (ξ, η, w,

∂w

,

∂ξ

∂w

).

(17)

∂η

η = y .

It is apparent that the transformed equation (1 7 ) has only one highest-deriv ativ e term, just as the heat equation (1 1 ).

Two canonical forms of hyperbolic equations (case b2

)

− ac > 0

1 . The general integrals u 1 (x, y) = C 1 ,

u 2 (x, y) = C 2

of equations (1 5) and (1 6) are real and different. These integrals determine two different families of real characteristics. By passing from x ,

y

to new independent v ariables ξ , η in accordance with the relations ξ = u 1 (x, y),

η = u 2 (x, y),

one reduces equation (1 0) to ∂

2

w

∂w = F 2 (ξ, η, w,

∂ξ ∂η

∂w ).

, ∂ξ

∂η

This is the so-called first canonical form of a hyperbolic equation. 2. The transformation ξ = t + z,

η = t− z

brings the abov e equation to another canonical form, http://www.scholarpedia.org/article/Partial_differential_equation

7/39

19/2/2014

Partial differential equation - Scholarpedia ∂

2

w

∂t



2

w



2

∂w = F 3 (t, z, w,

2

∂z

∂w ),

, ∂t

∂z

where F = 4 F . This is the so-called second canonical form of a hyperbolic equation. Apart from notation, the left-hand side of the last equation coincides with that of the wav e equation (1 2). 3

2

Canonical form of elliptic equations (case b2

)

− ac < 0

In this case the general integrals of equations (1 5) and (1 6) are complex conjugates; these determine two families of complex characteristics. Let the general integral of equation (1 5) hav e the form u 1 (x, y) + iu 2 (x, y) = C ,

where u

1

(x, y)

and u

By passing from x ,

y

2

(x, y)

i

2

= −1,

are real-v alued functions.

to new independent v ariables ξ , η in accordance with the relations ξ = u 1 (x, y),

η = u 2 (x, y),

one reduces equation (1 0) to the canonical form ∂

2

w



2

w

+ ∂ξ

2

∂η

2

∂w = F 4 (ξ, η, w,

∂w ).

, ∂ξ

∂η

Apart from notation, the left-hand side of the last equation coincides with that of the Laplace equation (1 4).

Basic Problems for PDEs of Mathematical Physics Most PDEs of mathematical phy sics gov ern infinitely many qualitativ ely similar phenomena or processes. This follows from the fact that differential equations hav e, as a rule, infinitely many particular solutions. The specific solution that describes the phy sical phenomenon under study is separated from the set of particular solutions of the giv en differential equation by means of the initial and boundary conditions. For simplicity and clarity of illustration, the basic problems of mathematical phy sics will be presented for the simplest linear equations (1 1 ), (1 2), and (1 4) only .

Cauchy problem and boundary value problems for parabolic equations Cauchy problem (t ≥ initial condition

0

,

). Find a function w that satisfies heat equation (1 1 ) for t >

−∞ < x < ∞

w = φ(x)

at

t = 0.

0

and the

(18)

The solution of the Cauchy problem (1 1 ), (1 8) is ∞

w(x, t) = ∫

φ(ξ)E(x, ξ, t) dξ, −∞

where E(x, ξ, t) is the fundamental solution of the Cauchy problem, (x − ξ)

1 E(x, ξ, t) =

http://www.scholarpedia.org/article/Partial_differential_equation

− − − 2 √ πat

2

].

exp[− 4at

8/39

19/2/2014

Partial differential equation - Scholarpedia

In all boundary value problems (or initial-boundary value problems) below, it will be required to find a function w , in a domain t ≥ 0 , x ≤ x ≤ x (−∞ < x < x < ∞ ), that satisfies the heat equation (1 1 ) for t > 0 and the initial condition (1 8). In addition, all problems will be supplemented with some boundary conditions as giv en below. 1

2

1

2

First boundary value problem. The function w(x, t) takes prescribed v alues on the boundary : w = ψ (t)

at

x = x1 ,

w = ψ (t)

at

x = x2 .

1

2

(19)

In particular, the solution to the first boundary v alue problem (1 1 ), (1 8), (1 9) with ψ x = 0 , and x = l is ex pressed as 1

1

(t) = ψ (t) ≡ 0 2

,

2

l

w(x, t) = ∫

φ(ξ)G(x, ξ, t) dξ, 0

where the Green's function G(x, ξ, t) is defined by the formulas 2



l

1 =

− − − 2 √ πat

) sin(

an π ) exp(−

l

n=1

2

nπξ

nπx

∑ sin(

G(x, ξ, t) =

l



l

(x − ξ + 2nl)

2

t

2

)

2

(x + ξ + 2nl)

∑ {exp[−

] − exp[− 4at

n=−∞

2

]}. 4at

The first series conv erges rapidly at large t and the second series at small t . Second boundary value problem. The deriv ativ es of the function w(x, t) are prescribed on the boundary : ∂w = ψ (t) ∂x

1

at

x = x1 , (20)

∂w = ψ (t) ∂x

2

at

x = x2 .

Third boundary value problem. A linear relationship between the unknown function and its deriv ativ es are prescribed on the boundary : ∂w

− k1 w = ψ (t) 1

∂x ∂w

at

x = x1 , (21)

+ k2 w = ψ (t) 2

∂x

at

x = x2 .

Mixed boundary value problems. Conditions of different ty pe, listed abov e, are set on the boundary of the domain in question, for ex ample, x = ψ (t) 1

at

x = x1 ,

at

x = x2 .

(22)

∂w = ψ (t) ∂x

2

The boundary conditions (1 9)–(22) are called homogeneous if ψ

http://www.scholarpedia.org/article/Partial_differential_equation

1

(t) = ψ (t) ≡ 0 . 2

9/39

19/2/2014

Partial differential equation - Scholarpedia

Solutions to the abov e initial-boundary v alue problems for the heat equation can be obtained by separation of variables (Fourier method) in the form of infinite series or by the method of integral transforms using the Laplace transform. For other linear heat equations, their ex act solutions, and solutions to associated Cauchy problems and boundary v alue problems, see Linear heat equations (http://eqworld.ipmnet.ru/en/solutions/lpde/heattoc.htm) at EqWorld.

Cauchy problem and boundary value problems for hyperbolic equations Cauchy problem (t ≥ two initial conditions

0

,

). Find a function w that satisfies the wav e equation (1 2) for t >

−∞ < x < ∞

w = φ (x) 0

at

t = 0,

at

t = 0.

0

and

(23)

∂w = φ (x) 1

∂t

The solution of the Cauchy problem (1 2), (23) is giv en by D'Alembert's formula: 1 w(x, t) =

x+at

1 ∫

[φ (x + at) + φ (x − at)] + 0

2

0

2a

φ (ξ) dξ. 1

x−at

Boundary value problems. In all boundary value problems, it is required to find a function w , in a domain t ≥ 0, x ≤ x ≤ x (−∞ < x < x < ∞ ), that satisfies the wav e equation (1 2) for t > 0 and the initial conditions (23). In addition, appropriate boundary conditions, (1 9), (20), (21 ), or (22), are imposed. 1

2

1

2

Solutions to these boundary v alue problems for the wav e equation can be obtained by separation of v ariables (Fourier method) in the form of infinite series. In particular, the solution to the first boundary v alue problem (1 2), (1 9), (23) with homogeneous boundary conditions, ψ (t) = ψ (t) ≡ 0 at x = 0 and x = l , is ex pressed as 1

l

∂ ∫

w(x, t) = ∂t

1

2

2

l

φ (ξ)G(x, ξ, t) dξ + ∫

φ

0

0

1

(ξ)G(x, ξ, t) dξ,

(24)

0

where ∞

2

1



G(x, ξ, t) = aπ

n=1

n

nπξ

nπx ) sin(

sin( l

nπat ) sin(

l

). l

Goursat problem. On the characteristics of the wav e equation (1 2), v alues of the unknown function w are prescribed: w = φ(x)

for

x − t = 0

(0 ≤ x ≤ a),

w = ψ(x)

for

x + t = 0

(0 ≤ x ≤ b),

(25)

with the consistency condition φ(0)

= ψ(0)

implied to hold.

Substituting the v alues set on the characteristics (25) into the general solution of the wav e equation (1 3), one arriv es at a sy stem of linear algebraic equations for φ(x) and ψ(x) . As a result, the solution to the Goursat problem (1 2), (25) is obtained in the form

http://www.scholarpedia.org/article/Partial_differential_equation

w(x, t) = φ(

) + ψ(

) − φ(0).

10/39

19/2/2014

Partial differential equation - Scholarpedia x + t

x − t ) + ψ(

w(x, t) = φ(

) − φ(0).

2

2

The solution propagation domain is the parallelogram bounded by the four lines x − t = 0,

x + t = 0,

x − t = 2b,

x + t = 2a.

For other linear wav e equations, their ex act solutions, and solutions to associated Cauchy problems and boundary v alue problems, see Linear hy perbolic equations (http://eqworld.ipmnet.ru/en/solutions/lpde/lpdetoc2.htm) at EqWorld.

Boundary value problems for elliptic equations Setting boundary conditions for the first, second, and third boundary v alue problems for the Laplace equation (1 4) means prescribing v alues of the unknown function, its first deriv ativ e, and a linear combination of the unknown function and its deriv ativ e, respectiv ely . For ex ample, the first boundary v alue problem in a rectangular domain 0 characterized by the boundary conditions

≤ x ≤ a

w = φ (y)

at

x = 0,

w = φ (y)

at

x = a,

w = φ (x)

at

y = 0,

w = φ (x)

at

y = b.

1

3

The solution to problem (1 4), (26) with φ ∞

3

4

(x) = φ (x) ≡ 0 4



w(x, y) = ∑ An sinh[ n=1

2

b

b

0 ≤ y ≤ b

is

(26)

is giv en by ∞

nπ (a − x)] sin(

,



y) + ∑ Bn sinh( n=1

nπ x) sin(

b

y), b

where the coefficients A and B are ex pressed as n

b

2 An =

∫ λn

n

nπξ 1

0

b

2 )dξ,

φ (ξ) sin( b

Bn =

∫ λn

nπξ 2

nπa )dξ,

φ (ξ) sin( b

0

λ n = b sinh(

). b

Remark. For elliptic equations, the first boundary v alue problem is often called the Dirichlet problem, and the second boundary v alue problem is called the Neumann problem. For other linear elliptic equations, their ex act solutions, and solutions to associated boundary v alue problems, see Linear elliptic equations (http://eqworld.ipmnet.ru/en/solutions/lpde/lpdetoc3.htm) at EqWorld.

Some Nonlinear Equations Encountered in Applications Nonlinear heat equation: ∂w



∂t

∂w [f(w)

= ∂x

].

(27)

∂x

This equation describes one-dimensional unsteady thermal processes in quiescent media or solids in the case where the thermal diffusiv ity is temperature dependent, f(w) > 0 . In the special case f(w) ≡ 1 , the nonlinear equation (27 ) becomes the linear heat equation (1 1 ). In general, the nonlinear heat equation (27 ) admits ex act solutions of the form w = W (kx http://www.scholarpedia.org/article/Partial_differential_equation

− λt)

(traveling-wave solution),

11/39

19/2/2014

Partial differential equation - Scholarpedia

where W = W (z) and U arbitrary constants.

w = W (kx − λt)

(traveling-wave solution),

w = U (x/√ t )

(self-similar solution),

= U (r)

are determined by ordinary differential equations, and

k

and λ are

Kolmogorov–Petrovskii–Piskunov equation: ∂w



2

w

= a ∂t

∂x

+ f(w),

2

a > 0.

(28)

Equations of this form are often encountered in v arious problems of mass and heat transfer (with f being the rate of a v olume chemical reaction), combustion theory , biology , and ecology . In the special case of f(w)

≡ 0

and

a = 1

, the nonlinear equation (28) becomes the linear heat equation (1 1 ).

Remark. Equation (28) is also called a heat equation w ith a nonlinear source.

Burgers equation: ∂w

∂w + w

∂t



2

w

= ∂x

∂x

2

.

(29)

This equation is used for describing wav e processes in gas dy namics, hy drody namics, and acoustics. 1 . Ex act solutions to the Burgers equation can be obtained using the following formula (Hopf–Cole transformation): 2

∂u

w(x, t) = −

, u ∂x

where u

= u(x, t)

is a solution to the linear heat equation u

t

= u xx

(see abov e for details).

2. The solution to the Cauchy problem for the Burgers equation with the initial condition w = f(x)

at

t = 0

(−∞ < x < ∞)

has the form ∂ w(x, t) = −2

ln F (x, t), ∂x

where ∞

1 F (x, t) =

− −− √ 4πt



(x − ξ) exp[−

2

4t

−∞

ξ

1





+ 2



f( ξ ) d ξ ]dξ. 0

Nonlinear wave equation: ∂

2

w

∂t

http://www.scholarpedia.org/article/Partial_differential_equation

2



∂w [f(w)

= ∂x

].

(30)

∂x

12/39

19/2/2014

Partial differential equation - Scholarpedia

This equation is encountered in wav e and gas dy namics, f(w) > nonlinear equation (30) becomes the linear wav e equation (1 2).

0 .

In the special case f(w)

≡ 1

, the

Equation (30) admits ex act solutions in implicit form: − −− − x + t√f(w)

=

φ(w),

=

ψ(w),

− −− − x − t√f(w)

where φ(w) and ψ(w) are arbitrary functions. Equation (30) can be reduced to a linear equation (see Poly anin and Zaitsev , 2004).

Nonlinear Klein–Gordon equation: ∂

2

w

∂t



= a 2

2

w + f(w),

a > 0.

(31)

∂ x2

Equations of this form arise in differential geometry and v arious areas of phy sics (superconductiv ity , dislocations in cry stals, wav es in ferromagnetic materials, laser pulses in two-phase media, and others). For f(w) ≡ 0 and a = 1 , equation (31 ) coincides with the linear wav e equation (1 2). 1 . In general, the nonlinear Klein–Gordon equation (31 ) admits ex act solutions of the form

where W = W (z) and U are arbitrary constants.

w = W (z),

z = kx − λt,

w = U (ξ),

ξ = (√ a t + C 1 )

= U (ξ)

2

2

− (x + C 2 ) ,

are determined by ordinary differential equations, while k , λ , C , and C 1

2

2. In the special case f(w) = be

βw

,

the general solution of equation (31 ) is ex pressed as 1

2

[φ(z) + ψ(y)] −

w(x, t) = β



∣ ln∣k ∫ ∣ β

8ak

z = x − √ a t,

where φ

= φ(z)

and ψ

= ψ(y)



exp[φ(z)] dz −

∣ exp[ψ(y)] dy∣, ∣

y = x + √ a t,

are arbitrary functions and k is an arbitrary constant.

Remark. In the special cases f(w) = b sin(βw) and f(w) = b sinh(βw) , equation (31 ) is called the sineGordon equation (http://eqworld.ipmnet.ru/en/solutions/npde/npde21 06.pdf) and the sinh-Gordon equation (http://eqworld.ipmnet.ru/en/solutions/npde/npde21 05.pdf) , respectiv ely .

Nonlinear Laplace equation: ∂

2

w

∂x

2



2

w

+ ∂y

2

= f(w).

(32)

This equation is also called a stationary heat equation w ith a nonlinear source.

http://www.scholarpedia.org/article/Partial_differential_equation

13/39

19/2/2014

Partial differential equation - Scholarpedia

1 . In general, the nonlinear heat equation (32) admits ex act solutions of the form w = W (z),

z = k1 x + k2 y,

w = U (r),

r = √(x + C 1 )

−−−−−−−−−−−−−−−−−

where W = W (z) and U are arbitrary constants.

= U (r)

2

2

+ (y + C 2 ) ,

are determined by ordinary differential equations, while

k1

, k , C , and C 2

1

2

2. In the special case f(w) = ae

βw

,

the general solution of equation (32) is ex pressed as ¯¯¯¯¯¯¯ ∣ ∣1 − 2aβΦ(z)Φ(z) ∣ ∣

2 w(x, y) = −

ln

,



β

4|Φ (z)| z

where Φ = Φ(z) is an arbitrary analy tic function of the complex v ariable z deriv ativ e, and the bar ov er a sy mbol denotes the complex conjugate.

= x + iy

with nonzero

Monge–Ampere equation: ∂

(

2

w

2

)





∂x ∂y

2

w

∂x

2



2

w

∂y

= f(x, y).

2

The equation is encountered in differential geometry , gas dy namics, and meteorology . Below are solutions to the homogeneous Monge–Ampere equation for the special case f(x, y)

≡ 0 .

1 . Ex act solutions inv olv ing one arbitrary function: w(x, y) = φ(C 1 x + C 2 y) + C 3 x + C 4 y + C 5 ,

y w(x, y) = (C 1 x + C 2 y) φ(

x

) + C3x + C4y + C5,

C4 x + C5 y + C

6

C1 x + C2 y + C

3

) + C7 x + C8 y + C9 ,

w(x, y) = (C 1 x + C 2 y + C 3 ) φ(

where C , ..., C are arbitrary constants and φ 1

9

= φ(z)

is an arbitrary function.

2. General solution in parametric form: w = tx + φ(t)y + ψ(t),





x + φ (t)y + ψ (t) = 0,

where t is the parameter, and φ

= φ(t)

and ψ

= ψ(t)

are arbitrary functions.

Simplest Types of Exact Solutions of Nonlinear PDEs Preliminary remarks The following classes of solutions are usually regarded as ex act solutions to nonlinear partial differential equations of mathematical phy sics: http://www.scholarpedia.org/article/Partial_differential_equation

14/39

19/2/2014

Partial differential equation - Scholarpedia

1 . Solutions ex pressible in terms of elementary functions. 2. Solutions ex pressed by quadrature. 3. Solutions described by ordinary differential equations (or sy stems of ordinary differential equations). 4. Solutions ex pressible in terms of solutions to linear partial differential equations (and/or solutions to linear integral equations). The simplest ty pes of ex act solutions to nonlinear PDEs are trav eling-wav e solutions and self-similar solutions. They often occur in v arious applications. In what follows, it is assumed that the unknown w depends on two v ariables, x and t , where t play s the role of time and x is a spatial coordinate.

Traveling-wave solutions Traveling-w ave solutions, by definition, are of the form w(x, t) = W (z),

z = kx − λt,

(33)

where λ/k play s the role of the wav e propagation v elocity (the v alue λ = 0 corresponds to a stationary solution, and the v alue k = 0 corresponds to a space-homogeneous solution). Trav eling-wav e solutions are characterized by the fact that the profiles of these solutions at different time instants are obtained from one another by appropriate shifts (translations) along the x -ax is. Consequently , a Cartesian coordinate sy stem mov ing with a constant speed can be introduced in which the profile of the desired quantity is stationary . For k > 0 and λ > 0 , the wav e (33) trav els along the x -ax is to the right (in the direction of increasing x ). Trav eling-wav e solutions occur for equations that do not ex plicitly inv olv e independent v ariables, ∂w F (w,

∂w ,

∂x



2

w

, ∂t

∂x

2



2

w

,



2

w

, ∂x ∂t

∂t

, …) = 0.

2

(34)

Substituting (33) into (34), one obtains an autonomous ordinary differential equation for the function W (z)

: ′



2

F (W , k W , −λ W , k W

′′

, −kλ W

′′

2

,λ W

′′

, …) = 0,

where k and λ are arbitrary constants, and the prime denotes a deriv ativ e with respect to z

.

Remark. The term traveling-w ave solution is also used in the cases where the v ariable t play s the role of a spatial coordinate, t = y . All nonlinear equations considered abov e, (27 )–(32) and (33) with f(x, y) solutions.

= 0

, admit trav eling-wav e

Self-similar solutions By definition, a self-similar solution is a solution of the form w(x, t) = t

α

U (ζ),

ζ = xt

β

.

(35)

The profiles of these solutions at different time instants are obtained from one another by a similarity transformation (like scaling). Self-similar solutions ex ist if the scaling of the independent and dependent v ariables, ¯ t = Ct,

x = C

k

¯, x

w = C

http://www.scholarpedia.org/article/Partial_differential_equation

m

¯, w

where C ≠ 0 is an arbitrary constant,

(36)

15/39

19/2/2014

Partial differential equation - Scholarpedia

for some k and m such that |k| + |m| ≠ 0, is equiv alent to the identical transformation. It can be shown that the parameters in solution (35) and transformation (36) are linked by the simple relations α = m,

β = −k.

(37)

In practice, the abov e ex istence criterion is checked and if a pair of k and m in (36) has been found, then a self-similar solution is defined by formulas (35) with parameters (37 ). Example. Consider the heat equation with a nonlinear power-law source term ∂w



2

w

= a ∂t

∂x

n

+ bw .

2

(38)

The scaling transformation (36) conv erts equation (38) into C

m−1

¯ ∂w ¯ ∂t

= aC

m−2k



2

¯ w

∂x ¯

2

+ bC

mn

n

¯ . w

(39)

In order that equation (39) coincides with (38), one must require that the powers of C are the same, which y ields the following sy stem of linear algebraic equations for the constants k and m : m − 1 = m − 2k = mn.

This sy stem admits a unique solution 1 k =

, 2

m =

1 1−n

.

Using this solution together with relations (35) and (37 ), one obtains self-similar v ariables in the

form w = t

1/(1−n)

U (ζ),

ζ = xt

−1/2

.

Inserting these into (38), one arriv es at the following ordinary differential equation for U (ζ) aU

′′ ζζ

1 +

ζU 2

′ ζ

1 +

U + bU

n

:

= 0.

n− 1

Cauchy Problem and Boundary Value Problems for Nonlinear Equations The Cauchy problem and boundary v alue problems for nonlinear equations are stated in ex actly the same way as for linear equations (see Basic Problems for PDEs of Mathematical Phy sics). Examples. The Cauchy problem for a nonlinear heat equation is stated as follows: find a solution to equation (27 ) subject to the initial condition (1 8). The first boundary v alue problem for a nonlinear wav e equation as follows: find a solution to equation (32) subject to the initial conditions (1 8) and the boundary conditions (1 9). Problems for nonlinear PDEs are normally solv ed using numerical methods.

http://www.scholarpedia.org/article/Partial_differential_equation

16/39

19/2/2014

Partial differential equation - Scholarpedia

Higher-Order Partial Differential Equations Apart from second-order PDEs, higher-order equations also quite often arise in applications. Below are only a few important ex amples of such equations with some of their solutions.

Higher-Order Linear Partial Differential Equations Equation of transverse vibration of elastic rod: ∂

2

w

∂t

+ a

2

2



4

w = 0.

∂x

4

The equation has the following particular solutions: 2

w(x, t) = [A sin(λx) + B cos(λx) + C sinh(λx) + D cos(λx)] sin(λ at), 2

w(x, t) = [A1 sin(λx) + B1 cos(λx) + C 1 sinh(λx) + D 1 cos(λx)] cos( λ at),

where A, B,

C

,

D , A1

, B , C , D , and λ are arbitrary constants. 1

1

1

For solutions to associated Cauchy problems and boundary v alue problems, see Equation of transv erse v ibration of elastic rods (http://eqworld.ipmnet.ru/en/solutions/lpde/lpde501 .pdf) at EqWorld.

Biharmonic equation: ΔΔw = 0,

(40)

where ΔΔ is the biharmonic operator, 2

ΔΔ ≡ Δ



=

4

∂x

+ 2 4

∂ ∂x

2

4

+ ∂y

2



4

∂y

. 4

The biharmonic equation (40) is encountered in plane problems of elasticity (w is the Airy stress function). It is also used to describe slow flows of v iscous incompressible fluids (w is the stream function). V arious representations of the general solution to equation (40) in terms of harmonic functions include w(x, y) = x u 1 (x, y) + u 2 (x, y), w(x, y) = yu 1 (x, y) + u 2 (x, y), w(x, y) = (x

2

+ y

2

)u 1 (x, y) + u 2 (x, y),

where u and u are arbitrary functions satisfy ing the Laplace equation Δu 1

2

k

= 0

(k

= 1, 2

).

Complex form of representation of the general solution: ¯f(z) + g(z)], w(x, y) = Re[z

where f(z) and g(z) are arbitrary analy tic functions of the complex v ariable z = i = −1 . The sy mbol Re[A] stands for the real part of a complex quantity A .

,

¯ = x − iy x + iy ; z

2

For solutions to associated boundary v alue problems, see Biharmonic equation (http://eqworld.ipmnet.ru/en/solutions/lpde/lpde503.pdf) at EqWorld.

http://www.scholarpedia.org/article/Partial_differential_equation

17/39

19/2/2014

Partial differential equation - Scholarpedia

Higher-Order Nonlinear Partial Differential Equations Korteweg–de Vries equation: ∂w



3

w

+ ∂t

∂x

3

∂w − 6w

= 0. ∂x

It is used in many sections of nonlinear mechanics and theoretical phy sics for describing one-dimensional nonlinear dispersiv e nondissipativ e wav es. In particular, the mathematical modeling of moderate-amplitude shallow-water surface wav es is based on this equation. For ex act solutions to this equation, see Korteweg–de V ries equation (http://eqworld.ipmnet.ru/en/solutions/npde/npde51 01 .pdf) at EqWorld.

Equation of a steady laminar boundary layer on a flat plate: ∂w



2

w

∂w



2

w

− ∂y

∂x ∂y

∂x

∂y

2



3

w

= a ∂y

3

.

where w is the stream function. For ex act solutions, see Boundary lay er equations (http://eqworld.ipmnet.ru/en/solutions/npde/npde51 05.pdf) at EqWorld.

Boussinesq equation: ∂

2

w

∂t

∂ (w

+

2

∂w

∂x



4

w

)+ ∂x

= 0. ∂x

4

This equation arises in sev eral phy sical applications: propagation of long wav es in shallow water, onedimensional nonlinear lattice-wav es, v ibrations in a nonlinear string, and ion sound wav es in a plasma. For ex act solutions, see Boussinesq equation (http://eqworld.ipmnet.ru/en/solutions/npde/npde61 01 .pdf) at EqWorld.

Equation of motion of a viscous fluid: ∂w



∂w



(Δw) − ∂y

∂x

∂ (Δw) = a ΔΔw,

∂x

∂y

2

w

Δw = ∂x

2



2

w

+ ∂y

2

.

This is a two-dimensional stationary equation of motion of a v iscous incompressible fluid—it is obtained from the Nav ier–Stokes equations by the introduction of the stream function w . For ex act solutions to this equation, see Nav ier–Stokes equations (http://eqworld.ipmnet.ru/en/solutions/npde/npde61 02.pdf) at EqWorld.

Approximate and Numerical Methods The preceding discussion pertains to the exact or analytical solution of PDEs. For ex ample, in the case of a heat equation or a wav e equation, an ex act solution would be a function w = f(x, t) which, when substituted into the respectiv e equation would satisfy it identically along with all of the associated initial and boundary conditions.

http://www.scholarpedia.org/article/Partial_differential_equation

18/39

19/2/2014

Partial differential equation - Scholarpedia

Although analy tical solutions are ex act, they also may not be av ailable, simply because we do not know how to deriv e such solutions. This could be because the PDE sy stem has too many PDEs, or they are too complicated, e.g., nonlinear, or both, to be amenable to analy tical solution. In this case, we may hav e to resort to an approximate solution. That is, we seek an analytical or numerical approximation to the exact solution. Perturbation methods are an important subset of approx imate analy tical methods. They may be applied if the problem inv olv es small (or large) parameters, which are used for constructing solutions in the form of asymptotic expansions. For books on perturbation methods, see Google Book Search (http://books.google.com/books?lr=&q=%22perturbation+methods%22) . These and other methods for PDEs are also outlined in Zwillinger (1 997 ) (http://www.mathtable.com/hode/) . Unlike ex act and approx imate analy tical methods, methods to compute numerical PDE solutions are in principle not limited by the number or complex ity of the PDEs. This generality combined with the av ailability of high performance computers makes the calculation of numerical solutions feasible for a broad spectrum of PDEs (such as the Nav ier–Stokes equations) that are bey ond analy sis by analy tical methods. The dev elopment and implementation (as computer codes) of numerical methods or algorithms for PDE sy stems is a v ery activ e area of research. Here we indicate in the ex ternal links just two readily av ailable links to Scholarpedia. We now consider the numerical solution of a parabolic PDE, a hy perbolic PDE, and an elliptic PDE.

Parabolic PDE Analy tical solutions to a parabolic PDE (heat equation) are giv en here. But we will proceed with a numerical solution and use one of these analy tical solutions to ev aluate the numerical solution. We can consider the numerical solution to the heat equation ∂w



2

w

− ∂t

∂x

2

= 0

(41)

as a two-step process: 1 . Numerical approx imation of the deriv ativ e



2

w .

At this point, we will hav e a semi-discretization of

∂ x2

Eq. (41 ). 2. Numerical approx imation of the deriv ativ e

∂w .

At this point, we will hav e a full discretization of Eq.

∂t

(41 ).

In order to implement these two steps, we require a grid in x and a grid in t . For the grid in x , we denote a position along the grid with the index i . Then we can consider the Tay lor series ex pansion of the numerical solution at grid point i

w i+1 = w i +

dw i dx

d

2

(x i+1 − x i ) +

wi

dx

2

(x i+1 − x i )

2

d

3

+ 2!

wi

dx

3

(x i+1 − x i )

3

+ ⋯

(42)

+ ⋯

(43)

3!

and

w i−1 = w i +

dw i dx

(x i−1 − x i ) +

http://www.scholarpedia.org/article/Partial_differential_equation

d

2

wi

dx

2

(x i−1 − x i ) 2!

2

+

d

3

wi

dx

3

(x i−1 − x i )

3

3!

19/39

19/2/2014

Partial differential equation - Scholarpedia

If we consider a uniform grid (a grid with uniform spacing Δx = x − x = x − x and (43) giv es (note the cancellation of the first and third deriv ativ e terms since x i+1

i

i

i−1

i−1

d

2

w i+1 + w i−1 = 2 w i +

wi

dx

2

Δx

2

+ O(Δx

4

, addition of Eqs. (42) )

)

− x i = −Δx

)

(44)

where O(Δx ) denotes a term proportional to Δx or of order Δx ; this term can be considered a truncation error resulting from truncating the Tay lor series of Eqs. (42) and (43) bey ond the Δx term. Then Eq. (44) giv es for the second deriv ativ e 4

4

4

2

d

2

wi

dx

2

w i+1 − 2 w i + w i−1 ≈ Δx

+ O(Δx

2

2

)

Equation (45) is a second order (because of the principal error or truncation error O(Δx approximation of d w /dx . 2

(45)

2

)

) finite difference

2

i

If Eq. (45) is substituted in Eq. (41 ) (to replace the deriv ativ e



2

dw i

2

w i+1 − 2 w i + w i−1 = D

dt

Δx

+ O(Δx

2

), a sy stem of ODEs results

w

∂x

2

),

i = 1, 2, … , N

(46)

(we hav e added a multiply ing constant D to the right-hand side of Eq. (41 ), generally termed a thermal diffusivity if w in Eq. (41 ) is temperature and a mass diffusivity if w is concentration; D has the MKS units m 2 /s as ex pected from a consideration of Eq. (41 ) with x in metres and t in seconds). Note that the independent v ariable x does not appear ex plicitly in Eqs. (46) and that the only independent v ariable is t (so that they are ODEs). N is the number of points in the x grid (x is termed a boundary value variable since the terminal grid points at i = 1 and i = N ty pically refer to the boundaries of a phy sical sy stem). Thus Eq. (41 ) is partly discretized (in x ) and therefore Eqs. (46) are referred to as a semidiscretization. To compute a solution to Eq. (41 ), we could apply an established initial-v alue integrator in t . This is the essence of the method of lines (MOL). Alternativ ely , we could now discretize Eqs. (46). For ex ample, if we apply Eq. (42) on a grid in t with an index k

w

k+1 i

= w

k i

dw +

k i

(t

k+1

− t

k

d

2

w

) +

dt

dt

If the grid in t has a uniform spacing h

= t

w

k+1

k+1 i

k

(t

i

k+1

− t

k

)

2

+ ⋯,

2

i = 1, 2, … , N ,

k = 1, 2, … (47)

2!

− t

k

= w

and if truncation after the first deriv ativ e term is applied,

k i

dw +

k i

h + O(h

2

)

(48)

dt

Equation (48), the classical Euler's method, can be used to step along the solution of Eq. (41 ) from point k to k + 1 (at a grid point i in x ). Application of Eq. (48) to Eq. (46) giv es the fully discretized approx imation of Eq. (41 )

w

k+1 i

= w

k i

w + hD

k i+1

− 2w Δx

k i

2

+ w

k i−1

(49)

In Eq. (47 ) we do not specify the total number of grid points in t (as we did with the grid in x ); t is an initial value variable since it is ty pically time, and is defined ov er the semiinfinite interv al 0 ≤ t ≤ ∞ . http://www.scholarpedia.org/article/Partial_differential_equation

20/39

19/2/2014

Partial differential equation - Scholarpedia

Note that Eq. (49) ex plicitly giv es the solution at the adv anced point in t (at k + 1) and therefore it is an explicit finite difference approx imation of Eq. (41 ). We can now consider using Eq. (49) to step forward from an initial condition (IC) required by Eq. (41 ). Here we take as the initial condition w(x, t = 0) = Ae

−(μ/D)x

+ B

(50)

where A, B, μ are constants to be specified. The finite difference form of Eq. (50) is w

(note that k

= 0

at t =

0

0 i

= Ae

−(μ/D)x i

+ B

(51)

).

We must also specify two boundary conditions (BCs) for Eq. (41 ) (since it is second order in x ). We will use the Dirichlet BC at x = 0 w(x = 0, t) = Ae

for which the finite difference form is (note that i = w

We use the Neumann BC at x

k 1

= Ae

at

1

−(μ/D)(−μt)

x = 0

−(μ/D)(−μt

k

+ B

(52)

)

)

+ B

(53)

= 1

∂ w(x = 1, t) = A(−μ/D)e

−(μ/D)(1−μt)

(54)

∂x

for which the finite difference form is (note that i = w

k N +1

= w

k N −1

N

at x

= 1

+ 2ΔxAe

)

−(μ/D)(−μt

where w is a fictitious value that is outside the interv al 0 (49) for i = N . N +1

k

)

≤ x ≤ 1 ;

+ B

it can be used to eliminate w

(55)

N

in Eq.

Equations (49), (51 ), (53) and (55) constitute the full sy stem of equations for the calculation of the numerical solution to Eq. (41 ). Note that we hav e replaced the original PDE, Eq. (41 ), with a set of approx imating algebraic equations (Eqs. (49), (51 ), (53) and (55)) which can easily be programmed for a computer. Also, an analy tical solution to Eq. (41 ) (see particular solutions to the heat equation) can be used to ev aluate the numerical solution 2

w(x, t) = Ae

(1/D)(μ

t±μx)

+ B

(56)

+ B

(57)

Equation (56) can be stated in the alternativ e form w(x, t) = Ae

−(μ/D)(x−μt)

which corresponds to a trav eling wav e solution since x and t appear in the combination x − μt . A short MATLAB program is listed in Appendix 1 based on Eqs. (49), (51 ), (53) and (55). Representativ e output from this program that compares the numerical solution from Eqs. (49), (51 ), (53) and (55) with the analy tical solution, Eq. (57 ), indicates that the two solutions are in agreement to fiv e figures, as reflected in Table 1 . http://www.scholarpedia.org/article/Partial_differential_equation

21/39

19/2/2014

Partial differential equation - Scholarpedia

T able 1: Com parison of the num erical and analy tical solutions at x = x /2 = 0.5 produced by the program in Appendix 1; w , l

num erical solution from Eqs. (49), (51), (53) and (55); wa, analy tical solution of Eq. (57 ) t = 0.05

w(x=xl/2,t) = 1.6376

wa(x=xl/2,t) = 1.6376

t = 0.10

w(x=xl/2,t) = 1.6703

wa(x=xl/2,t) = 1.6703

t = 0.15

w(x=xl/2,t) = 1.7047

wa(x=xl/2,t) = 1.7047

t = 0.20

w(x=xl/2,t) = 1.7408

wa(x=xl/2,t) = 1.7408

t = 0.25

w(x=xl/2,t) = 1.7788

wa(x=xl/2,t) = 1.7788

t = 0.30

w(x=xl/2,t) = 1.8187

wa(x=xl/2,t) = 1.8187

t = 0.35

w(x=xl/2,t) = 1.8607

wa(x=xl/2,t) = 1.8607

t = 0.40

w(x=xl/2,t) = 1.9048

wa(x=xl/2,t) = 1.9048

t = 0.45

w(x=xl/2,t) = 1.9512

wa(x=xl/2,t) = 1.9512

t = 0.50

w(x=xl/2,t) = 2.0000

wa(x=xl/2,t) = 2.0000

The parameters that produced the numerical output in Table 1 are listed in Table 2. T able 2: Num erical v alues of param eters used in the program of Appendix 1 that produced the output of T able 1 Parameter

Description

V alue

D

diffusiv ity in Eq. (41 )

1

constants in Eqs. (50)-(57 )

1, 1, 1

number of grid points and length in x

21 , 1

grid spacing in t, final v alue of t

0.001 , 0.5

μ

,

,

A B

N

,

,

xl

h tf

Additional parameters follow from the v alues in Table 2. Thus, the grid spacing in x is Δx = 1/(21 − 1) = 0.05 . The number of steps in t taken along the solution is 0.5/0.001

= 500 .

Some of the parameters, particularly N and h , were determined by trial and error to achiev e a numerical solution of acceptable accuracy (e.g., fiv e significant figures). We can note two additional points about these v alues: Acceptable v alues of N and h could be determined by observ ing the errors in the numerical solution through comparison with the ex act solution (Eq. (57 )) as illustrated in Table 1 . Howev er, in most PDE applications, an analy tical solution is not av ailable for assessing the accuracy of the numerical solution, and in fact, the motiv ation for using a numerical method is generally to produce a solution when an analy tical solution is not av ailable. In this case (no analy tical solution), a useful procedure for estimating the numerical accuracy is to compute solutions for two different v alues of N and compare the numerical v alues. If the two solutions do not agree to an acceptable lev el, a third solution is computed with a still larger N (smaller grid spacing in x ) and again the solutions are compared. Ev entually , if spatial convergence is achiev ed, successiv e solutions will agree to the required accuracy . In this case, the accuracy of the numerical solution is inferred, but the ex act error is not computed (or ev en known) when an analy tical solution is not av ailable. The same reasoning can be applied for temporal convergence with respect to t , i.e., h is reduced until the successiv e solutions agree to a specified lev el. The preceding discussion was directed to achiev ing acceptable accuracy. Additionally , the v alues of N and h were selected to achiev e a stable solution. The criterion for stability in the case of Eq. (49) (for parabolic PDE (41 )) is α = DΔt/Δx < 1/2 . For the solution of Table 1 , 2

2

http://www.scholarpedia.org/article/Partial_differential_equation α = 1 × 0.001/ = 0.4 < 0.5 .

22/39

19/2/2014

Partial differential equation - Scholarpedia

= 0.4 < 0.5 . If the critical v alue of the dimensionless parameter α = 0.5 had been ex ceeded, the numerical solution would hav e become unstable (as manifest in numerical v alues of ev er increasing magnitude). This conclusion can easily be confirmed by running the program of Appendix 1 for a choice of N and h for which α > 0.5 . The stability constraint α < 0.5 is a distinctiv e feature of the ex plicit finite difference approx imation of Eq. (49). Thus, as Δx is reduced ( N increased) to achiev e better accuracy in the numerical solution, h must also be reduced to maintain stability ( α = Dh/Δx < 0.5 ). α = 1 × 0.001/ 0.05

2

2

Finally , some descriptiv e comments about the details of the program in Appendix 1 are giv en immediately after the program listing.

Hyperbolic PDE We now consider a numerical solution to the one-dimensional hy perbolic wav e equation ∂

2

w

∂t

2



w



2

∂x

= 0

2

(58)

We again hav e an analy tical solution to ev aluate the numerical solution. First, we include a v elocity , c, in the equation: ∂

2

w

∂t

2

2

= c



2

w

∂x

(59)

2

Note that c has the MKS units of m/s as ex pected and as inferred from Eq. (59) (note the units of the deriv ativ es in x and t). Since Eq. (59) is second order in x and t, it requires two ICs and two BCs. We will take these as: w(x, t = 0) = e

−λx

2

(60)

∂ w(x, t = 0) = 0

(61)

w(x → ∞, t) = 0

(62)

w(x → −∞, t) = 0

(63)

∂t

Equation (60) indicates the IC is a Gaussian pulse with the positiv e constant λ to be specified. Equation (61 ) indicates w(x, t) starts with zero "v elocity ". Equations (62)–(63) indicate that the solution w(x, t) does not depart from the initial v alue of zero specified by IC (60)–(61 ). In other words, λ is chosen large enough that the IC is effectiv ely zero at x = ±∞ and remains at this v alue for subsequent t . An important difference between the parabolic problem of Eq. (41 ) and the hy perbolic problem of Eq. (59) is that the former is first order in t while the latter is second order in t . Therefore, in order to dev elop a numerical method for Eq. (58) (or Eq. (59)), we need an algorithm that can accommodate second deriv ativ es in t . While such algorithms do ex ist, they generally are not required. Rather, we can ex press a PDE second order in t as two PDEs first order in t . For ex ample, Eq. (59) can be written as ∂w = u

(64)

∂t

http://www.scholarpedia.org/article/Partial_differential_equation

23/39

19/2/2014

Partial differential equation - Scholarpedia

∂u

2



2

w

= c ∂t

∂x

(65)

2

Equations (64)–(65) are first order in t , and therefore an integration algorithm for first order equations, such as the Euler method of Eq. (48), can be used to mov e w(x, t) and u(x, t) forward in t . Thus, the fully discretized form of Eqs. (64)–(65) can be written as w

u

ICs (60)–(61 ) become (with k

= 0

k+1 i

= u

k i

k+1

= w

i

2

w

+ hc

k i

+ hu

k i+1

k

− 2w Δx

corresponding to t = w

0 i

= e

u

0 i

0

(66)

i

k i

+ w

k i−1

(67)

2

)

−λx

2

(68)

i

= 0

(69)

For BCs (62)–(63), the infinite interv al −∞ ≤ x ≤ ∞ must be replaced by a finite one −x ≤ x ≤ x (since computers can accommodate only finite numbers) where x is selected so that it is effectiv ely infinite; that is, the solution w(x, t) does not depart from IC (60) at x = −x , x for t > 0 . The v alue of x and the corresponding number of grid points in x , N , are specified subsequently . l

l

l

l

l

l

The finite difference approx imations of BCs (62)–(63) are w

w

k 1

k N

= 0

(70)

= 0

(71)

Equations (66), (67 ), (68), (69), (7 0), (7 1 ) constitute the complete finite difference approx imation of Eqs. (64), (65), (60), (61 ), (62), (63). A small MATLAB program for this approx imation is giv en in Appendix 2, including some descriptiv e comments immediately after the program. The general analy tical solution to Eq. (59) can be written as (see also here) w(x, t) =

Let us take φ

= ψ

1 2

[φ(x + ct) + ψ(x − ct)]

(72)

in the form of the Gaussian pulse of Eq. (60), i.e., w(x, t) =

1 2

[e

−λ(x+ct)

2

+ e

−λ(x−ct)

2

]

(73)

The plotted output from the program is giv en in Figure 1 and includes both the numerical solution of Eqs. (66), (67 ), (68), (69), (7 0), (7 1 ) and the analy tical solution of Eq. (7 3). http://www.scholarpedia.org/article/Partial_differential_equation

24/39

19/2/2014

Partial differential equation - Scholarpedia

We can note the following points about Figure 1 : The initial Gaussian pulse at t = 0 (centered at x = 0 with unit max imum v alue) splits into two pulses trav eling left and right with v elocity c = 1 and max imum v alue of 0.5 according to Eq. (7 3). The pulses trav eling left are centered at x = −10, −20, −30 corresponding to t = 10, 20, 30 since c = 1 . The pulses trav eling right are centered at x = 10, 20, 30 corresponding to t = 10, 20, 30 . These properties are characteristic of the trav eling wav e functions of Eq. (7 3) with arguments x + ct and x − ct, respectiv ely . In fact, the use of the word characteristic is Fig u r e 1 : Com pa r ison of t h e n u m er ica l a n d a n a ly t ica l solu t ion s for particularly appropriate since the t = 0, 10, 20, 30 pr odu ced by t h e pr og r a m in A ppen dix 2 ; w , relations x + ct = κ and n u m er ica l solu t ion fr om Eqs. (6 6 ), (6 7 ), (6 8 ), (6 9 ), (7 0 ), (7 1 ); w a , x − ct = κ, where κ is a constant, a n a ly t ica l solu t ion of Eq. (7 3 ) are termed the characteristics of Eq. (59). Note that at the points along the solution giv en by these characteristics, the solution has a constant v alue. For ex ample, for the peak v alues in Figure 1 , κ = 0 and the solution is constant at the peak v alue 0.5 for x + ct = x − ct = 0 . The solution remains at zero for x infinite interv al −∞ ≤ x ≤ ∞ .

= x l = 50

so that the interv al −50

≤ x ≤ 50

is equiv alent to the

The parameters that produced the numerical output in Figure 1 are listed in Table 3. T able 3: Num erical v alues of param eters used in the program of Appendix 2 that produced the output of Figure 1 Parameter

Description

V alue

c

v elocity in Eq. (59)

1

λ

constant in Eqs. (60), (68), (7 3)

0.05

number of grid points and half length in x

201 , 50

grid spacing in t , final v alue of t

0.0025, 30

N h

,x ,t

f

l

Additional parameters follow from the v alues in Table 3. Thus, the grid spacing in x is Δx = 2 × 50/(201 − 1) = 0.5 .The number of steps in t taken along the solution is 30/0.0025 which is large, but was selected to achiev e good accuracy in the numerical solution.

= 12000

,

To ex plore the accuracy of the numerical solution, we can consider the peak v alues of w(x, t) in Figure 1 . This is a stringent test of the numerical solution since the curv ature of the solution is greatest at these peaks. The results are summarized in Table 4.

http://www.scholarpedia.org/article/Partial_differential_equation

25/39

19/2/2014

Partial differential equation - Scholarpedia

T able 4: Num erical v alues of w(x, t) at the peak v alues display ed in Figure 1 t

−x, x

Peak v alues

0

0

1

1 0 -1 0, 1 0 0.5006, 0.5006 20 -20, 20 0.501 1 , 0.501 1 30 -30, 30 0.501 5, 0.501 5 Of course, the peak analy tical v alues giv en by Eq. (7 3) are w(x = 0, t = 0) = 1 , w(x = ±t, t > 0) = 0.5 . Table 4 indicates these peak v alues were attained within 0.501 5 ev en for the largest v alue of t (= 30) so that errors did not accumulate ex cessiv ely as the solution progressed through t . These errors could be reduced by increasing the number of grid points in x abov e N = 201 . These errors could also presumably be reduced by using a more accurate (higher order) finite difference equation than the second order approx imation of Eq. (45); to this end, MATLAB routines for second, fourth, six th, eighth and tenth finite difference approx imations are giv en in Hamdi, et al. This ex plicit finite difference numerical solution also has a stability limit (like the preceding parabolic problem). In this case cΔt/Δx < 1

(74)

Stability constraint (7 4) is the Courant–Friedrichs–Lew y (or CFL) condition. For the present numerical solution, 1 × 0.0025/0.5 = 0.005 so the CFL condition is easily satisfied. In other words, the parameters of Table 3 were chosen primarily for accuracy and not stability . Nex t, we consider an elliptic problem.

Elliptic PDE The elliptic PDE (Laplace's equation) ∂

2

w

∂x

2



2

w

+ ∂y

2

= 0

(75)

has two boundary v alue independent v ariables, x and y , and no initial v alue v ariable. Thus, since the preceding numerical methods required an integration with respect to an initial v alue v ariable (t ), and was accomplished by Euler's method, Eq. (48), we cannot dev elop a numerical solution for Eq. (7 5) directly using these methods. Rather, we will conv ert Eq. (7 5) from an elliptic problem to an associated parabolic problem by adding a deriv ativ e in an initial v alue v ariable. Thus, the PDE we will now consider is ∂w



2

w

= ∂t

∂x

2



2

w

+ ∂y

2

(76)

The idea then is to integrate Eq. (7 6) forward in t until the numerical solution approaches the condition ∂w ∂t

→ 0

so that Eq. (7 6) then rev erts back to Eq. (7 5), i.e., the solution under this condition is for Eq. (7 5) as

required.

http://www.scholarpedia.org/article/Partial_differential_equation

26/39

19/2/2014

Partial differential equation - Scholarpedia

Equation (7 6) is first order in t , and second order in x and y . It therefore requires one IC and two BCs (for x and y ). For the IC, since t has been added to the problem only to prov ide a solution to Eq. (7 5) through Eq. (7 6), the choice of an IC is completely arbitrary (it is not part of the original problem). For the present analy sis, we will use w(x, y, t = 0) = κ

(77)

where κ is a constant to be selected (logically , it should be in the neighborhood of the ex pected solution to Eq. (7 5), but it's precise v alue is not critical to the success of the numerical method). For the two BCs in x , we will use homogeneous (zero) Dirichlet BCs

where x is the upper boundary v alue of x

w(x = 0, y, t) = 0

(78)

w(x = x l , y, t) = 0

(79)

.

l

For the first BC in y , we will use a homogeneous Neumann BC ∂ w(x, y = 0, t) = 0

(80)

∂y

For the second BC in y , we will use a nonhomogeneous Neumann BC ∂ w(x, y = y , t) l

= sin(πx) π sinh(π y )

(81)

l

∂y

where y is the upper boundary v alue of y . Note that

∂ w(x, y = y ) l

l

in BC (81 ) is a function of x

.

∂y

The analy tical solution to Eqs. (7 5) (note, not Eq. (7 6)), (7 8)–(81 ) is a special case of one of the solutions stated prev iously w(x, y) = sin(πx) cosh(πy)

(82)

The analy tical solution of Eq. (82) will be used to ev aluate the numerical solution. To dev elop a numerical solution to Eq. (7 6), we first replace all of the deriv ativ es with finite differences in analogy with the preceding numerical solutions. The positions in x , y and t will be denoted with indices i , j and k , respectiv ely . The corresponding increments are Δx , Δy and h . Application of these ideas to Eq. (7 6) giv es the finite difference approx imation

w

k+1 i,j

= w

k i,j



w

k i+1,j

− 2w

k i,j

+ h ⎝

i = 1, 2, … , N x ;

Δx

+ w

k

w

i−1,j

k i,j+1

− 2w

+

2

Δy

j = 1, 2, … , N y ;

k i,j

+ w

2

k = 1, 2, …

k i,j−1

⎞ ⎠

(83)

BCs (7 8)–(7 9) in the difference notation are http://www.scholarpedia.org/article/Partial_differential_equation

k

= 0

(84) 27/39

19/2/2014

Partial differential equation - Scholarpedia w

w

k

= 0

1,j

k Nx ,j

(84)

= 0

(85)

BC (80) in difference notation is w

where w

k i,0

k i,0

= w

k

(86)

i,2

is a fictitious v alue that can be used in Eq. (83) for j =

1 .

BC (81 ) in difference notation is w

where w

k i, Ny +1

k i, Ny +1

= w

k i, Ny −1

+ 2 Δy sin(π x i ) π sinh(π y

is a fictitious v alue that can be used in Eq. (83) for

Ny

)

(87)

j = Ny .

A short MATLAB program for Eqs. (83), (84), (85), (86) and (87 ) is listed in Appendix 3, followed by some ex planatory comments. The output from this program is listed in Table 5.

w(x =

T able 5: Num erical v alues of x /2, y = y /2, t) from the program in Appendix 3 l

l

t

w(x l /2, y /2, t)

0.1 0

1 .6254

0.20

2.1 7 85

0.30

2.3883

0.40

2.4664

0.50

2.4956

0.60

2.5064

0.7 0

2.51 05

0.80

2.51 20

0.90

2.51 25

1 .00

2.51 27

l

The midpoint v alues w(x = x /2, y = y /2, t) are listed in Table 5. The conv ergence of the solution of Eq. (7 6) to that of Eq. (7 5) is apparent, e.g., at t = 1 , w(x = x /2, y = y /2, t) = 2.5127 while the v alue from the analy tical solution, Eq. (82), is w (x = x /2, y = y /2) = 2.5092 ; the difference is (2.5127 − 2.5092)/2.5092 × 100 = 0.14% . Of course, the agreement will not be perfect because of the approx imations used in Eqs. (83), (84), (85), (86) and (87 ). The parameters that produced the numerical output in Table 5 are listed in Table 6. l

l

l

a

http://www.scholarpedia.org/article/Partial_differential_equation

l

l

l

28/39

19/2/2014

Partial differential equation - Scholarpedia

T able 6: Num erical v alues of param eters used in the program of Appendix 3 that produced the output of T able 5 Parameter Nx

,x

Ny

,y

,

h tf

l

l

Description

V alue

number of grid points and half length in x

21 , 1

number of grid points and half length in y

21 , 1

grid spacing in t, final v alue of t

0.0005, 1

Additional parameters follow from the v alues in Table 6. Thus, the grid spacing in x is Δx = 1/(21 − 1) = 0.05 . Similarly the spacing in y is Δy = 0.05 . The spacing in x and y could be different if the v ariation of the solution u(x, y, t) in one direction is substantially greater than in the other; in other words, some tuning of the 2D grid in x and y could be required. The number of steps in t taken along the solution is 1/0.0005 = 2000 , which is large, but was selected to achiev e good accuracy in the numerical solution. The stability constraint for the 2D problem of Eq. (7 6) (with a constant D multiply ing the deriv ativ es in x and y ) is 1 D( Δx

For the preceding solution, 1 × (1/ 0.05

2

1 2

+ 1/ 0.05

+ Δy

2

1 2

)h < 2

which meets the stability constraint.

) × 0.0005 = 0.4

The procedure of adding a deriv ativ e in t to elliptic Eq. (7 5), then solv ing the resulting parabolic problem, Eq. (7 6), is termed the method of false transients or the method of pseudo transients to suggest that the parabolic problem appears to hav e a transient phase that is not part of the original elliptic problem. The actual path that the parabolic problem takes to the solution of the elliptic problem is not relev ant so long as the parabolic solution conv erges to the elliptic solution. In the present case, κ in IC (7 7 ) was taken as 1 . Some other trial v alues indicated that this initial v alue is not critical (but it should be as close to the final v alue, for ex ample 2.5092, as knowledge about the final v alue can prov ide). Also, t can be considered a parameter in the solution of Eq. (7 6). This parametrization is an ex ample of continuation in which the solution is continued from the giv en (assumed) starting v alue of Eq. (7 7 ) to the final v alue of 2.51 27 . The concept of continuation has been applied in many forms (and not just through the addition of a deriv ativ e as in Eq. (7 6)). In general, the errors in the numerical solution of PDEs can result from the limited accuracy of all of the approx imations used in the calculation. For ex ample, the 0.1 4% error in the preceding solution can result from the discretization errors in x , y and t in Eqs. (83), (84), (85), (86) and (87 ). In formulating a numerical method or algorithm for the solution of a PDE problem, it is necessary to balance the discretization errors so that one source of error does not dominate, and generally degrade, the numerical solution. This might, for ex ample, require the choice of balanced v alues for N , N and h . The effect of the numbers of discretization points generally can be inferred by v ary ing these numbers and observ ing the effect on the numerical solution. x

y

Remarks Thus, control of approx imation errors is central to the calculation of a numerical solution of acceptable accuracy . In the preceding ex amples, this control of errors can be accomplished in three way s: 1 . The number of grid points can be v aried. Since in the numerical analy sis literature, the grid spacing is often giv en the sy mbol h (as in Eq. (48)), sy stematic v ariation of the grid spacing to inv estigate http://www.scholarpedia.org/article/Partial_differential_equation

29/39

19/2/2014

Partial differential equation - Scholarpedia

accuracy is usually termed h refinement. 2. The order of the approx imation can be v aried. For ex ample, Euler's method of Eq. (48) is O(h ) (second order correct) for one step or O(h) (first order correct) for a series of steps ov er a complete solution. In general, if the approx imation is of order O(h ) , it is termed p th order. The sy mbol p is frequently used in the numerical analy sis literature, and v ary ing the order p to inv estigate accuracy is referred to as p refinement. 2

p

3. The discretization errors can possibly be estimated and where the error is considered too large, the numerical algorithm can automatically insert grid points. Bey ond that, the grid spacing does not hav e to be uniform, e.g., h in Eq. (48) does not hav e to remain constant throughout the numerical solution, and the numerical algorithm can automatically v ary the spacing to concentrate the grid points where they are needed to achiev e acceptable accuracy . This form of refinement is termed usually r refinement; we mention r refinement only to initiate possible interest in more adv anced numerical methods. The three preceding numerical solutions were dev eloped using basic finite differences such as in Eqs. (45) and (48). Howev er, many approaches to approx imating deriv ativ es in PDEs hav e been dev eloped and used. Among these are finite elements, finite volumes, w eighted residuals, e.g., collocation, Galerkin and spectral methods. Each of these methods has adv antages and disadv antages, often according to the characteristics of the problem of interest (starting with the parabolic, hy perbolic and elliptic geometric classifications). Thus, an ex tensiv e literature for the numerical solution of PDEs is av ailable, and we hav e only presented here a few basic concepts and ex amples. The principal adv antage of numerical methods applied to PDEs is that, in principle, PDEs of any number and complex ity can be solv ed which is particularly useful when analy tical solutions are not av ailable. To illustrate how this might be done, the heat conduction equation with a nonlinear source term f(w) can easily be programmed by ex tending Eq. (49) to

w

k+1 i

w = w

k i

+ h[D

k

− 2w

i+1

Δx

k i

+ w

k i−1

k

+ f(w )]

(88)

i

2

where f(w) could be a MATLAB function to compute the nonlinearity in w(x, t) . Alternativ ely , the nonlinearity could be programmed directly in Eq. (88). For ex ample, for a second order reaction,

w

k+1 i

w = w

k i

+ h[D

k

− 2w

i+1

Δx

k i

+ w

k i−1

k

2

+ (w ) ]

(89)

i

2

Note in particular how easily the nonlinearity is programmed. As another ex ample, a solution to the Burgers equation could be computed by ex tending Eq. (49) (with D = 1 ) to

w

k+1 i

w = w

k i

+ h[

k i+1

− 2w Δx

k i

+ w

k i−1

2

w − w

k i

k i+1

− w

k i−1

]

(90)

2 Δx

where we hav e used the second order central finite difference approx imation w

∂w ≈ ∂x

k i+1

− w

k i−1

2 Δx

Again, the nonlinear term in the Burgers equation is easily programmed as

k

http://www.scholarpedia.org/article/Partial_differential_equation w





k

30/39

19/2/2014

Partial differential equation - Scholarpedia w

∂w w

≈ w ∂x

k i

k i+1

− w

k i−1

2 Δx

Finally , to conclude this introductory discussion of the numerical solution of PDEs, we used in the v arious ex amples integration with respect to an initial v alue v ariable, t , by using the Euler method of Eq. (48). While Euler's method is general with respect to the form of the initial v alue integration, it does hav e two important limitations: The accuracy is first order (O(h)) and is therefore ex act only for functions that v ary linearly in t ; for higher order v ariations in t , it is only approx imate and generally requires a small h to achiev e acceptable accuracy . One way around this accuracy limitation is to use a higher order integration algorithm in t such as the Runge-Kutta method (e.g., see the article by Shampine et al). Stability limits the step h , such as in the stability constraint for Eq. (49), α = DΔt/Δx < 1/2 . Such stability constraints for ex plicit integration methods such as Eq. (48) can be circumv ented by using an implicit integration method, often termed a stiff method. We will not pursue v arious ty pes of initial v alue integration methods here, but additional information is av ailable (Shampine et al). 2

Thus, the Euler method is limited by both accuracy and stability. To circumv ent these constraints, initial v alue integrators are used which are higher order (for improv ed accuracy ) and stable (to prov ide a larger stable step h that may actually be unlimited, depending on the integrator and the application). As might be ex pected, such higher order methods are more complicated than the Euler method, but fortunately , they hav e been programmed in library routines that can easily be called and used. As an ex ample, the MATLAB integrator ode15shas the following features: Good stability (it is a stiff integrator). The enhanced stability is achiev ed through implicit integration that requires the solution of algebraic equations at each step along the solution (each step of length h ). An option for ode15sin the solution of the algebraic equations is the use of sparse matrix methods that are v ery efficient for large algebraic sy stems. V ariable step and order, so that it automatically performs h and

p

refinement as the solution ev olv es.

Library routines such as ode15sare written by ex perts who hav e included features that make them robust and reliable. Further, these routines hav e been used ex tensiv ely and are therefore thoroughly tested. The use of library routines for initial v alue integration is the basis for much of the work in the numerical method of lines solution of PDEs. This approach has been applied to a broad spectrum of PDE problems in 1 D, 2D and 3D, including all of the major classes of PDEs (e.g., parabolic, hy perbolic and elliptic) in v arious orthogonal coordinate sy stems (e.g., Cartesian, cy lindrical and spherical). The use of quality library routines prov ides an important step in the timely dev elopment of computer codes for new applications of PDEs whereby the analy st can take adv antage of the work of ex perts, which is generally much more efficient and reliable than dev eloping codes starting with just a general programming language.

Appendix 1. MATLAB program for a parabolic PDE The MATLAB program that produced the results described in the Parabolic PDE for equation (41 ) follows. clear all; clc D=1; mu=1; A=1; B=1; nx=21; xl=1; dx=0.05; x=[0:0.05:xl]; nx2=11; nt=50; nout=10; h=0.001; t=0; for i=1:nx; w(i)=A*exp(1/D*(mu^2*t-mu*x(i)))+B; end for i1=1:nout for i2=1:nt for i=1:nx if(i==1)w(1)=A*exp(1/D*(mu^2*t-mu*x(1)))+B; wt(1)=0; http://www.scholarpedia.org/article/Partial_differential_equation

31/39

19/2/2014

Partial differential equation - Scholarpedia

elseif(i==nx)wf=w(nx-1)+(2*dx)*A*(-mu/D)*exp(1/D*(mu^2*t-mu*x(nx))); wt(nx)=D*(wf-2*w(nx)+w(nx-1))/dx^2; else wt(i)=D*(w(i+1)-2*w(i)+w(i-1))/dx^2; end end w=w+wt*h; t=t+h; end fprintf('t = %4.2f w(x=xl/2,t) = %6.4f wa(x=xl/2,t) = %6.4f\n', ... t, w(nx2), A*exp(1/D*(mu^2*t-mu*x(nx2)))+B); end Listing 1 : MATLAB program for the numerical solution of Eqs. (41 ), (50), (52), and (54) We can note the following points about this program: Any prev ious files are first cleared. Then the parameters for the numerical solution of Eq. (41 ) are defined numerically as in Table 2. Note that a grid in x is set up as x = 0, 0.05, 0.10, … , 1 . clear all; clc D=1; mu=1; A=1; B=1; nx=21; xl=1; dx=0.05; x=[0:0.05:xl]; nx2=11; nt=50; nout=10; h=0.001; t=0; IC (51 ) is then implemented in a forloop (note that t=0). for i=1:nx; w(i)=A*exp(1/D*(mu^2*t-mu*x(i)))+B; end Three nested forloops step Eq. (49) through x and

t

for i1=1:nout for i2=1:nt for i=1:nx Specifically , the outer loop (in it) giv es the nout = 10outputs in Table 1 . Within each output interv al (0.05), 50 steps in t are taken by the loop in i2(in this way , the 500 steps in t produce outputs at only 1 0 points as display ed in Table 1 ). Within the loop in i, x spans the interv al 0

≤ x ≤ 1 .

BC (53) is programmed (at i=1) as if(i==1)w(1)=A*exp(1/D*(mu^2*t-mu*x(1)))+B; wt(1)=0; Also, since w(x = 0, t) is specified by BC (52), the t deriv ativ e of this boundary v alue is set to zero so that the integration in t at x = 0 does not mov e w(x = 0, t) from its prescribed v alue, i.e., wt(1)=0;). BC (55) is used to calculate the fictitious point wfwhich is then used in the finite difference calculation of Eq. (46). elseif(i==nx)wf=w(nx-1)+(2*dx)*A*(-mu/D)*exp(1/D*(mu^2*t-mu*x(nx))); wt(nx)=D*(wf-2*w(nx)+w(nx-1))/dx^2; For the interior points in x ( x

), Eq. (46) is programmed.

≠ 0, 1

else wt(i)=D*(w(i+1)-2*w(i)+w(i-1))/dx^2; end end http://www.scholarpedia.org/article/Partial_differential_equation

32/39

19/2/2014

Partial differential equation - Scholarpedia

The second endterminates the inner loop in i, so that all of the v alues of x are handled. Euler's method, Eq. (48), is then used to adv ance the solution through nt=50steps of length h

= 0.001

through the intermediate forloop in i2. w=w+wt*h; t=t+h; end Note the use of the matrix facility of MATLAB (wand wtare v ectors of length nx = 21). The endcompletes the intermediate loop in i2. The numerical solution is display ed to produce the output in Table 1 , including the analy tical solution of Eq. (56) fprintf('t = %4.2f w(x=xl/2,t) = %6.4f wa(x=xl/2,t) = %6.4f\n', ... t, w(nx2), A*exp(1/D*(mu^2*t-mu*x(nx2)))+B); end The endterminates the outer loop in i1.

Appendix 2. MATLAB program for a hyperbolic PDE The MATLAB program that produced the results described in the Hy perbolic PDE section for equation (58) (and Eq. (59)) follows. clear all; clc c=1; nx=201; xl=50; dx=0.5; x=[-xl:dx:xl]; nt=4000; nout=3; h=0.0025; t=0; for i=1:nx; w(i)=exp(-0.05*x(i)^2); wt(i)=0; ... wplot(1,i)=w(i); waplot(1,i)=exp(-0.05*x(i)^2); end for i1=1:nout for i2=1:nt for i=1:nx if(i==1) w( 1)=0; wt( 1)=0; wtt( 1)=0; elseif(i==nx)w(nx)=0; wt(nx)=0; wtt(nx)=0; else wtt(i)=c^2*(w(i+1)-2*w(i)+w(i-1))/dx^2; end end w=w+wt*h; wt=wt+wtt*h; t=t+h; end for i=1:nx wplot (i1+1,i)=w(i); waplot(i1+1,i)=0.5*(exp(-0.05*(x(i)-t)^2)+exp(-0.05*(x(i)+t)^2)); fprintf('\n %6.2f %6.2f,%8.4f %8.4f',t, x(i),wplot(i1+1,i),waplot(i1+1,i)); end end plot(x,wplot,'-',x,waplot,'o'); xlabel('x'); ylabel('w(x,t)'); title('w(x,t), t=0,10,20,30, solid - num, o - anal') Listing 2: MATLAB program for the numerical solution of Eqs. (59), (60)–(63) We can note the following points about this program: Any prev ious files are first cleared. Then the parameters for the numerical solution of Eq. (58) (or Eq. (59)) are defined numerically as in Table 3. Note that a grid in x is set up as x = −50, −49.5, … , 50, a total of 201 points. The choice of the upper and lower limits for x , was made so that domain in x is essentially infinite (it accommodates BCs (62)–(63), (7 0)–(7 1 ) as discussed subsequently ). http://www.scholarpedia.org/article/Partial_differential_equation

33/39

19/2/2014

Partial differential equation - Scholarpedia

clear all; clc c=1; nx=201; xl=50; dx=0.5; x=[-xl:dx:xl]; nt=4000; nout=3; h=0.0025; t=0; ICs (60)–(61 ), or (68)–(69), are then implemented in a forloop (note that t=0). for i=1:nx; w(i)=exp(-0.05*x(i)^2); wt(i)=0; ... wplot(1,i)=w(i); waplot(1,i)=exp(-0.05*x(i)^2); end

Both w(x, t) and

∂ w(x, t) ∂t

are programmed (as wand wt) which is required since Eq. (59) is second order in t

(as ex plained subsequently ). Also, the initial v alue of w(x, t = subsequent plotting (so that the plot will include IC (60)).

, both numerical and analy tical, is stored for

0)

Three nested forloops step Eqs. (66) and (67 ) through x and

t

for i1=1:nout for i2=1:nt for i=1:nx Specifically , the outer loop (in it) giv es the nout = 3outputs in Table 3. Within each output interv al (1 ), 4000 steps in t are taken by the loop in i2(in this way , the 4000 steps in t produce outputs at only 3 points as display ed in Figure 1 ). Within the loop in i, x spans the interv al −50

≤ x ≤ 50 .

BCs (62)–(63), or (7 0)–(7 1 ), are programmed (at i=1and i=nxcorresponding to

x = ±∞

) as

if(i==1) w( 1)=0; wt( 1)=0; wtt( 1)=0; elseif(i==nx)w(nx)=0; wt(nx)=0; wtt(nx)=0; Also, since w is specified by BCs (62)–(63), the first and second deriv ativ es in t of these boundary v alues are set to zero so that the integration in t does not mov e w from its zero v alues. For the interior points in x ( x

), Eq. (65) (discretized in x ) is programmed.

≠ −50, 50

else wtt(i)=c^2*(w(i+1)-2*w(i)+w(i-1))/dx^2; end end The second endterminates the inner loop in i, so that all of the v alues of x are handled. Euler's method (Eq. (48)) is then used to adv ance the solution through nt=4000steps of length h = 0.0025

through the intermediate forloop in i2according to Eqs. (66) and (67 ).

w=w+wt*h; wt=wt+wtt*h; t=t+h; end Note the use of the matrix facility of MATLAB (w, wtand wttare v ectors of length nx = 201). The end completes the intermediate loop in i2. The numerical and analy tical solutions are then stored at t = loop in i1) followed by plotting (of Figure 1 ). http://www.scholarpedia.org/article/Partial_differential_equation

10, 20, 30

(three passes through the outer

34/39

19/2/2014

Partial differential equation - Scholarpedia

for i=1:nx wplot (i1+1,i)=w(i); waplot(i1+1,i)=0.5*(exp(-0.05*(x(i)-t)^2)+exp(-0.05*(x(i)+t)^2)); fprintf('\n %6.2f %6.2f,%8.4f %8.4f',t, x(i),wplot(i1+1,i),waplot(i1+1,i)); end end plot(x,wplot,'-',x,waplot,'o'); xlabel('x'); ylabel('w(x,t)'); title('w(x,t), t=0,10,20,30, solid - num, o - anal') The final endterminates the outer loop in i1. Also, as a word of caution, the fprintfstatement display s the complete numerical solution at t = 10, 20, 30 so that the numerical solution can be ex amined in detail (the peak v alues reported in Table 4 were taken from this output); if the program in Listing 2 is ex ecuted, the fprintfstatement could be conv erted to a comment to reduce the numerical output.

Appendix 3. MATLAB program for an elliptic PDE The MATLAB program that produced the results described in the Elliptic PDE section for equation (7 5) follows. clear all; clc nx=21; xl=1; dx=0.05; x=[0:0.05:xl]; nx2=11; mu=pi/xl; ny=21; yl=1; dy=0.05; y=[0:0.05:yl]; ny2=11; nt=200; nout=10; h=0.0005; t=0; w=ones(nx,ny); for i1=1:nout for i2=1:nt for i=1:nx for j=1:ny if(i== 1) w( 1,j)=0; wt( 1,j)=0; elseif(i==nx)w(nx,j)=0; wt(nx,j)=0; elseif(j== 1)wt( i,1)=(w(i+1,j)-2*w(i,j)+w(i-1,j))/dx^2 ... +2*(w(i,2)-w(i,1))/dy^2; elseif(j==ny)wf=w(i,ny-1)+2*dy*mu*sin(mu*x(i))*sinh(mu*y(ny)); wt(i,ny)=(w(i+1,ny)-2*w(i,ny)+w(i-1,ny))/dx^2 ... +(wf-2*w(i,ny)+w(i,ny-1))/dy^2; else wt(i,j)=(w(i+1,j)-2*w(i,j)+w(i-1,j))/dx^2 ... +(w(i,j+1)-2*w(i,j)+w(i,j-1))/dy^2; end end end w=w+wt*h; t=t+h; end fprintf('t = %5.2f w(xl/2,yl/2,t) = %7.4f \n',t,w(nx2,ny2)) end fprintf('\n wa(xl/2,yl/2) = %7.4f\n',sin(mu*x(nx2))*cosh(mu*y(ny2))); Listing 3: MATLAB program for the numerical solution of Eqs. (7 6)–(81 ) We can note the following points about this program: Any prev ious files are first cleared. Then the parameters for the numerical solution of Eq. (7 6) are defined numerically as in Table 6. Note grids in x and y are set up as x = 0, 0.05, 0.10, … , 1, y = 0, 0.05, 0.10, … , 1 .

clear all; clc nx=21; xl=1; dx=0.05; x=[0:0.05:xl]; nx2=11; mu=pi/xl; ny=21; yl=1; dy=0.05; y=[0:0.05:yl]; ny2=11; nt=200; nout=10; h=0.0005; t=0;

http://www.scholarpedia.org/article/Partial_differential_equation

35/39

19/2/2014

Partial differential equation - Scholarpedia

IC (7 7 ) is then implemented as w=ones(nx,ny); k = 1 ×

in Eq. (7 7 ) is programmed with the MATLAB utility onesov er the entire grid in x and y , a total of nx

nypoints. Four nested forloops step Eq. (83) through x ,

y

and t

for i1=1:nout for i2=1:nt for i=1:nx for j=1:ny Specifically , the outer loop (in it) giv es the nout = 10outputs in Table 5. Within each output interv al (0.0005), 200 steps in t are taken by the loop in i2(in this way , the 2000 steps in t produce outputs at only 1 0 points as display ed in Table 5). Within the loop in i, x spans the interv al 0 j, y spans the interv al 0

≤ x ≤ 1

and within the loop in

≤ y ≤ 1 .

BC (7 8) is programmed (at i=1for j=1to j=ny) as if(i== 1)

w( 1,j)=0; wt( 1,j)=0;

Also, since w(x = 0, y, t) is specified by BC (7 8), the t deriv ativ e of this boundary v alue is set to zero so that the integration in t at x = 0 does not mov e w(x = 0, y, t) from its prescribed v alue, i.e., wt(1,j)=0;). BC (7 9) is programmed (at i=nxfor j=1to j=ny) as elseif(i==nx)w(nx,j)=0; wt(nx,j)=0; Equation (83) (with subsequent application of Euler's method) is programmed using BC (80) (at i=1to i=nxfor j=1) as elseif(j== 1)wt( i,1)=(w(i+1,j)-2*w(i,j)+w(i-1,j))/dx^2 ... +2*(w(i,2)-w(i,1))/dy^2; Note that we hav e used a finite difference approx imation of Eq. (80), w(i,0) = w(i,2), to eliminate the fictitious v alue w(i,0)in Eq. (83). Equation (83) (with subsequent application of Euler's method) is programmed using BC (81 ) (at i=1to i=nxfor j=ny) as elseif(j==ny)wf=w(i,ny-1)+2*dy*mu*sin(mu*x(i))*sinh(mu*y(ny)); wt(i,ny)=(w(i+1,ny)-2*w(i,ny)+w(i-1,ny))/dx^2 ... +(wf-2*w(i,ny)+w(i,ny-1))/dy^2; Note that we hav e used a finite difference approx imation of Eq. (81 ) to eliminate the fictitious v alue w(i,ny+1)=wfin Eq. (83). For the interior points in x ( x

) and

≠ 0, 1

http://www.scholarpedia.org/article/Partial_differential_equation

y

(x

), Eq. (83) (with subsequent application of Euler's

≠ 0, 1

36/39

19/2/2014

Partial differential equation - Scholarpedia

method) is programmed. else wt(i,j)=(w(i+1,j)-2*w(i,j)+w(i-1,j))/dx^2 ... +(w(i,j+1)-2*w(i,j)+w(i,j-1))/dy^2; end end end The second and third endstatements terminate the inner loops in iand j, so that all of the v alues of x and

y

are handled. Euler's method (Eq. (48)) is then used to adv ance the solution through nt=200steps of length h

= 0.0005

through the intermediate forloop in i2. w=w+wt*h; t=t+h; end Note the use of the matrix facility of MATLAB (wand wtare array s of dimensions nx = 21, ny = 21). The endcompletes the intermediate loop in i2. The numerical solution is display ed to produce the output in Table 5. fprintf('t = %5.2f end

w(xl/2,yl/2,t) = %7.4f \n',t,w(nx2,ny2))

The endterminates the outer loop in i1. The analy tical solution, Eq. (82), is then printed at the end (as reflected in Table 5). fprintf('\n wa(xl/2,yl/2) = %7.4f\n',sin(mu*x(nx2))*cosh(mu*y(ny2))); The programs in Listings 1 , 2 and 3 hav e an essential feature that should be pointed out: only the operations of storing and retriev ing numbers, arithmetic and looping are used (which are done naturally and v ery efficiently by computers). In other words, the integration of the three PDEs was not done by the usual analy tical mathematics, but rather, was done essentially with arithmetic. This is the essence of the numerical method, that is, to replace mathematics of differentiation and integration with something much simpler, but performed naturally by computers with ex traordinary speed and precision. This simplification was accomplished by replacing the partial deriv ativ es in the PDEs with algebraic approx imations, in this case, finite differences. A central question then is how accurate the numerical solution is if approx imations are used to compute it. We hav e observ ed the accuracy can be improv ed with more calculations (e.g., by reducing Δx , Δy and h ). In other words there is a tradeoff between accuracy and calculations, and we basically assume the computer can do enough calculations to achiev e the required accuracy . Historically , the increasing speed of computers has produced solutions to PDE problems with acceptable accuracy and continually increasing complex ity . Thus, for the future, we can ex pect to compute numerical solutions of PDEs with essentially unlimited complex ity if sufficient computing power is av ailable.

References http://www.scholarpedia.org/article/Partial_differential_equation

37/39

19/2/2014

Partial differential equation - Scholarpedia

R. Courant and D. Hilbert, Methods of Mathematical Physics. V olume 2. Partial Differential Equations, Wiley -V CH, 1 989. L. C. Ev ans, Partial Differential Equations, American Mathematical Society , Prov idence, 1 998. S. J. Farlow, Partial Differential Equations for Scientists and Engineers, Dov er Publications Inc., 1 993. F. John, Partial Differential Equations. Fourth Edition, Springer, 1 991 . J. Jost, Partial Differential Equations, Springer-V erlag, New Y ork, 2002. I. G. Petrov skii, Partial Differential Equations, W. B. Saunders Co., Philadelphia, 1 967 . Y . Pinchov er and J. Rubinstein, An Introduction to Partial Differential Equations, Cambridge Univ ersity Press, Cambridge, 2005. A. D. Poly anin, Handbook of Linear Partial Differential Equations for Engineers and Scientists, Chapman & Hall/CRC Press, Boca Raton, 2002. A. D. Poly anin and V . F. Zaitsev , Handbook of Nonlinear Partial Differential Equations, Chapman & Hall/CRC Press, Boca Raton, 2004. A. D. Poly anin, V . F. Zaitsev , and A. Moussiaux , Handbook of First Order Partial Differential Equations, Tay lor & Francis, London, 2002. D. L. Powers, Boundary V alue Problems, Fifth Edition: and Partial Differential Equations, Elsev ier Academic Press, 2005. W. E. Schiesser, Computational Mathematics in Engineering and Applied Science: ODEs, DAEs, and PDEs, CRC Press, Boca Raton, 1 993. I. Stakgold, Boundary V alue Problems of Mathematical Physics, V ols. I, II, SIAM, Philadelphia, 2000. A. N. Tikhonov and A. A. Samarskii, Equations of Mathematical Physics, Dov er Publ., New Y ork, 1 990. D. Zwillinger, Handbook of Differential Equations (3rd edition), Academic Press, Boston, 1 997 .

External links Partial Differential Equations: Exact Solutions at EqWorld: The World of Mathematical Equations [1 ] (http://eqworld.ipmnet.ru/en/pde-en.htm) Partial Differential Equations: Index of PDEs at EqWorld: The World of Mathematical Equations [2] (http://eqworld.ipmnet.ru/en/solutions/eqindex /eqindex -pde.htm) Partial Differential Equations: Methods at EqWorld: The World of Mathematical Equations [3] (http://eqworld.ipmnet.ru/en/methods/meth-pde.htm) Partial Differential Equation at Wolfram MathWorld by Eric Weisstein [4] (http://mathworld.wolfram.com/PartialDifferentialEquation.html) Example problems w ith solutions at Ex ampleProblems.com [5] (http://www.ex ampleproblems.com/wiki/index .php?title=Partial_Differential_Equations) General reference for numerical methods at Scholarpedia [6] (http://www.scholarpedia.org/article/Numerical_analy sis) Introduction to numerical methods for partial differential equations at Scholarpedia [7 ] (http://www.scholarpedia.org/article/Method_of_lines)

See also Boundary v alue problem

http://www.scholarpedia.org/article/Partial_differential_equation

38/39

19/2/2014

Partial differential equation - Scholarpedia

Sponsored by : Eugene M. Izhikev ich, Editor-in-Chief of Scholarpedia, the peer-rev iewed open-access ency clopedia Rev iewed by (http://www.scholarpedia.org/w/index .php? title=Partial_differential_equation&oldid=45583) : Anony mous Rev iewed by (http://www.scholarpedia.org/w/index .php? title=Partial_differential_equation&oldid=45583) : Dr. Daniel Zwillinger, Aztec Corporation Accepted on: 2008-08-1 3 02:29:1 3 GMT (http://www.scholarpedia.org/w/index .php? title=Partial_differential_equation&oldid=45583) Categories:

Dy namical Sy stems Applied Mathematics Numerical Analy sis This page w as las t m odified on 4 Novem ber 2011, at 15:56. This page has been acces s ed 136,749 tim es . Served in 1.334 s ecs . "Partial differential equation" by Andrei D. Polyanin, William E. Schies s er and Alexei I. Zhurov is licens ed under a Creative Com m ons AttributionNonCom m ercialShareAlik e 3.0 Unported Licens e. Perm is s ions beyond the s cope of this licens e are des cribed in the Term s of Us e

http://www.scholarpedia.org/article/Partial_differential_equation

39/39