{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# BVPs - Numerical Methods for Boundary Value Problems BVPs...

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

Numerical Methods for Boundary Value Problems BVPs are usually formulated for y ( x ). Along the x axis, allocate gridpoints x i , i = 0 , . . . , N . BCs will be imposed at x 0 and x N . First and Second Derivative Matrices First and second derivatives at the interior gridpoints x 1 , . . . , x N - 1 will be computed from solution values y = [ y 1 , . . . , y N - 1 ] and BCs y 0 and y N by y = D (1) y and y = D (2) y For N = 10 (BCs are discussed below), D (1) = 1 2 h 0 1 0 0 0 0 0 0 0 - 1 0 1 0 0 0 0 0 0 0 - 1 0 1 0 0 0 0 0 0 0 - 1 0 1 0 0 0 0 0 0 0 - 1 0 1 0 0 0 0 0 0 0 - 1 0 1 0 0 0 0 0 0 0 - 1 0 1 0 0 0 0 0 0 0 - 1 0 1 0 0 0 0 0 0 0 - 1 0 D (2) = 1 h 2 - 2 1 0 0 0 0 0 0 0 1 - 2 1 0 0 0 0 0 0 0 1 - 2 1 0 0 0 0 0 0 0 1 - 2 1 0 0 0 0 0 0 0 1 - 2 1 0 0 0 0 0 0 0 1 - 2 1 0 0 0 0 0 0 0 1 - 2 1 0 0 0 0 0 0 0 1 - 2 1 0 0 0 0 0 0 0 1 - 2

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

View Full Document
Linear BVPs As an example, let’s discretize the linear BVP y + 2 y + y = 0 , y (0) = 1 , y (1) = 0 The discrete equations for y = [ y 1 , . . . , y N - 1 ] are D (2) y + 2 D (1) y + y Ay = b where b = [ - y 0 /h 2 + y 0 /h, 0 , . . . , 0 , - y N /h 2 - y N /h ] incorporates the coupling to the BCs. The solution to the BVP is given by
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 3

BVPs - Numerical Methods for Boundary Value Problems BVPs...

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

View Full Document
Ask a homework question - tutors are online