HW2 - N j + 1) points on each subinterval I j for the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
MATH 692: Homework 2 Due date: Feb. 19 1. Allen-Cahn Equation: Consider the Allen-Cahn equation: - u xx + 1 ε 2 ( u 3 - u ) = f, x ( - 1 , 1); u ( ± 1) = 0 . (i) Write a program for solving the above equation using a combination the collocation method and Newton’s iteration. Compute the function f with the exact solution u ( x ) = sin( πx ), then use this function f to test your program. (ii) Take f = 0, the initial condition u 0 ( x ) = sin(2 πx ), ε = 0 . 02 and use the Chebyshev- Gauss-Lobatto points with n = 128. Compute and plot the approximate solution. 2. Multi-domain collocation method: (i) Let a = x 0 < x 1 < ··· < x K = b , and denote I j = ( x j - 1 , x j ) for j = 1 , 2 , ··· , K. Write a program for the multi-domain collocation method using (
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: N j + 1) points on each subinterval I j for the problem:-u xx + p ( x ) u x + q ( x ) u = f, x ( a, b ); u ( a ) = u ( b ) = 0 . Test your program with a simple exact solution. (ii) Take x = a =-1, x 1 =-. 2, x 2 = 0, x 3 = 0 . 2 x 4 = b = 1, and p ( x ) = q ( x ) = 1. Use your program to solve the above problem with the exact solution u ( x ) = exp(-100 x 2 ). Determine a good combination of { N j } 4 j =1 such that the maximum error at the Chebyshev-collocation points is less than 10-6 . Compare your result with the one-domain approach. 1...
View Full Document

This document was uploaded on 01/25/2012.

Ask a homework question - tutors are online