# Derivative of expanded function wrt expanded variable?

Homework Statement
If I have the following expansion
$$f(r,t) \approx g(r) + \varepsilon \delta g(r,t) + O(\varepsilon^2)$$

This means for other function U(f(r,t))
$$U(f(r,t)) = U( g(r) + \varepsilon \delta g(r,t)) \approx U(g) + \varepsilon \delta g \dfrac{dU}{dg} + O(\varepsilon^2)$$

Then up to linear order in ε how to calculate
$$\dfrac{dU}{df} = \ldots O(\varepsilon^2)?$$

The attempt at a solution

No idea how to approach this:
$$\dfrac{dU}{df} = \dfrac {d U}{d g}\dfrac{dg}{df} = \dfrac{dU/dg}{df/dg} = ?$$

But then again not sure how to calculate this, if I try
$$\dfrac {d U}{d g} = (U(f(r,t)) - U(g))\dfrac{1}{\varepsilon \delta g}$$
This will lead me again to dU/dg

Additionally how to calculate dg/df term