# How to derive the functional for a given differential equation using the variational expression?

In the attached image, I want to understand how to arrive at the equation 2.5.1, i.e. the variational expression. The problem is defined as best as it could and the further derivation follows smoothly.

The complete derivation is as shown in the image below:

I am interested in how the eq 2.1.1 leads to eq 2.5.1 ... or rather how does the variational operator (del) work?

• This doesn't affect the general question, but (2.5.1) is not the variational form of (2.1.1), which contains a Dirichlet (or essential) boundary condition. – Christian Clason Jan 2 '14 at 11:26
• Your title doesn't quite match the question: Are you asking how to derive the variational form of a partial differential equation, or are you actually interested in finding a functional whose minimizer satisfies the variational form of the equation? – Christian Clason Jan 2 '14 at 13:12
• Perhaps you could provide a reference to whatever book or paper this image came from so that we could help you establish the context. I think there must be more information available prior to this point in the discussion. – Bill Barth Jan 2 '14 at 17:04
• (2.5.1) is also not a correct statement of the Neumann boundary term. A term like that (with opposite sign) should arise from integration by parts, but it doesn't appear from thin air when you integrate against a test function. This document appears to be quite confused; you may want to try a different resource. – Jed Brown Jan 3 '14 at 0:17
• Work backwards. The derivation almost never proceeds in the direction this book goes in. You almost always work from 2.5.4, compute a Frechet or Gateaux derivative, set it equal to zero, integrate by parts, and thus (more or less) derive the Euler-Lagrange equation for the functional. This books seems to have it backwards. – Bill Barth Jan 4 '14 at 14:34

In general, the variational problem

$$I[u]=\int_a^b \Bigl(\tfrac12 u_x(x)^2+V(x,u(x))\Bigr)\,dx$$

$$δ I[u,δu]=\int_a^b \Bigl(u_x(x)δu_x(x)+V_u(x,u(x))δu(x)\Bigr)\,dx$$
$$δ I[u,δu]=[u_x(x)δu(x)]_a^b+\int_a^b \Bigl(-u_{xx}(x)+V_u(x,u(x))\Bigr)δu(x)\,dx$$
The boundary conditions lead to $δu(a)=0=δu(b)$, identifying the terms in $u_{xx}=V_u(x,u)$ with the given equation to $V_u=u-x$, thus $V(x,u)=\tfrac12u^2-xu$.
• In going backward. From $u_{xx}=V_u(x,u)$ you identify $V_u(x,u)$ in your equation, integrate to get $V$ (up to a function in $x$) and insert into the general form for $I$. – Dr. Lutz Lehmann Jan 4 '14 at 7:26