Introduction to Partial Differential Equations;
A Computational approach

Chapter 2: Two-point boundary value problems

line
back

Transparencies

Transparencies presenting this chapter.

Matlab code

green functions surface picture
Green's function This is a short piece of matlab code which compute and plot the Green's function of equation 2.8 in section 2.1.1.
Example 2.5 In this example, we solve a two-point boundary value problem, using a finite difference scheme. The matlab file compute the approximation and plot both the approximation and the exact solution. An error bound is also computed.
Algorithm 2.1 This matlab code solves a tri-diagonal linear system, using algorithm 2.1. It takes four vectors as input, one for each of the three diagonals with non-zero elements, and the right-hand-side vector. Output is the solution vector.
Algorithm 2.1 Same as above, but know the entries on the three diagonals are constants. Input is three constants, for the diagonals, and a right-hand-side vector.
Exercise 2.29 This matlab function computes fourier-coefficients.
Exercise 2.29 This is a matlab script which computes the fourier-approximation g(x) of the function f(x). The function is returned together with the x-arguments as vectors, so you can plot the results.
Project 2.2 ( tar.gz )
Project 2.3 ( zip )
This set of five matlab files, bundled together in either zip or tar.gz format, solve part c and d of project 2.2. A script called RunProj2_2 solves the problem for the given values of alpha, and then estimate the rate of convergence beta. You can also download the files separately, if you prefer: RunProj2_2.m, two_point2_2.m, f.m, q.m and u.m.

Solutions

Most recent update 04.09.1998 by Åsmund.