How does absolute error behave in the boundary conditions of a PDE?
Question 1: Suppose that we apply a numerical method to a partial differential equation with initial and boundary conditions. How does absolute error behave in the boundary conditions of the problem?
Does absolute error always decrease in the boundary conditions?
(the absolute difference between the true solution and a computed solution)
Example. Let's have the following PDE:
$$\partial_tu+3u^2\partial_xu+6(\partial_xu)^3+18u(\partial_xu)(\partial_x^2u)+3u^2\partial_x^3u=0$$ where initial and boundary conditions are ($k$ is a constant)
$$u(x,0)=\frac{4k\sin(x/4)^2}{3} \\ u(0,t)=\frac{4k\sin(kt/4)^2}{3} \\ u(1,t)=\frac{4k\sin\left(\frac{-1}{4}+\frac{kt}{4}\right)^2}{3}$$ and other boundary condition for $u'(0,t)$ is $$u'(0,t)=-\frac{2k\sin(kt/4)\cos(kt/4)}{3}$$
The exact solution is $$u(x,t)=\frac{4k\sin\left(\frac{kt}{4}-\frac{x}{4}\right)^2}{3}$$
After applying a numerical method such as wavelet collocation methods, we have the plot of the absolute error in the following.
Question 2: In the plot, when x goes to zero (one of the boundary conditions), the absolute error is increasing. Is it possible or something is wrong?
Solution 1:
Yes, this is possible and not necessarily an error.
Specifically, the set of possible trial functions for the numerical approximation (a finite dim space of wavelets in this case) most likely does not contain any functions that satisfy all initial and boundary conditions exactly. So there will always be a non-zero error somewhere.