def METHOD_NAME():
    mesh = IntervalMesh(10, 0, 1)
    V = FunctionSpace(mesh, "Lagrange", 1)
    c = Constant(1, domain=mesh)
    f = Function(V)
    f.vector()[:] = 1
    u = Function(V)
    v = TestFunction(V)
    bc = DirichletBC(V, Constant(1, domain=mesh), "on_boundary")
    F = inner(grad(u), grad(v))*dx - f**2*v*dx
    solve(F == 0, u, bc)
    J = assemble(c**2*u*dx)
    Jhat = ReducedFunctional(J, Control(c))
    assert taylor_test(Jhat, c, Constant(1, domain=mesh)) > 1.9