Need help with this phasor transformation I am reading a paper about making a phasor model of an inductor. For this they use phasor transformations.
The voltage over an inductor is calculated by $$v = L  \frac{di}{dt}$$ The current and voltage are in the paper defined as $$i(t) = \Re\left[\bar i(t) e^{j\int \omega_s dt}\right] $$ 
$$v(t) = \Re\left[\bar v(t) e^{j\int \omega_s dt}\right] $$ 
So now you basically fill the current and voltage in the first formula and in the paper they get the following result:
$$ \bar v(t) =L \frac{d}{dt}\bar i(t) +jL\bar i(t)\omega_s(t) $$
Now i tried to do this myself but I don't get to the same answer as they do in the paper. This is what I did:
$$\bar v(t) *\cos \left( \int\omega_s(t)dt\right) = L\frac{d\bar i(t)\cos(\int \omega_sdt)}{dt} $$
$$ \bar v(t) *\cos \left( \int\omega_s(t)dt\right)= L\left(\frac{d\bar i(t)}{dt}\cos(\int\omega_sdt)-\bar i(t)\omega_s(t)\sin(\int\omega_s(t)dt\right)$$
$$\bar v(t) = L\frac{d}{dt}\bar i(t)-\frac{\sin(\int\omega_s(t)dt)}{\cos(\int\omega_s(t)dt)}L\bar i(t)\omega_s(t) $$
$$\bar v(t) = L\frac{d}{dt}\bar i(t)-\tan(\int\omega_s(t)dt)L\bar i(t)\omega_s(t) $$
This is the point where I don't know how to go on. I have never really seen a tangent being equal to the complex number $j$. I think i am almost there but can anyone send me in the right direction on the last step?
Edit: $\omega_s$ is the instantanious frequency which is defined as $$\omega_s(t) = \frac{1}{2\pi}\frac{d\phi(t)}{dt} $$
 A: You may have a typo in your answer.  I suspect that the proper result is
$$\bar v\left( t \right) = L\frac{d}{{dt}}\left( {\,\bar i\left( t \right)} \right) + jL\,\bar i\left( t \right){\omega _s}\left( t \right)$$
To see this, in addition to the real parts of the phasors, we may assume that their imaginary parts (and thus the total complex sums) also fulfill the constitutive relationship.  Then
$$\bar v\left( t \right){e^{j\int {{\omega _s}dt} }} = L\frac{d}{{dt}}\left( {\bar i\left( t \right){e^{j\int {{\omega _s}dt} }}} \right)$$
or
$$\bar v\left( t \right) = L\frac{d}{{dt}}\left( {\bar i\left( t \right){e^{j\int {{\omega _s}dt} }}} \right){e^{ - j\int {{\omega _s}dt} }}$$
Expanding the derivative then leads to the modified result.
A: Now you know how to get to the result but you have still some doubts: "why can't I make use of the real part only?" - said you.
Your difficulties arise from the fact that what you reported from the paper is not fully clear or correct.
Let me just start by changing expression like this:
$$x(t) = \Re\left[\bar x(t) e^{j\int{\omega_sdt}}\right]$$
in
$$x(t)=\Re\left[\bar x(t)e^{j\phi_s(t)}\right]$$ 
where $\phi_s(t) = \int_{t_0}^t\omega_s(\tau)d\tau+\phi_s(t_0)$ in order to have a less cluttered notation (and more importantly in order to take into consideration $\phi_s(t_0)$ even though no effect are apparent by forgetting it)
If one defines a phasor associated to a real function $x(t)$ with this expression:
$$x(t)=\Re\left[\bar x(t)e^{j\phi_s(t)}\right]$$ then two possible
interpretations are usual: one where $\bar x(t)$ a real positive function
(the magnitude of $x(t)$) and another where $\bar x(t)$ a complex function (we are assuming $\phi_s(t)$ is a real function).
First interpretation: $\bar x(t)$ positive real function
This is the interpretation you gave, as I can guess.
There are infinite many ways to choose a phasor given the real function, because you have two real coordinates $\bar x(t)$ and $\phi_s(t)$ for a single real quantity $x(t)$, that is, the phasor has an imaginary part. Here it may be interesting to understand what happens to the model when such an imaginary part is chosen to be not identically zero. In the problem at hand you have two real functions $i(t)$ and $v(t)$ of which you want to get the corresponding phasors. You know the model (what relation exists between the real functions) $v = L\frac{di}{dt}$ and you want an extended model, that is, you want to know how you can accomodate such relation for it to hold between the corresponding phasors.
The arbitrariness in choosing $\bar x(t)$ and $\phi_s(t)$ and then ultimately in choosing the imaginary part is allowed just for one of those phasors, the other is constrained by what we want the extended model to possess as a property.
So in choosing those phasors you must take full generality, in order to be able to set the constraint needed to guarantee extended model property:
$$i(t) = \Re\left[\bar i(t) e^{j\phi_s^i(t)}\right]$$
and
$$v(t) = \Re\left[\bar v(t) e^{j\phi_s^v(t)}\right]$$
Please note that $\phi_s^i(t)$ and $\phi_s^v(t)$ are not equal in general, you are not entitled to choose them arbitrarily equal (that would make impossible choosing the right property for the extended model).
Making the substitution in the original model equation, we have:
$$\bar v(t)\cos\phi_s^v(t) = L \frac{d}{dt}\left(\bar i(t)\cos\phi_s^i(t)\right)$$
and expanding the right-hand side:
$$\bar v(t)\cos\phi_s^v(t) = L \frac{d\bar i}{dt}\cos\phi_s^i(t) -\omega_s^i(t) L\bar i(t)\sin\phi_s^i(t) \tag{a}$$
We see that the real part of the voltage phasor is a (real) linear combination of the imaginary part of the current phasor and the real part of a new phasor $\frac{d\bar i}{dt}e^{j\phi_s^i(t)}$.
A tacit desideratum in a phasor model is that it must remain a linear model if the original model is so. 
The original model says that $\bar v(t)$ is proportional (through a real constant) to the first temporal derivative of $\bar i(t)$.
So the linearity is a constraint that must purposely be imposed, otherwise no benefit in using phasor model would be attained, that is the relation between $\bar v(t)$ and the temporal derivatives of $\bar i(t)$ must be linear as is that between $v(t)$ and $i(t)$.
Anyway, the linearity in the original (real) model and that in the extended (complex) model are different linearities: they are real linearity and complex linearity, respectively.
So we want that $\bar v(t) = \mathcal{L}(t) \frac{d\bar i}{dt} + \mathcal{R}(t) \bar i(t)$, where $\mathcal{L}(t)=\mathcal{l}_{11}(t)+j\mathcal{l}_{12}(t)$ and $\mathcal{R}(t)=\mathcal{r}_{11}(t) + j \mathcal{r}_{12}(t)$ are complex quantities.
Decomplexifying we clearly see what's the difference between real and complex linearity:
$$\begin{bmatrix}
\bar v(t)\cos\phi_s^v(t) \\
\bar v(t)\sin\phi_s^v(t) 
\end{bmatrix}=
\begin{bmatrix}
\phantom{-}\mathcal{l}_{11} & \mathcal{l}_{12} \\
-\mathcal{l}_{12} & \mathcal{l}_{11}
\end{bmatrix}
\begin{bmatrix}
\frac{d\bar i}{dt}\cos\phi_s^i(t) \\
\frac{d\bar i}{dt}\sin\phi_s^i(t) 
\end{bmatrix}+
\begin{bmatrix}
\phantom{-}\mathcal{r}_{11} & \mathcal{r}_{12} \\
-\mathcal{r}_{12} & \mathcal{r}_{11}
\end{bmatrix}
\begin{bmatrix}
\bar i(t)\cos\phi_s^i(t) \\
\bar i(t)\sin\phi_s^i(t) 
\end{bmatrix}$$
that is, the matrices are limited to be orthogonal, $\mathcal{l}_{21}=-\mathcal{l}_{12}$ and $\mathcal{l}_{22}=\mathcal{l}_{11}$ and $\mathcal{r}_{21}=-\mathcal{r}_{12}$ and $\mathcal{r}_{22}=\mathcal{r}_{11}$.
Now we know the first row of the matrices of the decomplexification of $\mathcal{L}(t)$ and $\mathcal{R}(t)$: from $(a)$ you see that $\mathcal{l}_{11}(t) = L$, $\mathcal{l}_{12}(t) = 0$, $\mathcal{r}_{11}(t) = 0$, and $\mathcal{r}_{12}(t) = -\omega_s(t)L$.
It follows that the imaginary part of the voltage phasor is determined:
$$\bar v(t)\sin\phi_s^v(t) = L \frac{d\bar i}{dt}\sin\phi_s^i(t) +\omega_s^i(t) L\bar i(t)\cos\phi_s^i(t) \tag{b}$$
That was the reason why you could not put $\phi_s^v(t)=\phi_s^i(t)$, that is, that degree of freedom was needed to impose the highly desired (complex) linearity of the model.
Now, of course, you can complexify back (summing $(a)$ to $j$ times $(b)$) and observing that 
$$\bar v(t)\cos\phi_s^v(t) = \bar v(t)\cos\phi_s^i(t)\cos\theta_s(t)-\bar v(t)\sin\phi_s^i(t)\sin\theta_s(t)$$
and 
$$\bar v(t)\sin\phi_s^v(t) = \bar v(t)\sin\phi_s^i(t)\cos\theta_s(t)+\bar v(t)\cos\phi_s^i(t)\sin\theta_s(t)$$
where $\theta_s(t) = \phi_s^v(t)-\phi_s^i(t)$,
thus getting:
$$\bar v(t) e^{j\theta_s(t)}= L \frac{d\bar i}{dt} +j\omega_s^i(t) L\bar i(t)$$
Second interpretation: $\bar x(t)$ complex function
This is the intepretation taken by the Authors in the paper.
Let's think of a real function $x(t)$ as one component of a two-component real function (or equivalently as the real part of a complex-valued function) in a given coordinate system. Let's conventionally call this coordinate system stationary. Let's call this complex-valued function phasor in the stationary coordinate system. So we have that $$x(t) = \Re[\bar x_s(t)]$$
Now we want to examine what changes relations involving such phasors undergo when a coordinate system transformation occurs. But we do not want to take into consideration all the possible coordinate system transformations: we are interested only in real plane rotation. Such transformations are multiplicatively represented by all and only all orthogonal matrices of determinant $1$, or in the complex model, by all and only all complex numbers of magnitude $1$.
So this is the coordinate system transformation: $$\bar x_s(t) = \bar x(t)e^{j\phi_s(t)}$$ where $\phi_s(t)$ gives the angular position of the new (conventionally called moving) coordinate system w.r.t. the stationary one.
Now we know a linear differential relation between $v(t)$ and $i(t)$ two temporal real functions, or we can now say between the real part of two phasors in the stationary coordinate system. We want to know how the analytical expression of such a relation changes after a rotational coordinate system transformation. But before doing this we need first to extend the relation to phasors that entails to extend the real linear differential operator to complex-valued functions. We extend by linearity, that is we want that the extended differential is complex linear. So in the stationary coordinate system the relation between the phasors must be:
$$\bar v_s(t) = \mathcal{L_s}(t)\frac{d\bar i_s(t)}{dt}+\mathcal{R_s}(t)\bar i_s(t)$$where $\mathcal{L_s}(t)$ and $\mathcal{R_s}(t)$ are in general complex function, but in this case are real constants, $\mathcal{L_s}(t) = L$ and $\mathcal{R_s}(t) = 0$ .
Being the coordinate system transformations for the phasors be given by:
$$\bar v_s(t) = \bar v(t)e^{j\phi_s(t)}$$
$$\bar i_s(t) = \bar i(t)e^{j\phi_s(t)}$$
we can have the analytical representation of the complex linear differential operator in the moving coordinate system by substitution:
$$\bar v(t)e^{j\phi_s(t)} = \mathcal{L_s}(t)\frac{d}{dt}\left(\bar i(t)e^{j\phi_s(t)}\right)+\mathcal{R_s}(t)\bar i(t)e^{j\phi_s(t)}$$
that expands to:
$$\bar v(t)e^{j\phi_s(t)} = \mathcal{L_s}(t)\frac{d\bar i}{dt}e^{j\phi_s(t)}+\left(\mathcal{R_s}(t)+j\omega_s(t)\mathcal{L_s}(t)\right)\bar i(t)e^{j\phi_s(t)}$$
where $\omega_s(t)=\frac{d\phi_s(t)}{dt}$ is the angular speed of the moving coordinate system w.r.t. the stationary one.
In the end we have:
$$\bar v(t) = \mathcal{L}(t)\frac{d\bar i}{dt}+\mathcal{R}(t)\bar i(t)$$
where
$$\mathcal{L}(t) = \mathcal{L_s}(t)$$
$$\mathcal{R}(t) = \mathcal{R_s}(t)+j\omega_s(t)\mathcal{L_s}(t)$$
that for our particular case yields:
$$\bar v(t) = L\frac{d\bar i}{dt}+j\omega_s(t)L\bar i(t)$$
Conclusions
The two different interpretations gives two different results of course. So one must know what the symbols are, as is always the case.
More importantly, in both cases one can choose the imaginary part of at least one phasor arbitrarily when one has to treat only one real function.
 There are circumstances (electrical machine theory) where both the real and the imaginary parts of the stationary phasor have physical meaning: in such a case phasor models find its best use.
