hw1 - Math 623 W 2007 Homework 1 For full credit your...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Math 623, W 2007: Homework 1. For full credit, your solutions must be clearly presented and all code included. (1) Consider the following initial value problem for the function u = u ( x ) defined for 0 x 1. u xx + xu x + u = 0 and u (0) = 1 ,u x (0) = 0 . (a) What is the exact solution u ( x )? Hint : it is of the form u ( x ) = e φ ( x ) for a polynomial φ ( x ). (b) Write down the finite difference scheme for the ODE above, using a forward difference for u x and a symmetric difference for u xx . (c) Same question as in (b) but use a backward difference for u x . (d) Same question as in (b) but use a central difference for u x . (e) Let ± n be the error at grid point n , i.e. ± n = u n - u ( n Δ x ). Using your answers to (a)-(d), compute the values of ± N ( N = 1 / Δ x ) for Δ x = 2 - 1 , 2 - 2 , 2 - 3 ,... (until the computations become too slow for your computer). Do this for all three schemes in (b)-(d). Plot - log | ± N | as a function of - log Δ x . What do you observe? (2) Consider the following PDE:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

hw1 - Math 623 W 2007 Homework 1 For full credit your...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online