Assignment 1 Solution Sheet - Imperial College London

11

Transcript of Assignment 1 Solution Sheet - Imperial College London

Imperial College London

Department of Mathematics

Assignment 1

Assessed Coursework

as part of the courseM5N10 Computational Partial Di�erential Equations

Solution Sheet

Instructor:

Prof. Demetrios Papageorgiou

Imperial College London

London, February 23, 2012

1 PROBLEM 11 Problem 1

For all the problems in Assignment 1, but for the �rst two especially, I have madeextensive use of the recommended book by J.W. Thomas, as well as notes from class.

1.1 Subproblem 1.a

Perform a dissipation-dispersion analysis for the equation

ut + νuxxxx = 0 (1.1)

From theory, we expect that partial di�erential equations with only even ordered spatialderivatives will be dissipative and not involve propagating waves. We now conduct theformal analysis, which means assuming a solution of the form

u(x, t) = ueωt+βx (1.2)

where ω is the frequency and β is a wave number through which we can de�ne the wavelength, λ = 2π/β. Also, due to reasons of linearity we can simply assume the solutioncan simply be of the type

u(x, t) = A · ei(βx+ω(β)t) (1.3)

where A is a constant and we then try to �nd ω(β) of course. Standard di�erentiationleads to

∂tu(x, t) = iω(β)A · ei(βx+ω(β)t)

∂4

∂x4u(x, t) = Aβ4 · ei(βx+ω(β)t)

Putting everything together simply results in

iω(β)A · ei(βx+ω(β)t) = −νAβ4 · ei(βx+ω(β)t) (1.4)

and from this after cancellation of the exponential terms and the constants we can deducethe dispersion-dissipation relation

ω(β) = iνβ4 (1.5)

So u(x, t) = ue−νβ4teiβx.

First of all, the e�ect of dissipation is quite clear due to the overall negative constantfactor in front of t in the �rst exponent. Hence, in other words, we can see a decay intime. Also, we see that the wave does not move (no propagation). And since dispersion isde�ned in [1] as when Fourier modes of di�ering wave lengths or wave numbers propagate

at di�erent speeds and we concluded that there is no propagation at all here, we noticethat there is no dispersion.Also, note that if β = 0 we have a constant solution u = u not determined by equation

1.1.Conclusion: dissipative (if ν > 0, blow-up otherwise), non-dispersive equation.

2

2 PROBLEM 2

1.2 Subproblem 1.b

Perform a dissipation-dispersion analysis for the equation

ut + νuxxxxx = 0 (1.6)

The solution principle is exactly the same as before, and sine the properties (such aslinearity) are exactly the same, I will simply proceed with the same algorithm. The onlychange that we expect is that, due to the odd numbered derivative in x, we should obtaina nondissipative solution involving propagating waves, which will be dispersive (since theorder is 5, greater than 1, as pointed out in the book).So using again the form in equation (1.3) and running the di�erentiation we reach the

following results:∂

∂tu(x, t) = iω(β)A · ei(βx+ω(β)t)

∂5

∂x5u(x, t) = iAβ5 · ei(βx+ω(β)t)

The �nal equation to analyse is then

iω(β)A · ei(βx+ω(β)t) = −iνAβ5 · ei(βx+ω(β)t) (1.7)

which, again, after cancellation of similar terms, simply yields the dispersive-dissipationrelation

ω(β) = −νβ5 (1.8)

So u(x, t) = ue−iνβ5teiβx. Since ω(β) is purely real the solution is non-dissipative and

waves will propagate with a speed of −ω/β which in our case is νβ4. It is also dispersive,since modes associated with di�erent wave numbers propagate with di�erent values dueto the β4 term (also, if we take dω/dβ the value we obtain is not 0, further outlining thise�ect).Operating on the assumption that ν > 0, we can also say that the physical e�ects will

move from left to right in this situation and if ν changes sign they will move from left toright, similar to the analysis performed on ut = ±ux in class.Conclusion: non-dissipative, dispersive solution.

2 Problem 2

Perform a dissipation-dispersion analysis for the partial di�erential equation

ut + aux − ν1uxx + cuxxx = 0 (2.1)

where a, ν1, c are constants. Discuss individually the cases of ν1 > 0 and ν1 < 0.We start o� by the same type of analysis in problem 1 in order to describe a solution

of form u(x, t) = ueωt+βx. To this end, given that again the equation is linear, we areallowed to make the same assumption as in equation (1.3), namely u(x, t) = A ·ei(βx+ω(β)t)and start our analysis from here.

∂tu(x, t) = iω(β)A · ei(βx+ω(β)t)

3

3 PROBLEM 3

∂xu(x, t) = iAβ · ei(βx+ω(β)t)

∂2

∂x2u(x, t) = −Aβ2A · ei(βx+ω(β)t)

∂3

∂x3u(x, t) = −iAβ3 · ei(βx+ω(β)t)

The �nal equation is then

iω(β)A · ei(βx+ω(β)t) = −aiAβei(βx+ω(β)t) − ν1Aβ2ei(βx+ω(β)t) + icAβ3ei(βx+ω(β)t) (2.2)

After cancelling the exponential terms and the A constants which are common for allfour derivatives, we obtain iω(β) = iβ3 − iaβ − ν1β2, and after some manipulation

ω(β) = cβ3 − aβ + iν1β2 (2.3)

We have both pure and imaginary terms and we need to conduct a more completeanalysis with respect to the sign of ν1 as well, of the �nal form ueiβ(cβ

2−a+iν1β)teiβx.Let us look at the dissipation. We �rst consider a positive ν1. We have concluded

that an positive imaginary ω(β) leads to decay, whereas a negative one leads to a blow-up. This, in our case, given our ν1β

2 imaginary part, means that if ν1 is positive, aswe assumed, then the overall imaginary part is positive and hence we obtain a decayand hence dissipation. A negative ν1 however leads to one of the worst situations weencounter in numerical analysis, a blow-up of the solution.Regarding the dispersion analysis, �rst of all by di�erentiation of the real part with

respect to β we obtain 3β2−a, which is not equal to 0 unless a = 3β2. We then deduce thatsince solutions with di�erent wavelengths travel at di�erent speeds, dispersion exists (withthe one named exception). Furthermore, we can actually deduce that the propagationspeed and direction is given by Re(ω)/β = cβ2 − a. So if a = cβ2 we have a special casewhere we have no propagation, as ω would then turn purely imaginary, however afterthis depending on the sign of a we can deduce whether the waves will move to the right(a > cβ2) or to the left (a < cβ2).

3 Problem 3

Consider the following initial value problem{ut + ux + uxxx = 0

u(x, 0) = δ(x)(3.1)

with −∞ < x <∞ and t > 0.

4

3 PROBLEM 3

3.1 Subproblem 3.a

Show that∞∫−∞

u(x, t) dx is a conserved quantity and give its value.

To start o�, we have performed the dissipation-dispersion analysis of this partial dif-ferential equation in class and have concluded that ω(β) = β3 − β. Hence here we seedispersive phenomena, since dω/dβ is not a constant and ω ∈ R. We have also outlinedthat in the case of a real ω for we get conservative phenomena, i.e. reorganization ofenergy.This of course however does not answer the question directly. In order to compute the

integral in this exercise, we simply have to consider an argument given in class. Sincewe work in an L2-integrable space and our initial condition only has a non-zero valueat x = 0 we can make a few adjustments to our integral under the assumption that theinitial condition decays to 0 at the ∞-bounds.

To demonstrate that∞∫−∞

u(x, t) dx is a conserved quantity we need to show that

∂/∂t∞∫−∞

u(x, t) dx = 0. However in fact∞∫−∞

u(x, t) dx =∞∫−∞

δ(x) dx and then we can

use the known de�nition for the δ−function in order to draw the conclusion that theintegral is equal to 1. Being a constant means that it is a conservative quantity of course.The alternative would have been to calculate the time derivative, which from the equationform was simply −(u + uxx) evaluated at ±∞, which we have agreed to yield 0. Thiswould have covered the argument in conservation, but not the value of the integral itself,which is why we needed to consider the initial condition.

3.2 Subproblem 3.b

Use Fourier transform methods to show that the solution can be written as

u(x, t) =

√2π

(3t)1/3Ai

(x− t(3t)1/3

)(3.2)

where Ai(·) represents the Airy function.In order to prove the statement is true, we �rst need to observe how the Fourier

transform of the equations and its derivatives behave.

u(x, t) =1√2π

∞∫−∞

eiωxu(x) dω

∂tu(x, t) =

1√2π

∞∫−∞

eiωxut(x) dω

∂xu(x, t) =

1√2π

∞∫−∞

eiωxi ωu(x) dω

5

3 PROBLEM 3

∂2

∂x2u(x, t) =

1√2π

∞∫−∞

eiωx(−ω2)u(x) dω

∂3

∂x3u(x, t) =

1√2π

∞∫−∞

eiωx(−i ω3)u(x) dω

We also take into account that δ(ω) = 1 and consider equation (3.1) in Fourier space.This simply leads to

ut + iωu− iω3u = 0

with the initial condition u(ω, 0) = δω = 1. The solution for the general form is simplyu = f(ω)ei(ω

3−ω)t and with the constraint coming from the initial condition the generalfunction f(ω) simply evaluates to 1.Now, we use the Fourier transform with the updated u in order to get a �nal solution

u(x, t) =1√2π

∞∫−∞

ei(ωx+(ω3−ω)t) dω

We are invited to �nd a form of the Airy function that involves a Fourier type integral.Upon some literature review, I have located formula (2.21) at the start of section 2.1.3in the book Airy Functions and Applications to Physics by Olivier Vallee and ManuelSoares [2]. The formula is simply stated

Ai(x) =1

∞∫−∞

ei(z3/3+xz) dz

A simple change of variable of the type z = ω/(3t)13 our equation becomes

u(x, t) =1

(3t)1/3√2π

∞∫−∞

ei(z x−t

(3t)1/3+ z3

3)dz

and using the Airy function de�nition we obtain the �nal result

u(x, t) =

√2π

(3t)1/3Ai

(x− t(3t)1/3

).

3.3 Subproblem 3.c

Produce graphs of u(x, t) for t = 0.1, 0.5, 1, 2.5, 5 and discuss the behaviour of thesolution. Perform a numerical quadrature of the solution at these times and compare theresults. Explain.I execute the plotting in Matlab in a standard manner over the interval [−20, 20] at

equally spaced points 0.005 apart. The results can be seen in Fig. 3.1 - 3.5. The general

6

3 PROBLEM 3

behaviour of the results is the same for all 5 values of t, however as we increase thisparameter, several things change in a straightforward manner.The general trend, simply by observation, is the quick decay of the solution as x→∞

for every case and an slightly damped oscillation as x→ −∞. However as t is increasedwe can notice the following e�ects:

1. First of all we notice a reduction in amplitude as x becomes smaller and smaller,from a local maximum at x = −20 of approximately 0.8 for t = 0.1 to 0.3 at t = 5.0.

2. Secondly, the wavelength increases quite signi�cantly when using a higher value oft. We can see 18 local maxima for t = 0.1 and 4 local maxima for t = 5. I knowthis is not the most accurate measure for the wavenumber, however it gives a clearenough indication of what the underlying behaviour is.

3. We can see that the wave is moving to the right, most obvious at t = 5 if wecompare the peak of the wavefront.

It is important to outline the fact that the increase in wavelength and reduction inamplitude occur steadily as t is increased (no blow up, no unorthodox unexpected e�ects).The oscillations, as well as the decay have a well behaved and hence predictable structure.To summarize, we obtain exactly what was predicted in class, namely a wave front

moving to the right monotonically with a decaying oscillation at the back.

Figure 3.1: u(x, t) Behaviour for t = 0.1

I have performed the numerical quadrature using the adaptive Gauss-Kronrod quadra-ture available in Matlab (quadgk), which seems to be the most well behaved scheme forthis case among its alternatives. I did however need to be more permissive and specifyI higher number of iterations that could be performed in order to reach an acceptableinternal integration error.

7

3 PROBLEM 3

Figure 3.2: u(x, t) Behaviour for t = 0.5

Figure 3.3: u(x, t) Behaviour for t = 1.0

8

3 PROBLEM 3

Figure 3.4: u(x, t) Behaviour for t = 2.5

Figure 3.5: u(x, t) Behaviour for t = 5.0

9

3 PROBLEM 3

Since we cannot numerically integrate equation (3.2) over the in�nite domain, we musttruncate it in an acceptable manner for our study. By inspection, the damping/decay asx grows larger is such that around the value of x = 20, for all values of t the result is closeenough to 0 and it never increases, so we can choose this as our right limit of integration.As x → −∞ we see an oscillation of the solution, typical to the Airy function, thatdecays, however very slowly. We do have to perform an analysis and need to choose aleft border too, I performed all tests on the interval [−10000, 20] with a spacing of 0.005and the results even for this imperfect setting (as it always is in domain truncation) foreach value of t can be seen below:

• For t = 0.1, the result of the numerical integration is 2.506683990806960

• For t = 0.5, the result of the numerical integration is 2.507891689448925

• For t = 1.0, the result of the numerical integration is 2.504998547827606

• For t = 2.5, the result of the numerical integration is 2.504737338886868

• For t = 5.0, the result of the numerical integration is 2.509118442837308

However now an important issue appears, namely that the de�nition for the Airyfunction had a normalization constant of 1/2π instead of our normal framework of 1/

√2π.

With this aspect considered, the results are:

• For t = 0.1, the result of the numerical integration is 1.00002223

• For t = 0.5, the result of the numerical integration is 1.00050403

• For t = 1.0, the result of the numerical integration is 0.99934983

• For t = 2.5, the result of the numerical integration is 0.99924562

• For t = 5.0, the result of the numerical integration is 1.00099343

As a short analysis, we can see that the di�erence between any 2 of the above resultsis of order 10−3. I consider that apart from usual error sources such as truncation errors,quadrature errors, computer linear algebra issues etc. one cause for the di�erence is thefact that we decided to truncate the domain to the left to a value where the full decayto 0 was not available.From the plots in Fig. 3.1 - 3.5 we can see that at x = −20 we can observe the wave

in di�erent moments of its amplitude (local minima, maxima, increasing or decreasingtendency) and I attribute the slight di�erence also to the fact that we may simply becatching the end wavelength doing di�erent things for each of the values of t. This beingsaid, the results are in any case close enough to be considered nearly equal. This comesas no surprise, since the interval [−10000, 0] is dominated by cancellations due to theoscillation around the y = 0 axis (Riemann-Lebesgue lemma can also be used to justifythis), whereas to the right the increased wavelength as t grows larger is compensated byits decay, which is why I believe the results in the end are so close.

10

References

Also, this is a con�rmation of the fact that the integral of u(x, t) over the domainis indeed a conserved quantity. The fact that in the end, the result of the numericalintegration coincides up to a minor error with the theoretical prediction, shows that thepartial di�erential equation yields a conservative result over the domain.

References

[1] Thomas J. W., Numerical Partial Di�erential Equations: Finite Di�erence Methods,Springer, 1995. Pages 363 - 366.

[2] Vallee O., Soares M., Airy Functions and Applications to Physics, Imperial CollegePress, 2010. Pages 9-10.

11