# Extremum Function of a Functional

## Homework Statement

J(f)=$\int$ 2xf−f′2+3f2f′dx
f(0)=0,f(1)=−1.

## Homework Equations

Ff-$\frac{d}{dx}$Ff'=0

## The Attempt at a Solution

Ff=2x+6f f''
Ff'=-2f' + 6f2

Plugging in, I get:
2x+6f f''- [itex]\frac{d}{dx} (-2f' + 6f2)

2x+6f f''-12f f'-2f''=0

Which doesn't look correct to me.
I'm guessing my mistake was in the differentiation, but I don't see it.