# 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?

• Hello and welcome to math.stackexchange. Please clarify your question: are you interested in the absolute difference between the true solution and a computed solution? What pde are you looking at? What numerical method is being used? Without such details the question is far too vague. As to your second question - of course such a behavior is possible, if the numerical method is not chosen appropriately. Commented Dec 29, 2021 at 22:32
• Dear Prof., thank you for your interest. I edited the post and added an example. But in fact, I wonder if the absolute error always decreases when x goes to boundary conditions? Do you mean that "it depends on PDE and the numerical method. So, it sometimes can increase. It is not a mistake." Right? Commented Dec 30, 2021 at 7:39