Derive the Cost Function TC(Q) Suppose $F(K,L)= 50L^{\frac{1}{2}}K^{\frac{1}{2}}$, the wage is $w = 5$
   (euros) and rent is $r = 20$ (euros). What is the cost of producing
  $1000$ units? Derive the cost function $TC(Q)$.


I know how to find out the cost. 

$L = 40$ and $K = 10$. So the total cost is $400$.

But now I am stuck. The solution for the cost function should be: $$TC(Q) = 5\cdot \dfrac{4Q}{100} + 20\cdot \dfrac{Q}{100} = \dfrac{2}{5}Q$$
How do I get to this function?
You are trying to find the solution of $K$ and $L$ in terms of $Q$ to derive the total cost function with respect to quantity.

Page 13 of this lecture has the exact question you are interested in. (Google is your friend.)


From the Lagrangian you'll have $\frac{K}{L}=\frac{w}{r}$
From the production constraint you'll have $50K^{\frac{1}{2}}L^{\frac{1}{2}} = 1000$ and you have already derived the solution to this.


The first implies that $4K = L$ given your solution.

Then since,
$50K^{\frac{1}{2}}L^{\frac{1}{2}} = Q$

$$\implies 50K^{\frac{1}{2}}(4K)^{\frac{1}{2}} = Q \\
\implies 100K = Q \\
\implies K(Q) = \frac{Q}{100}$$

A similar solution can be found for $L(Q)$, and then it should be smooth sailing for you from there.