• date post

06-Jun-2018
• Category

## Documents

• view

217

0

Embed Size (px)

### Transcript of Partial Differential Equations - tat. kokkotas/Teaching/Num_Methods... · PDF filePartial...

• Partial Differential Equations

Kostas Kokkotas

December 15, 2014

Kostas Kokkotas Partial Differential Equations

• Parabolic PDEs

We will present a simple method in solving analytically parabolic PDEs.The most important example of a parabolic PDE is the heat equation.For example, to model mathematically the change in temperature along arod. Lets consider the PDE:

u

t= 2

2u

x2for 0 x 1 and for 0 t

• Figure: Arrows indicating change in temperature according tout =

2uxx .

In order to find a solution we will assume that u(t, x) can be written asthe product of two functions T (t) and X (x) i.e.

u(t, x) T (t) X (x) (4)

Kostas Kokkotas Partial Differential Equations

• Substituting in eqn (1) we get:

T (t)X (x) = 2T (t)X (x) (5)

This relation can be written as:

T (t)

2T (t)=

X (x)

X (x)= 2 (6)

where is a proportionality constant.In this way we reduced the initial parabolic PDE into 2 ODEs

T 22T = 0 (7)X 2X = 0 (8)

with obvious solutions:

T (t) = C e22t (9)

X (x) = A sin(x) + B cos(x) (10)

Kostas Kokkotas Partial Differential Equations

• Then u(t, x) gets the form:

u(t, x) = Ce22t

[A sin(x) + B cos(x)

], (11)

by substituting C A A and C B B we get rid of the integrationconstant C .The two remaining constants of integration A and B will be furtherconstrained by the use of the boundary conditions (2). The boundary condition u(0, t) = 0 leads to B = 0, thus the solutionbecomes:

u(t, x) = Ae22t sin(x) , (12)

The 2nd boundary condition u(1, t) = 0 leads to:

e22t sin() = 0 sin() = 0 (13)

with the following allowed values of the constant :

= ,2,3, . . . i.e. = n for n = 1,2, . . . (14)

Kostas Kokkotas Partial Differential Equations

• Thus all functions of the form:

un(t, x) = Ane(n)2t sin(nx) for n = 1,2, . . . (15)

are solutions of the PDE (1), while the constants of integration Anshould be estimated by using the initial conditions provided by (3).

The general solution will be the sum of all solutions of the form (15),i.e. :

u(t, x) =n=1

Ane(n)2t sin(nx) for n = 1,2, . . . . (16)

The initial condition (3), u(0, x) = (x) can be written in the form:

(x) =n=1

An sin(nx) (17)

Kostas Kokkotas Partial Differential Equations

• The constants An can be found via the initial form of (x) by using theorthonality conditions of trigonometric functions, i.e.: 1

0

sin(nx) sin(mx)dx =

{0, m 6= n1/2, m = n

(18)

thus if we multiply (17) with sin(mx) (where m is any integer) andintegrate from 0 to 1 we get: 1

0

(x) sin(mx)dx = Am

10

sin2(mx)dx =1

2Am . (19)

Thus the constants An can be calculated by integration constants of theform:

An = 2

10

(x) sin(nx)dx (20)

and obviously they depend in a unique way on the initial form of thefunction (x).

Kostas Kokkotas Partial Differential Equations

• Left : evolution in time of u1(t, x) (for t = 0...0.4).

Right evolution in time of

u(t, x) =4

n=1

Ane(n)2t sin(nx)

(for t = 0...0.4) and (x) = sin(x).

Kostas Kokkotas Partial Differential Equations

• Hyperbolic PDEs - 1D

Here we will present an analytic method for solving 1D hyperbolicPDEs (1D wave equation)

utt = c2uxx (21)

This PDE can represent the oscillations of a string. The functionu(t, x) represents the deviation from equilibrium and the constant c thepropagation velocity of the waves.

For simplicity, we will consider that the string is fixed on both endsand its length is ` = 1.In other words the boundary conditions will be:

u(t, 0) = u(t, 1) = 0 for t 0 (22)

while the initial conditions are:

u(0, x) = (x) and ut(0, x) = (x) for 0 x 1 . (23)

Kostas Kokkotas Partial Differential Equations

• We will use again the technique used earlier for parabolic PDEs, i.e. wewill write the function u(t, x) as:

u(t, x) = T (t) X (x) (24)

where T is function of time t and X is function of the spatial dimensionx .By substitution in (21) we get:

T X = c2T X (25)

if we split the above equation appropriatelly we get:

1

c2T

T=

X

X= 2 where = constant (26)

T 2c2T = 0 (27)X 2X = 0 (28)

Kostas Kokkotas Partial Differential Equations

• The general solutions if the previous equations are:

T (t) = 1 cos(ct) + 2 sin(ct) (29)

X (x) = 1 cos(x) + 2 sin(x) (30)

but due to the boundary condition u(t, 0) = u(t, 1) = 0 we will getX (0) = X (1) = 0 which means that:

X (0) = 1 = 0 (31)

X (1) = 2 sin() = 0 (32)

The last equation will be satisfied , when

= n where n = 0, 1, 2, . . . (33)

which leads to an infinite number of solutions

Xn(x) = 2 sin(nx) . (34)

Kostas Kokkotas Partial Differential Equations

• Based on the previous discussion the expression for T (t) will be:

Tn(t) = 1,n cos(nct) + 2,n sin(nct) (35)

This means that there is an infinite number of solutions for the waveequation, and they have the form:

un(t, x) = Tn(t)Xn(x) = [An cos(nct) + Bn sin(nct)] sin(nx) (36)

where An = 1,n2 and Bn = 2,n2.In order to find a solution that satisfies the initial contitions (23) we willassume that the solution is given as a superposition of an infinite numberof solutions (or a subset of them) i.e. the solutions will be of the form

u(t, x) =n=1

Tn(t)Xn(x)

=n=1

[An cos(nct) + Bn sin(nct)] sin(nx) (37)

Kostas Kokkotas Partial Differential Equations

• From the 1st of the initial conditions (23) we get:

u(0, x) =n=1

An sin(nx) = (x) (38)

The constants An can be found as functions of the function describingthe initial deformation of the string i.e. the (x) by using theorthogonality properties of trigonometric functions i.e. 1

0

sin(nx) sin(mx)dx =

{0, m 6= n1/2, m = n

(39)

Thus if we multiply (38) with sin(mx) (where m is any number) andintegrate from 0 to 1 we get: 1

0

(x) sin(mx)dx = Am

10

sin2(mx)dx =1

2Am (40)

Kostas Kokkotas Partial Differential Equations

• Thus we conclude that the constants An will be found from integralequations of the form:

An = 2

10

(x) sin(nx)dx (41)

and obviously depend on a unique way on the form of (x).The 2nd initial condition will lead us in calculating the other unknownconstant i.e. the Bn. Thus by taking the derivative of (37) we get:

ut(t, x) = cn=1

n [Bn cos(nct) An sin(nct)] sin(nx) (42)

which for t = 0 will give us:

ut(0, x) = cn=1

nBn sin(nx) = (x) (43)

And thus:

Bn =2

n

10

(x) sin(nx)dx for n = 1, 2, . . . (44)

Which means that the solutions has been fully determined.

Kostas Kokkotas Partial Differential Equations

• Elliptic PDEs

Poissons equation2u(x , y , z) = f (x , y , z) (45)

is a fundamental ellipic PDE that can be met in various branches ofphysics e.g. gravity, electromagnetism etcWe will study this equation by using the techniques that we developed forthe other types of PDEs (parabolic, hyperbolic).NOTE: The solutions of elliptic PDEs are completle determined by theboundary conditions and thus we call them also boundary value problems.

Kostas Kokkotas Partial Differential Equations

• Dirichlet problem: we define the values of the function u on theboundaries of the domain.For example, consider the problem on finding the temperature at thevarious points of a 2D domain from the values that one can measure onthe boundaries. Neumann Problem: in this case we define the values of u/n onthe boundaries of the domain.For example, consider finding the continuous flow of e.g. electrons,energy etc, in the interior of domain where the flow is known only on theboundaries.

Figure: (left): Dirichlet problem with u(, ) = sin (right): Neumann problem

Kostas Kokkotas Partial Differential Equations

• Elliptic PDEs - 2D - Cartesian

Here we will present a solution of Poisson equation in Cartesiancoordinates with Dirichlet boundary conditions.

2u = uxx + uyy = 0 (46)

Dirichlet boundary conditions on a square.

u(0, y) = u(1, y) = 0 0 y 1 (47)u(x , 0) = 0 0 x 1 (48)u(x , 1) = g(x) 0 x 1 (49)

Kostas Kokkotas Partial Differential Equations

• We assume that the solution can be written in the form:

u(x , y) = X (x) Y (y) (50)

Then by substituting in Poisson equation (46) we get:

X (x)Y (y) + X (x)Y (y) = 0 (51)

X(x)

X (x)=

Y (y)

Y (y)= (52)

Thus we will consider the solution of two independent boundary value

problems.

Kostas Kokkotas Partial Differential Equations

• I

X (x) + 2X (x) = 0 where 0 < x < 1 and X (0) = X (1) = 0 ,(53)

this problems has the following eigenvalues:

2k = (k)2 , k = 1, 2, . . . , (54)

and the corresponding eigenfunctions:

Xk(x) = sin(kx) , k = 1, 2, . . . , (55)

I

Y (y) Y (y) = 0 where 0 < y < 1 and Y (0) = Y (1) = 0 ,(56)

The general solution of (56) for = 2, will be a linear combinationof ey and of ey and due to the boundary condition at y = 0 thesolution will get the form:

Y (y) = sinh(y) (57)

Kostas Kokkotas Partial Differential Equations

• Thus the partial solutions will have the form:

uk(x , y) = sin(kx) sinh(ky) , k = 1, 2, . . . , (58)

and the general solution will be a linear combination of the partial ones: