For a firm with the production function $$Q = 40L-L^2$$ where $L$ is labor and wage $w = 20$ find supply function of a price-taking firm under perfect competition. Fixed costs equal $10$.
Following similar questions on this board, I've tried the Lagrangian: \begin{align*} &\Phi = 20L + 10 - \lambda(40L-L^2 - Q)\\ &\frac{\partial\Phi}{\partial L} = 20 - \lambda(40-2L)\Rightarrow\lambda=\frac{1}{2}+\frac{10}{L} \end{align*} but this doesn't seem to lead anywhere.
I know that perfect competition implies no profit and $P=MC$, but how do I express $MC=\frac{\partial TC}{\partial Q}$ in terms of $Q$ if I can't get to $TC$? Is there even a way to express $TC$ as a function of $Q$?