# Energy functions of linear PDEs

I currently have some troubles generating suitable energy functions to satisfy the given PDEs, especially in the case of non-homogeneous Dirichlet condition. Would really appreciate if someone could help with the following problems:

(a) $-\ div(a{u}) + cu = f$ in $\omega$ where $a,c\in C^{0}(\bar{\omega})$, and they are discontinuous across a portion of the boundary called $\gamma$

$\ \ \ \ \ u = g$ on $\gamma$

$\ \ \ \ \ \ a(\nabla u\cdot v) = 0$ on $\gamma$

(b) $\ -div(a{u}) + cu = f$ in $\omega$

$\ \ \ \ \ a(\nabla u\cdot v) + h(u-g) = k$ on $(\partial{\omega} - \gamma)$

My attempt: I tried guessing the energy function $I[u] = \int_{\omega} [\frac{1}{2}(a\nabla u\cdot \nabla u + cu^2) - fu] dx$. But then when I tried to compute the first variation $\frac{d}{d\epsilon} [I(u+\epsilon h)|_{\epsilon = 0}]$, I ended up with $\int_{\omega} h(\nabla u\cdot v + uc - f)$, which is not equivalent to the Euler-Lagrange function. Plus there is no term involving the boundary condition, which is weird. Due to these reasons, I think I messed up on defining the correct energy function $I[u]$. Could someone please help?

For the other part, I also tried $I[u] = \int_{\omega} [\frac{1}{2}(a\nabla u\cdot \nabla u + cu^2) - fu]dx - \int_{\gamma} [k-h(u-g)]u\ dx$. But the first variation of $I[u]$ also does not give me anything that resembles the original PDE. Could anyone please give me the correct energy function, as well as its corresponding first variation in this problem?

• Nobody wants to help me with this difficult problem? – user177196 Sep 13 '16 at 4:46
• should the part (a) BC's be given on distinct subsets of $\partial\omega$? – Ellya Sep 20 '16 at 22:24
• @ellya: that's correct. But the original problem is only different by requiring $u=g$ on entire $\partial{w}$, while $\grad{u}\cdot v = 0$ on $\gamma$. Otherwise, what are the BCs you are thinking of? – user177196 Sep 21 '16 at 18:08
• it just seems as though two bcs are being imposed at once – Ellya Sep 21 '16 at 21:30
• Well, yes, that's the case. Why not though? – user177196 Sep 21 '16 at 23:31