Examination paper for TMA4125 Matematikk 4N

Similar documents
Examination paper for TMA4130 Matematikk 4N

Examination paper for TMA4130 Matematikk 4N: SOLUTION

Examination paper for TMA4122/TMA4123/TMA4125/TMA4130 Matematikk 4M/N

Examination paper for TMA4195 Mathematical Modeling

1 x if 0 < x < 2, 1 x if 2 < x < 0.

Examination paper for TMA4195 Mathematical Modeling

Examination paper for TMA4215 Numerical Mathematics

Examination paper for TMA4285 Time Series Models

Suggested solutions, TMA4125 Calculus 4N

Examination paper for TMA4145 Linear Methods

Exam TMA4120 MATHEMATICS 4K. Monday , Time:

Exam in TMA4215 December 7th 2012

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004

Examination paper for TMA4255 Applied statistics

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

Mathematical Methods and its Applications (Solution of assignment-12) Solution 1 From the definition of Fourier transforms, we have.

Fourier transforms. R. C. Daileda. Partial Differential Equations April 17, Trinity University

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

MATH 251 Final Examination August 14, 2015 FORM A. Name: Student Number: Section:

MA2501 Numerical Methods Spring 2015

COURSE Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method

TMA4120, Matematikk 4K, Fall Date Section Topic HW Textbook problems Suppl. Answers. Sept 12 Aug 31/

Examination paper for TMA4110 Matematikk 3

CS 257: Numerical Methods

MATH 251 Final Examination May 4, 2015 FORM A. Name: Student Number: Section:

Numerical Methods for Differential Equations

Hence a root lies between 1 and 2. Since f a is negative and f(x 0 ) is positive The root lies between a and x 0 i.e. 1 and 1.

Problem 1. Possible Solution. Let f be the 2π-periodic functions defined by f(x) = cos ( )

HIGHER ORDER METHODS. There are two principal means to derive higher order methods. b j f(x n j,y n j )

Lecture 4: Fourier Transforms.

Math 216 Final Exam 14 December, 2017

Math 216 Final Exam 14 December, 2012

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs

Numerical methods. Examples with solution

Chapter 8: Taylor s theorem and L Hospital s rule

Exam in Numerical Methods (MA2501)

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018

A Guided Tour of the Wave Equation

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK

12.0 Properties of orthogonal polynomials

Do not turn over until you are told to do so by the Invigilator.

Examination paper for FY3403 Particle physics

Lösning: Tenta Numerical Analysis för D, L. FMN011,

COURSE Numerical integration of functions

Homework and Computer Problems for Math*2130 (W17).

MATH 251 Final Examination May 3, 2017 FORM A. Name: Student Number: Section:

Multistage Methods I: Runge-Kutta Methods

M.SC. PHYSICS - II YEAR

Examination paper for TFY4245 Faststoff-fysikk, videregående kurs

Numerical and Statistical Methods

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form

Computation Fluid Dynamics

Additional exercises with Numerieke Analyse

Differential Equations

A sufficient condition for the existence of the Fourier transform of f : R C is. f(t) dt <. f(t) = 0 otherwise. dt =

Examination paper for TMA4110/TMA4115 Matematikk 3

SAMPLE FINAL EXAM SOLUTIONS

Previous Year Questions & Detailed Solutions

Introductory Numerical Analysis

x 3y 2z = 6 1.2) 2x 4y 3z = 8 3x + 6y + 8z = 5 x + 3y 2z + 5t = 4 1.5) 2x + 8y z + 9t = 9 3x + 5y 12z + 17t = 7

Fourth Order RK-Method

Exam in TMA4180 Optimization Theory

MATH 251 Final Examination December 16, 2015 FORM A. Name: Student Number: Section:

Final Exam SOLUTIONS MAT 131 Fall 2011

MATH 251 Final Examination December 19, 2012 FORM A. Name: Student Number: Section:

BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination December, 2015 BCS-054 : COMPUTER ORIENTED NUMERICAL TECHNIQUES

Numerical and Statistical Methods

Math 321 Final Examination April 1995 Notation used in this exam: N. (1) S N (f,x) = f(t)e int dt e inx.

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

Fourier Series Example

MA Chapter 10 practice

NUMERICAL ANALYSIS PROBLEMS

Math 112 (Calculus I) Final Exam

. (a) Express [ ] as a non-trivial linear combination of u = [ ], v = [ ] and w =[ ], if possible. Otherwise, give your comments. (b) Express +8x+9x a

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Chapter 10: Partial Differential Equations

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad MECHANICAL ENGINEERING TUTORIAL QUESTION BANK

Math 251 December 14, 2005 Answer Key to Final Exam. 1 18pt 2 16pt 3 12pt 4 14pt 5 12pt 6 14pt 7 14pt 8 16pt 9 20pt 10 14pt Total 150pt

Math 241 Final Exam Spring 2013

1 From Fourier Series to Fourier transform

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ).

Numerical Methods for Initial Value Problems; Harmonic Oscillators

Math 216 Second Midterm 20 March, 2017

MATH 251 Final Examination August 10, 2011 FORM A. Name: Student Number: Section:

Numerical Marine Hydrodynamics Summary

1. Nonlinear Equations. This lecture note excerpted parts from Michael Heath and Max Gunzburger. f(x) = 0

FINAL EXAM, MATH 353 SUMMER I 2015

Differentiation. Table of contents Definition Arithmetics Composite and inverse functions... 5

Preliminary Examination, Numerical Analysis, August 2016

Wave Equation With Homogeneous Boundary Conditions

Mathematics of Physics and Engineering II: Homework answers You are encouraged to disagree with everything that follows. P R and i j k 2 1 1

Errata List Numerical Mathematics and Computing, 7th Edition Ward Cheney & David Kincaid Cengage Learning (c) March 2013

5. Hand in the entire exam booklet and your computer score sheet.

MATH 162 R E V I E W F I N A L E X A M FALL 2016

MA 201: Differentiation and Integration of Fourier Series Applications of Fourier Series Lecture - 10

Math 251 December 14, 2005 Final Exam. 1 18pt 2 16pt 3 12pt 4 14pt 5 12pt 6 14pt 7 14pt 8 16pt 9 20pt 10 14pt Total 150pt

Numerical Methods for Initial Value Problems; Harmonic Oscillators

# Points Score Total 100

ISE I Brief Lecture Notes

EE 3054: Signals, Systems, and Transforms Summer It is observed of some continuous-time LTI system that the input signal.

Transcription:

Department of Mathematical Sciences Examination paper for TMA45 Matematikk 4N Academic contact during examination: Anne Kværnø a, Louis-Philippe Thibault b Phone: a 9 66 38 4, b 9 3 0 95 Examination date: May 3 08 Examination time (from to): 09:00 3:00 Permitted examination support material: Kode C: Bestemt, enkel kalkulator Rottmann: Matematisk formelsamling Other information: All answers have to be justified, and they should include enough details in order to see how they have been obtained. All sub-problems carry the same weight for grading. Good Luck! Language: English Number of pages: 9 Number of pages enclosed: Checked by: Informasjon om trykking av eksamensoppgave Originalen er: -sidig -sidig sort/hvit farger skal ha flervalgskjema Date Signature

TMA45 Matematikk 4N, May 3 08 Page of 9 Problem Let f(x) be defined as f(x) = x for x [0, 3]. a) Find the Fourier sine series of f(x). b) Use the result to compute the value of the series Hint: Use Parseval s identity. n. Solution: a) The Fourier sine series is of the form ( ) nπx b n sin, L where L = 3 is the half-range period, and b n = L We compute the coefficients b n : b n = 3 L 0 ( ) nπx f(x) sin dx. L 3 0 ( ) nπx x sin dx. 3 To compute this integral, we use integration by parts. We obtain b n = ( [ x 3 ( )] nπx 3 3 nπ cos + 3 3 ( ) ) nπx cos dx 3 0 nπ 0 3 = ( ) () n+ 9 + 0 = ()n+ 6. 3 nπ nπ Thus the Fourier sine series of f(x) is given by () n+ 6 nπ ( nπx sin 3 ). b) We use Parseval s identity: We have 36 π b n = L L 0 f(x) dx. n = 3 x dx = 6. 3 0

Page of 9 TMA45 Matematikk 4N, May 3 08 Thus n = π 6. Problem Let f(x) = 4 x + Show that the convolution and g(x) = (f g)(x) = π i x (x + ) for all real x. ωe ( +) ω e iωx dω. Solution: We first compute F(f g), the Fourier transform of the convolution. By the convolution theorem, we get Using the tables, we see that F(f g) = πf(f)f(g). F(f) = πe ω. We note that ( ) g(x) =. x + Using the properties of the tables, we obtain Thus, F(g) = iω π e ω. F(f g) = iπ πωe ( +) ω. Applying the inverse Fourier transform on both sides, we obtain (f g)(x) = πi ωe ( +) ω e iωx dω. Problem 3 Using Laplace transforms, solve the differential equation y + 3y 4t if 0 < t + y = 4 if t >, with initial conditions y(0) = 0 and y (0) = 0.

TMA45 Matematikk 4N, May 3 08 Page 3 of 9 Solution: We note that the differential equation can be written as y + 3y + y = 4t( u(t )) + 4u(t ) = 4t 4(t )u(t ). Applying the Laplace transform on both sides and isolating L(y), we obtain ( ) 4 L(y) = s (s + )(s + ) 4 e s. s (s + )(s + ) We write the rational fraction as partial sums: 4 s (s + )(s + ) = A s + B s + C s + + D s + and find A = 3, B =, C = 4 and D =. Applying the inverse Laplace transform, we obtain y(t) = ( 3 + t + 4e t e t ) ( 3 + (t ) + 4e (t) e (t) )u(t ). Problem 4 Consider the equation x = cos(x). a) Show that this equation has a unique solution in the interval (0, ). b) Compute iterations of Newton s method to approximate the solution, starting with x 0 = 0.5. Keep 5 digits in your answers. Solution: a) Apply the fixed point theorem on x = g(x) = cos(x). g (x) = sin(x) <. The function cos(x) is monotonically decreasing on the interval [0, ], thus g(x) (g(), g(0)) = (0.705, 0.5) (0, )

Page 4 of 9 TMA45 Matematikk 4N, May 3 08 so the two conditions of the fixed point theorem are fulfilled, and the fixed exist and is unique. b) Rewrite the equation to the form f(x) = x cos(x) = 0 and Newtons method becomes x k+ = x k x k cos(x k) + sin(x k) = x k sin(x k ) + cos(x k ). + sin(x k ) and the first iterations becomes x 0 = 0.50000, x = 0.45063, x =.4508. Problem 5 Given the differential equation y = xy, y() = 0.5. a) Compute the approximate solution y H y(.) by one step of the Heun method with step size h = 0.. b) Compute the approximate solution y E y(.) by one step of the Euler method with step size h = 0.. Use the result from point a) to find an estimate for the error y(.) y E. Given a user specified tolerance Tol = 0 3, will you accept y E accurate solution? as a sufficient Whether you accept the step or not, what should your next step size be? Use P = 0.8 as the pessimist factor in the step size selection algorithm. Hint: The Euler method is of order, the Heun method is of order. Solution: a) One step of Heuns method with h = 0. becomes y = y 0 + hx 0 y0 = 0.5 + 0. 0.5 = 0.55 y H = y 0 + h ( x0 y0 + x (y ) ) = 0.5 + 0.5 0. ( 0.5 +. 0.55 ) = 0.5766. b) One step of Eulers method: y E = y = 0.55.

TMA45 Matematikk 4N, May 3 08 Page 5 of 9 Error estimate: y(.) y E le = y H y E =.66 0 3. The step is not accepted, and will be repeated with the new stepsize h new = P ( ) Tol p+ 0 3 hold = 0.8 0. = 0.049. le.66 0 3 Here, p = is the order of the Euler method. Problem 6 a) For a given function f(t), give an expression for the polynomial of lowest possible degree interpolating the function in the nodes t 0 = /3 and t =. Use the result to find a quadrature rule Q[, ] = w 0 f(t 0 ) + w f(t ) as an approximation to the integral f(t)dt. Find the degree of precision of the quadrature rule. b) Transfer the quadrature rule Q[, ] to some arbitrary interval [a, b]. Use it to find an approximation of the integral x sin(πx/)dx. Solution: a) Using Lagrange interpolation, we get p (t) = f(t 0 ) t t + f(t ) t t 0 = 3 ( f(t0 )( t) + f(t )(t + t 0 t t t 0 4 3 )). The quadrature rule is found by integrating this polynomial: Q[, ] = p dt = 3 f(t 0) + f(t ). The quadrature Q has degree of precision d if Q[, ] = f(t)dt for all polynomials of degree d or less. That is, if this is true for all f = t l, l = 0,,..., d but not for l = d +.

Page 6 of 9 TMA45 Matematikk 4N, May 3 08 f = dt = Q[, ] = 3 + = f = t tdt = 0 Q[, ] = 3 ( ) + 3 = 0 f = t t dt = Q[, ] = 3 ( 3 ) + 3 = 3 f = t 3 t 3 dt = 0 Q[, ] = 3 ( ) 3 + 3 3 = 4 9 so the quadrature rule has degree of precision. (The rule will have at least degree of precision by construction, so to check for f = and f = t is superfluous. On the other hand, it is useful for checking that the previous result was correct.) b) Use the mapping x = b a t + b + a. Then b a f(x)dx = b a Using the nodes x i = b a t i + b + a f( b a t + b + a )dt. for i = 0,, we get that x 0 = a 3 + b 3, x = b and the quadrature formula becomes Q[a, b] = b a [ 3f 4 ( 3 a + b ) ] + f(b). 3 Applied to x sin(πx/)dx we get x 0 = 4/3 and x = and Q[, ] = [ ( ) 4 4 3 sin 3 ( π 4 ) ( ) ] π + sin 3 = 3 =.54700539. 3 (For comparision, the exact value of the integral is.9885070... ).

TMA45 Matematikk 4N, May 3 08 Page 7 of 9 Problem 7 Let u(x, t) be the deflection at time t and position x of a vibrating string of length 4. It satisfies the wave equation with initial conditions u t = u, 0 x 4, t 0, x u(x, 0) = 3 sin(πx) and u t (x, 0) = sin(4πx), 0 x 4, and boundary conditions u(0, t) = u(4, t) = 0, t 0. a) Find the solutions that are of the form u(x, t) = F (x)g(t) and satisfy the boundary conditions. b) Find the solution that satisfy the initial conditions. c) The aim is now to set up a numerical scheme for the equation. Use step sizes t and x in the t and x direction respectively with x = 4/M, where M is the number of intervals in the x direction. The gridpoints are then given by t n = n t, n = 0,,,... and x i = i x, i = 0,,..., M Let Ui n u(x i, t n ) be the numerical approximation in each gridpoint. Set up a finite difference scheme for the equation, based on central differences. The scheme will be explicit, in the sense that Ui n+ can be expressed in terms of the numerical solutions at time steps t n and t n for n. Use a central difference for u t (x, 0) and the idea of a false boundary to find a scheme for computing U i, i =,..., M. Let x = 0. and t = 0. and use your schemes to find U u(0., 0.). Solution: a) We plug u(x, t) = F (x)g(t) into the wave equation and obtain two ODEs F kf = 0 G kg = 0. We split into three cases k = 0, k > 0 and k < 0. The only non-trivial solution is for k = p < 0. The first equation then have solution F (x) = A cos px + B sin px.

Page 8 of 9 TMA45 Matematikk 4N, May 3 08 From the boundary conditions, we get F (0) = 0 and F (4) = 0, so A = 0 and sin 4p = 0, hence p = nπ 4, n =,,... We can set B =. We now solve the second equation with k = p = ( nπ 4 ). It has a solution of the form G n (t) = B n cos pt + B n sin pt. The solutions of the form F (x)g(t) are thus given by ( ( ) ( )) ( ) nπ nπ nπ u n (x, t) = B n cos 4 t + Bn sin 4 t sin 4 x b) To find a solution that satisfies the initial condition, we need to sum over those functions. We have ( ( ) ( )) ( ) nπ nπ nπ u(x, t) = B n cos 4 t + Bn sin 4 t sin 4 x. We thus have, using the initial condition, 3 sin(πx) = u(x, 0) = B n sin nπx 4. This is a Fourier sine series. Comparing the two Fourier series, we see that the coefficients B n are given by B 4 = 3, B n = 0, if n 4. To obtain the coefficients Bn, we take the derivative of the series with respect to t: ( ( ) ( )) ( ) nπ nπ u t (x, t) = B n 4 sin 4 t + Bn nπ nπ nπ 4 cos 4 t sin 4 x. Using the other initial condition: sin(4πx) = u t (x, 0) = nπ 4 Comparing again the two Fourier series, we have ( ) nπ Bn sin 4 x. B 6 = 4π, B n = 0, if n 6. Thus, the solution to the differential equation is u(x, t) = 3 cos(πt) sin(πx) + sin(4πt) sin(4πx). 4π

TMA45 Matematikk 4N, May 3 08 Page 9 of 9 c) The corresponding difference equations for the point (x i, t n ) using central differences becomes Ui n+ Ui n + Ui n = U i+ n Ui n + Ui n. t x Solve this with respect to Ui n+, set r = x/ t for simplicity (not required), and the algorithm becomes: For n =,,... : Ui n+ = r (Ui+ n + Ui) n + ( r )Ui n Ui n, i =,..., M, () U0 n+ = 0, UM n+ = 0. Extend the solution domain to t = t, and use a central difference formula to approximate the starting condition u t (x, 0) = sin(4πx). For n = 0 we have the following two equations: U i = r (Ui+ 0 + Ui) 0 + ( r )Ui 0 Ui, Ui Ui = sin(4πx i ) t Solve the last with respect to Ui and insert this into the first expressions gives the following expression for Ui : U i = r (U 0 i+ + U 0 i) + ( r )U 0 i + t sin(4πx i ), i =,..., M U 0 i = 3 sin(πx i ). () With x = t = 0. the pararmeter r = and thus r = 0. To find an approximation U u(0., 0.) we need in this particular case only to calculate U from () first, and then U from (). Use also the boundary condition U0 n = 0: So U = 3 (sin(0.π) + sin(0.3π)) + 0. sin(0.8π) =.735830, U = U U 0 = 3 ( (sin 0.3π) sin(0.π) ) + 0. sin(0.8π) = 0.808779. To compare, the exact solution is u(0., 0.) = 0.79449.

TMA45 Matematikk 4N, May 3 08 Page i of ii Fourier Transform f(x) = π ˆf(ω)e iωx dω ˆf(ω) = π f(x)e iωx dx f g(x) f (x) π ˆf(ω)ĝ(ω) iω ˆf(ω) e ax a e ω /4a e a x x + a f(x) = for x < a, 0 otherwise a π ω + a π e a ω a sin ωa π ω Laplace Transform f(t) F (s) = f (t) tf(t) 0 e st f(t) dt sf (s) f(0) F (s) e at f(t) F (s a) s cos(ωt) s + ω ω sin(ωt) s + ω t n n! s n+ e at s a f(t a)u(t a) e sa F (s) δ(t a) f g(t) e as F (s)g(s)

Page ii of ii TMA45 Matematikk 4N, May 3 08 Numerics Newton s method: x k+ = x k f(x k) f (x k ). Newton s method for system of equations: x k+ = x k JF ( x k ) F ( x k ), with JF = ( j f i ). Lagrange interpolation: p n (x) = n k=0 l k (x) l k (x k ) f k, with l k (x) = j k(x x j ). Interpolation error: ɛ n (x) = n k=0 (x x k ) f (n+) (t) (n+)!. Chebyshev points: x k = cos ( k+ n+ π), 0 k n. Newton s divided difference: f(x) f 0 + (x x 0 )f[x 0, x ]+ (x x 0 )(x x )f[x 0, x, x ]+ +(x x 0 )(x x ) (x x n )f[x 0,..., x n ], with f[x 0,..., x k ] = f[x,...x k ] f[x 0,...,x k ] x k x 0. Trapezoid rule: b a f(x) dx h [ f(a) + f + f + + f n + f(b)]. Error of the trapezoid rule: ɛ b a h max x [a,b] f (x). Simpson rule: b a f(x) dx h 3 [f 0 + 4f + f + 4f 3 + + f n + 4f n + f n ]. Error of the Simpson rule: ɛ b a 80 h4 max x [a,b] f (4) (x). Gauss Seidel iteration: x (m+) = b Lx (m+) Ux (m), with A = I+L+U. Jacobi iteration: x (m+) = b + (I A)x (m). Euler method: y n+ = y n + hf(x n, y n ). Improved Euler (Heun s) method: y n+ = y n + h[f(x n, y n ) + f(x n + h, y n+)], where y n+ = y n + hf(x n, y n ). Classical Runge Kutta method: k = hf(x n, y n ), k = hf(x n + h/, y n + k /), k 3 = hf(x n + h/, y n + k /), k 4 = hf(x n + h, y n + k 3 ), y n+ = y n + 6 k + 3 k + 3 k 3 + 6 k 4. Backward Euler method: y n+ = y n + hf(x n+, y n+ ). Finite differences: u u(x+h,y) u(x h,y) (x, y), u(x, y) u(x+h,y) u(x,y)+u(x h,y). x h x h Crank Nicolson method for the heat equation: r = k h, ( + r)u i,j+ r(u i+,j+ + u i,j+ ) = ( r)u ij + r(u i+,j + u i,j ).