I m currently reading the book "The finite element method in electromagnetics" written by Jian-Ming Jin.
On page 50 and 51 which I attach as a screenshot below they show for an example functional, that minimizing the functional will lead to the solution of the pde in 3.12.
My question is: In the step 3.8 to 3.9 one did an integration by parts. For this step $\alpha \frac{d\phi}{dx}$ has to be differentiable? If I assume that $\alpha$ to be differentiable, then $\phi$ has to be differentiable twice.
When I minimize the functinal in practice I discretize space and assume in all discretized space intervals for example linear functions (linear element functions). With these linear functions I stick together my $\phi$. But this $\phi$ is then of course only contineous, but not twice differentiable!
Does anyone know a solution to this? Maybe it is okay if the discretization is fine enough?

