Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Time value of money wikipedia , lookup
Routhian mechanics wikipedia , lookup
Computational chemistry wikipedia , lookup
Mathematical optimization wikipedia , lookup
Computational complexity theory wikipedia , lookup
Knapsack problem wikipedia , lookup
Perturbation theory wikipedia , lookup
Inverse problem wikipedia , lookup
Least squares wikipedia , lookup
Newton's method wikipedia , lookup
Computational fluid dynamics wikipedia , lookup
Engineering Mathematics | CHEN30101 problem sheet 6 1. Suppose that we are using the FTCS approximation method to solve the heat equation. Denote the spatial grid resolution by h and suppose that the grid points are x0 , x1 , . . . , x10 at time level tn = nk. Determine the discrete equation that un9 , un10 and un11 will satisfy if the condition at the right-hand boundary is given by (i) u = 1, (ii) ∂u ∂x = 0, ∂u (iii) ∂u = 2.3, (iv) + 4.7u = 2.1. ∂x ∂x 2. Consider the initial value problem: find u(x, t) such that ut − uxx = 0 u(0, t) = 0; in (0, 1) × (0, τ ) u(1, t) = 0, u(x, 0) = x2 (1 − x), t>0 x ∈ (0, 1). Using a grid resolution of h = 0.2 and k = 0.01, carry out two steps of the FTCS approximation method. What is the maximum time step possible if a stable FTCS approximation is to be computed for a spatial grid resolution of (i) h = 10, (ii) h = 1, (iii) h = 0.1, (iv) h = 0.01? 3. Consider the initial value problem: find u(x, t) such that ut − uxx = 0 u(0, t) = 0; in (0, 1) × (0, τ ) u(1, t) = 1, u(x, 0) = x2 , t>0 x ∈ (0, 1). Using a grid resolution of h = 0.25 and k = 0.1, carry out two steps of the Crank–Nicolson approximation method by working out the discrete equations one at a time, and then solving a 3 × 3 equation system at each time step. Work to an accuracy of four decimal places. 4. Consider the initial value problem: find u(x, t) such that ut − uxx = 0 u(0, t) = 0; in (0, 1) × (0, τ ) u(1, t) = 0, u(x, 0) = sin(πx), t>0 x ∈ (0, 1). Using a grid resolution of h = 0.2 and k = 0.01, carry out the first step of (a) the FTCS approximation method (b) the BTCS approximation method∗ (c) the Crank–Nicolson method.∗ ∗ An efficient way of doing this is to use the function trisolve.m that is associated with Computational Exercise IV. 1 Work to an accuracy of four decimal places and compare your numerical 2 results with the exact values that are given by u(x, t) = e−π t sin(πx). 5. Consider the initial value problem: find u(x, t) such that utt − uxx = 0 u(0, t) = 0; in (0, 1) × (0, τ ) u(1, t) = 0, u(x, 0) = sin(πx), t>0 ut (x, 0) = 0, x ∈ (0, 1). (a) By defining a new dependent variable v = ut , convert the problem to a system of two linear PDEs that are first order in time. (b) Hence, using a grid resolution of h = 0.25 and k = 0.01, carry out two steps of the FTCS approximation method. Record all your answers to an accuracy of four decimal places. 6. Consider the boundary value problem: find u(x, y) such that uxx + uyy = 0 in (0, 3) × (0, 3) u(0, y) = 0, u(3, y) = 0, y ∈ (0, 3) u(x, 0) = x(3 − x), u(x, 3) = 0, x ∈ (0, 3). Consider the grid with h = 1. Compute an approximation to the solution using the 5-point difference scheme by working out the discrete equations one at a time, and then solving a 4 × 4 equation system by hand.† 7. Consider the boundary value problem: find u(x, y) such that uxx + uyy = 0 in (0, 1) × (0, 1) u(0, y) = y, u(1, y) = 1 + 2y, y ∈ (0, 1) u(x, 0) = x, u(x, 1) = 1 + 2x, x ∈ (0, 1). Consider the grid with h = 0.25. Construct an approximation to the solution using the 5-point difference scheme by working out the discrete equations one at a time, and forming a 9 × 9 equation system. (You do not need to solve the system.† ) † One way to check your answers is solve the same problem using the function laplacefd.m presented in Computational Exercise V. 2