Project 4
Program multi-wavelet approximation for the function e^x on [0,1], using cubics.
This maple file computes most of the relevant data. It begins with functions that are equal to the legendre polynomials on [0,1] and minus the legendre polynomials on [-1,0]
and transforms them into a wavelet basis. Scaling functions are made from orthonormalized Legendre polynomials, and dilation and wavelet coefficients are computed.
The maple file linked above can be quite useful. As is, it computes wavelet functions, scaling functions, and coefficients for M = 3, the case when we use cubics. Howver, the user can input a different value of M at the start of the maple file and receive correct results for different values of M.
Having done the above calculations, this program computes the wavelet approximation to e^x, up to a maximum accuracy of j=7. Note that this file only computes the projection of e^x onto V_{-j}, not on V_{-j} and W_{-j}. This is because it was accurate enough with just the first projection. An interested user can easily modify the code to also include projection onto W_{-j}.
The code returns two files, output and output2. Output contains the data necessary to graph the approximation of e^x, and output2 contains data necessary to graph the error of the approximation. The approximation was good for all values of j, even coarse ones, so I will omit graphs of the approximation. The graphs of the error are somewhat interesting, however:
Error with j = 1.
Error with j = 2.
Error with j = 6.
Error with j = 7.