Problem with variation formula

Hi,
What problem are you solving? It would be helpful to provide a succinct background with what you are trying to achieve and a minimal example code that reproduces your issue. You can encapsulate your code within triple fences ```python to format it such that it can be run by others.

from dolfin import *
import matplotlib.pyplot as plt

# Parameters of the problem
nx       = 10
epsilon  = 0.1
lmbda    = 1
f        = 1

# Create mesh and define function space
mesh = UnitIntervalMesh(nx)
Q = FunctionSpace(mesh, 'P', 1)

# Define variational problem
u = TrialFunction(Q)
v = TestFunction(Q)

plt.figure(figsize=(10, 5))
plot(mesh, title='Maillage pour n = 10')
a = inner(grad(u), grad(v))*dx + lmbda*inner(u.dx(0), v)*dx

I would also recommend against using the keyword lambda in python.