I read that a second derivative operator is self-adjoint, namely $\langle L(u),v\rangle=\langle u,L(v)\rangle$ and $L$ is the second derivative operator.
But if I define $$\langle u,v\rangle=\int_0^1 u(x)v(x)\text{d}x,$$ I just don't see how it works if I take, say $ u(x) =x , v(x)=x^2 $. I will have in this case
$$\int_0^1 u(x)''v(x)\text{d}x \ne \int_0^1 u(x)v(x)''\text{d}x$$
I hope someone can clear my confusion. Thanks!
Suppose you are in $L^2(\mathbb R)$ and define $A:=\dfrac{d^2}{dx^2}$. Integrating by parts you have $$\begin{align} (f,Ag)_{L^2(\mathbb R)}&=\int_{-\infty}^{+\infty}f(x)g''(x)dx=[f(x)g'(x)]_{-\infty}^{+\infty}-\int_{-\infty}^{+\infty}f'(x)g'(x)dx\\&=[f(x)g'(x)]_{-\infty}^{+\infty}-[f'(x)g(x)]_{-\infty}^{+\infty}+\int_{-\infty}^{+\infty}f''(x)g(x)dx \end{align}$$ but the boundary terms are zero so we have $$(f,Ag)_{L^2(\mathbb R)}=\int_{-\infty}^{+\infty}f''(x)g(x)dx=(A^{\dagger}f,g)_{L^2(\mathbb R)}\implies A=A^{\dagger}.$$