Adjoint problem for convection-diffusion-reaction equation I have given the convection-diffusion-reaction equation
$$-\Delta u+\beta\cdot\nabla u+\gamma u=f\ \text{in}\ \Omega\\
\quad u=0\quad\quad\quad\quad\quad\quad\quad\quad \text{on}\ \partial\Omega
$$
with $\beta\in C^1(\Omega)^d$, $\nabla\cdot\beta=0$ and $\gamma\in L^\infty(\Omega)$.
Now I have to find a bounded linear operator $A:V\to V^*$ such that the the variational formulation correspondents to $Au=l$.
I was simply using $A=-\Delta\cdot+\beta\nabla\cdot+\gamma\cdot$.
To find the adjoint operator I was now doing integration by parts analog to Which means adjoint problem of a differential equation?.
$$
    \int_\Omega (Au)z\ \mathrm dx=\int_\Omega (-\Delta u+\beta\cdot\nabla u+\gamma u)z\ \mathrm dx\\
    =\int_\Omega (-\Delta uz+\beta\cdot\nabla uz+\gamma uz)\ \mathrm dx\\
    =\int_\Omega -\Delta uz\ \mathrm dx+\int_\Omega\beta\cdot\nabla uz\ \mathrm dx+\int_\Omega\gamma uz\ \mathrm dx\\
$$
integration by parts:
$$=u\nabla z-\nabla u z+\beta u z+\int_\Omega (-u\Delta z-\beta u\nabla z+uz)\ \mathrm dx\\
=u\nabla z-\nabla u z+\beta u z+\int_\Omega (-\Delta z-\beta \nabla z+z)u\ \mathrm dx$$
it would be perfect if this would lead to $$\int_\Omega (A^*z)u\ \mathrm dx$$
Did I choose $A$ and $l$ wrong?
 A: You are on the right track.
However, specifying the domain of such an operator is often crucial, and so I choose the domain of your operator $A$ to be $D(A)=H^2(\Omega) \cap H^1_0(\Omega)$ - I hope this is a reasonable assumption.
Indeed, you have to figure out $A^*$ such that
$$
\int_{\Omega} (A^*z)u \; dx=\int_{\Omega} (Au)z \; dx
$$
Integrating by parts is also the right idea, since boundary terms always vanish because of your imposed boundary conditions - but lets quickly split up the occuring terms:
$$
\int_{\Omega} (Au)z \; dx=\underbrace{\int_{\Omega} (-\Delta u)z\; dx}_{:=T_1}+\underbrace{\int_{\Omega} (\beta \cdot \nabla u)z\; dx}_{:=T_2}+\underbrace{\int_{\Omega} (\gamma u) z \; dx}_{:=T_3}
$$
For the first term $T_1$, integrating by parts (sometimes called Green's Formula) twice, which you can do because of the choice of $D(A)$, leads to
$$
\int_{\Omega} (-\Delta u)z\; dx=\int_{\Omega} u(-\Delta z)\; dx
$$
The second term $T_2$ is the tricky one. However, note that you can rewrite the integrand as
$$
z\beta \cdot \nabla u
$$
Then you integrate by parts again. But let us first simplify the following expression using the condition $\nabla \cdot \beta=0$:
$$
\nabla \cdot z \beta=\nabla z \cdot \beta + z \nabla \cdot \beta=\nabla z \cdot \beta
$$
You can now integrate by parts again:
$$
\int_{\Omega} (\beta \cdot \nabla u)z \; dx=\int_{\Omega} u(-\beta \cdot \nabla z)\; dx
$$
Note that we got a minus sign in the process. Therefore $T_2$ is ultimately the reason why $A$ is not symmetric (and therefore not self-adjoint).
The last term $T_3$ is just switching parentheses:
$$
\int_{\Omega} (\gamma u) z \; dx=\int_{\Omega} u(\gamma z)  \; dx
$$
Collection terms you have
$$
\int_{\Omega} (-\Delta z- \beta \cdot \nabla z+ \gamma z)u \; dx
$$
which gives you
$$
A^*=-\Delta - \beta \cdot \nabla + \gamma 
$$
