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

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

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 ) deﬁned 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 ﬁnite diﬀerence scheme for the ODE above, using a forward diﬀerence for u x and a symmetric diﬀerence for u xx . (c) Same question as in (b) but use a backward diﬀerence for u x . (d) Same question as in (b) but use a central diﬀerence 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:

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online