Gateaux Differential

Hi,

First post so be gentle!

I'm trying to find the Gateaux Differential for the following:

Given the functional:

I have to find the Gateaux Differential. Now, I'm comfortable with finding the Gateaux Differential for but my daft question is, for do I need to substitute into before generating the Gateaux Differential or do I find the Gateaux Differential of first and then substitute into ?