Science:Math Exam Resources/Courses/MATH257/December 2011/Question 04 (a)/Solution 1

From UBC Wiki

By the Taylor series expansion,

If we isolate in the above, we get that


Similarly, by Taylor series expansion, we have

and

If we add the two equations above together, we get that

If we isolate in the above, we get that


From these, we see that we can approximate by

and by


Hence, we can approximate the equation

by

If we isolate in the above, we get that

Next we will put mesh points in the interval . Let

where

Here, and . Similarly, we will let the mesh points in be

for some small time step .

Math Exam Resources Courses MATH257 December 2011 Question 4 (a) 4a 2.png


At and , equation (1) becomes

To get the above, we used

.

Using the notation , we can write the above as

If we look at the above equation, we see that for each fixed , it gives us a scheme to compute once is known for .

Math Exam Resources Courses MATH257 December 2011 Question 4 (a) q4a 1.png


For the initial condition , we set

For the boundary condition , we set

Now, for the boundary condition , there is more than one way to handle that. One possible way is to set

which implies

If we allow an extra mesh point to the left of , the above gives

Hence, for , equation (2) can be rewritten as

Math Exam Resources Courses MATH257 December 2011 Question 4 (a) q4a 3.png


Referring to the diagram above, to find an approximate solution to this problem, we first set the initial conditions

and the boundary condition

Then, we compute from by

and

Once we have , we can iterate the process to find