The following is very loose, but as an example, consider the derivative operator $D = \frac{d}{dx}$, and some set of finite element basis functions $\varphi_i$ (perhaps Lagrange elements). Take a function to be well-approximated as $f = \sum_i \beta_i \varphi_i$. Then the discretization of $Df$ is something like $$ A_{ij} \beta_j = \left< \varphi_i, \frac{d \varphi_j}{d x} \right> \beta_j $$ with sums over repeated indices implied. For $D^2$, assuming the zero Neumann boundary conditions on the test functions, one can write: $$ B_{ij} = \left< \varphi_i, \frac{d^2 \varphi_j}{dx^2} \right> = -\left< \frac{d \varphi_i}{dx}, \frac{d \varphi_j}{dx} \right> $$ Under what circumstances, if any, is $A^2 = B$? Written explicitly this takes the form: $$ A_{ik} A_{kj} = \left< \varphi_i, \frac{d \varphi_k}{dx} \right> \left< \varphi_k, \frac{d \varphi_j}{dx} \right> \overset{?}{=} -\left< \frac{d \varphi_i}{dx}, \frac{d \varphi_j}{dx} \right> $$ In general, for any linear operator $L$ on a function space, when does this hold?
- 1$\begingroup$ I believe this is true for standard piece wise linear finite elements on an interval. $D$ discretizes to the standard central difference derivative and $D^2$ yields the standard second derivative stencil $\endgroup$whpowell96– whpowell962025-06-26 22:57:13 +00:00Commented Jun 26 at 22:57
- $\begingroup$ The question is what do you mean by $D^2$ here and how do you want to define it? Strong second derivative on linear Lagrange elements is constant or does not exist, weak corresponds to the form $\left< \varphi_i, \frac{d \varphi_j}{d x} \right>$. Strong second derivative is either zero or does not exist, weak corresponds to the form $\left< \frac{d \varphi_i}{dx}, \frac{d \varphi_j}{dx} \right>$, but might also correspond to a weaker formulation. But these are forms $V_h \times V_h \to \mathbb{R}$, you cannot compose them (without some Riesz maps $V_h^* \to V_h$). $\endgroup$Korf– Korf2025-06-27 13:19:16 +00:00Commented Jun 27 at 13:19
1 Answer
The following two assumptions on the set of functions $\{\phi_j\}_{j=1}^N$ guarantee that $B=A^2$:
- The set is orthonormal, i.e. $\langle \phi_j, \phi_j\rangle = \delta_{ij}$;
- The set is closed under $D$, i.e. there are coefficients $\{d_{hk}\}_{h, k=1}^N$ such that $$D\phi_i=\sum_h d_{hi}\phi_h.$$
Proof. By definition, $$ A_{ij}=\langle \phi_i, D\phi_j\rangle= \sum_h d_{hj}\langle \phi_i,\phi_h\rangle=d_{ij}.$$ On the other hand, $$ B_{ij}=\langle \phi_i, D^2\phi_j\rangle=\sum_h\sum_k d_{hj}d_{kh}\langle \phi_i, \phi_k\rangle= \sum_h d_{ih}d_{hj}, $$ so $B_{ij}=\sum_h A_{ih}A_{hj}$, that is, $B=A^2$. $\Box$
Remark. This discussion applies verbatim if $D$ is replaced by any other linear operator.
Example 1. If $D$ is the derivative operator, then letting $e_n(x):=\frac{e^{inx}}{\sqrt{2\pi}}$ we have that, for all $N\in \mathbb N$, the set $\{e_n\}_{n=-N}^N$ satisfies the assumptions 1 and 2 on the interval $[0, 2\pi]$ equipped with the standard scalar product. For a real-valued example, replace $e^{inx}$ by the pair $\cos(nx), \sin(nx)$.
Example 2. This example made up the previous version of this answer. It shows that if you drop condition 2, then the property $B=A^2$ may fail.
On $[0, 2\pi]$ consider $\phi_i(x)=\sin(ix)$, with $i=1, 2$. Since $A_{ij}=\langle \phi_i, D\phi_j\rangle=0$, we have $A_{ij}=0$.
On the other hand, $B_{ij}=-\langle \phi_i, \phi_j\rangle$ is a diagonal nonzero matrix. So it cannot be true that $B=A^2$.
- $\begingroup$ The question is under what conditions on the $\phi$s does the property hold. It is clear that it doesn’t hold in general. $phi$s are just basis functions, not any particular functions we wish to approximate $\endgroup$whpowell96– whpowell962025-06-27 00:05:09 +00:00Commented Jun 27 at 0:05
- $\begingroup$ Ok, then my incomplete answer is in the very last line: I don't know of such properties, but it seems to me to be quite unlikely. $\endgroup$Giuseppe Negro– Giuseppe Negro2025-06-27 00:06:33 +00:00Commented Jun 27 at 0:06
- $\begingroup$ @whpowell96: now the answer is complete. The previous version of the answer is now just a counterexample to show that things can go wrong if some of the assumptions are not met. $\endgroup$Giuseppe Negro– Giuseppe Negro2025-07-12 19:18:44 +00:00Commented Jul 12 at 19:18