Docsity

Numerical Methods Problem Set: AME 521, Fall 2004, Assignments of Aerospace Engineering

Toggle sidebar
bg1
AME 521: Numerical Methods
FALL 2004, Problem Set 2
J.M.Powers
set prepared by Vladimir Voikov
Due: Friday, October 8, 2004
1. Find the analytic representation of the discrete function un=f(n) if
it satisfies the equation:
un−1−5
2un+un+1 = 0, n = 1,2, ...
and limn→∞ un= 0, u0= 1.
Hint: Derive the characteristic equation and analyze which of its roots
can make the solution to go to infinity as n→ ∞.
2. For the problem
du
dt +αu = 0, u(0) = 1,
the following multistep method
4un+1 −un−1
2h−3un+1 −un
h+αun= 0, n = 1,2, ...
is proposed.
(a) Investigate whether the method is consistent. What is its order
of accuracy? Does it guarantee that the numerical solution un
obtained with this method converges as h→0?
(b) Derive the characteristic equation of the given numerical scheme.
Find its roots σ1,σ2and expand them in powers of h. Based on
expansions, can you make the same conclusion regarding accuracy
that you had in part (a)? Conclude that one root (denote it as
σ2) is spurious (explain your choice).
1
pf3
pf4

Partial preview of the text

Download Numerical Methods Problem Set: AME 521, Fall 2004 and more Assignments Aerospace Engineering in PDF only on Docsity!

AME 521: Numerical Methods

FALL 2004, Problem Set 2

J.M.Powers set prepared by Vladimir Voikov Due: Friday, October 8, 2004

  1. Find the analytic representation of the discrete function un = f (n) if it satisfies the equation:

un− 1 −

un + un+1 = 0, n = 1, 2 , ...

and limn→∞ un = 0, u 0 = 1. Hint: Derive the characteristic equation and analyze which of its roots can make the solution to go to infinity as n → ∞.

  1. For the problem

du dt

  • αu = 0, u(0) = 1,

the following multistep method

un+1 − un− 1 2 h

un+1 − un h

  • αun = 0, n = 1, 2 , ...

is proposed.

(a) Investigate whether the method is consistent. What is its order of accuracy? Does it guarantee that the numerical solution un obtained with this method converges as h → 0? (b) Derive the characteristic equation of the given numerical scheme. Find its roots σ 1 , σ 2 and expand them in powers of h. Based on expansions, can you make the same conclusion regarding accuracy that you had in part (a)? Conclude that one root (denote it as σ 2 ) is spurious (explain your choice).

(c) In order to experimentally investigate if the method can give the convergent solutions, try it with α = 1 and Forward Euler method over 0 ≤ x ≤ 1 with different steps h (from coarse mesh h = 0. 1 to the finest mesh you can reach on your computer). Plot the dependence of the norm of the error vs. step size in logarithmic scale for both methods. What conclusions about stability based on your calculations can you make here? How does the slope of the curve you got for the Forward Euler change with mesh? Give a special attention to the region of smallest h you could afford in your calculations. Can you distinguish the machine round-off error? (d) In this part your task will be to investigate stability of the finite- difference method analytically. Here you can start from the ana- lytical formula (see Lecture Notes for details) for the exact solution of the discrete equation:

un =

σ 2 u 0 − u 1 σ 2 − σ 1

σ 1 n +

σ 1 u 0 − u 1 σ 1 − σ 2

σn 2 (1)

Suppose, for ’best’ start you decided to choose boundary condi- tions matching the exact solution: u 0 = 1, u 1 = e−αh. With this choice of u 0 , u 1

un =

[ e−αxn^ + O(h)

] −

[ 3 2

α^2 eαxn^ + O(h)

] h^22 xn/h^ (2)

Suppose, one decided to reach a better solution at fixed x using smaller values of h. Find the limit of

[ 3 2 α

(^2) eαxn (^) + O(h) ] h^22 xn/h^ as h → 0 and show that the attempts to use finer meshes lead to diverging solutions.

  1. Find analytically the maximum time step under which the given nu- merical scheme is stable for the integration of

dy dt

= (t ln t)y + e−^ sin^ t, y(1) = 1 , 1 ≤ t ≤ 2.

using the following schemes:

the normalized equations for Moon’s coordinates of the Hill’s problem are:

d^2 x dt^2

= 3 x + 2

dy dt

x r^3

d^2 y dt^2

dx dt

y r^3

where r =

x^2 + y^2.

(a) Reduce the Hill’s equation to first order ODEs. (b) Compare all three methods by two parameters: speed of calcu- lations and accuracy. To do this, choose some initial conditions (say, x(0) = dy dt (0) = 1, y(0) = dx dt (0) = 0) and observe the evolu- tion of the solution for a long time T = 200. Provide two plots: trajectory (x, y) and number of calls of RHS in your code vs. error (in log-log scale). What method is fastest to run with fixed local error? (c) Most of numerical methods induce the error in the law of conser- vation of energy. Hill’s model has the first integral

. x^2 +

. y^2 − 3 x^2 −

r

= −C

Test if any of three methods retains the conservation of the first integral. Which method induces the smallest error? Does most accurate method induce the smallest error?