# Helmholtz free energy from a relation for entropy

The Legendre transformation defines the helmholtz free energy (at least according to my lectures) as:

$F(T,V,N)=E-TS$

$E(S,V,N)$ and $T=\frac{\partial{E}}{\partial{S}}$

My question is I have a relation for entropy (I won't give it because I want this to be more of a concept based question), in terms of the standard $S(U,N,V)$ where U is the energy, I can re-arrange for energy easily.

Obviously the E and T to put into the equation are pretty standard it quite clearly states to use the function for each but the ENTROPY, do I just write the variable S next to the partial of E wrt S or do I use the relation I have for Entropy?

I assume that your question is: "How do I compute the helmholtz free energy given the dependence of the entropy on the intensive parameters $S(E,N,V)$?"
In this case you start by inverting $S(E,N,V)$ to get a relation for $E(S,N,V)$. Then you can perform the Legendre transform,
$$F(T,N,V) = E(S(T,N,V),N,V) - S(T,N,V) \, T \, ,$$
where the function $S(T,N,V)$ is defined through the relation
$$\frac{\partial E}{\partial S}(S,N,V) \equiv T \, .$$