Transfer function of an RC circuit I'm trying to reach the transfer function of an RC circuit which I am told is
$$\frac {V_R} {V_\text{in}} = \frac{R}{\sqrt{(R^2 + \frac {1}{\omega^2 C^2})}} \cos(\omega t - \theta) \, .$$
Is this correct and if so how would I derive it?
So far I've managed to derive $V_R$ and $V_\text{in}$, however can't seem to divide them to achieve the desired result:
$$V_R = IR = \frac{V_oR}{\sqrt{(R^2 + \frac {1}{\omega^2C^2})}}e^{i(\omega t-\theta)}$$
$$V_\text{in} = V_o e^{i\omega t}$$
 A: I'm assuming $V_R$ is taken to be the voltage across the resistor in a series RC circuit.

The transfer function comes directly for the voltage division rule:
$$\frac{V_R}{V_\text{in}} = \frac{Z_{R}}{Z_\text{series}} = \frac{R}{R+\frac{1}{i\omega C}} \, .$$
In this equation $V_R$ and $V_\text{in}$ are phasors, meaning that the actual time dependent voltages are $V_R(t) = \text{Re}( V_R e^{i \omega t})$ and $V_\text{in}(t) = \text{Re}(V_\text{in} e^{i \omega t})$ where $\omega$ is the frequency of the source.
A transfer function is always in the frequency domain and has no time dependence, like your first equation does. If you're only interested in the relative amplitudes of the voltages, then you take the absolute value of the transfer function
$$\left| \frac{V_R}{V_\text{in}} \right| = \frac{R}{\sqrt{R^2 + \frac{1}{(\omega C)^2}}}$$
To find the time dependent voltage, just use the definition of the phasors given above:
\begin{align}
V_R(t)
&= \text{Re}(V_R e^{i \omega t}) \\
&= \text{Re} \left( \frac{R V_0}{R+\frac{1}{i\omega C}} e^{i\omega t} \right)
\end{align}
where we've assumed that the phasor of the source is just $V_0$, i.e. $V_0$ has zero phase.
You can also simplify to write it terms of all real expressions:
$$V_R(t) = \frac{R V_0}{\sqrt{R^2 + \frac{1}{(\omega C)^2}}} \cos(\omega t - \theta)$$
Where $\theta$ is the phase of the transfer function.
Based on your definition of $V_\text{in}$, it looks like the first equation you wrote confuses some of these different forms together. To fix the equation, replace $V_\text{in}$ with $V_0$. The person who told you the equation was probably thinking of $V_\text{in}$ as referring to the amplitude only, in which case it would be correct.
