Assume we have a purely inductive circuit such as below:
To calculate the most general case, \$V_1\$ is given as such:
$$v(t) = V_m \cdot cos(\omega t+q)$$$$v(t) = V_m \cdot \cos(\omega t+\theta)$$
For an inductor, \$V = L \frac{di}{dt}\$\$v(t) = L \dfrac{\mathrm{d}i(t)}{\mathrm{d}t}\$. Writing it in integral form:
$$i(t=0)+\int_0^t v \,dt= i(t)$$$$i(0)+\int_0^t{v(t)\mathrm{d}t}= i(t)$$
Now consider \$i(t=0)=0\$\$i(0)=0\$, meaning there was no current in the system before the source was on:
$$\int_0^t V_m\cdot cos(\omega t+q) \,dt= i(t)$$$$\int_0^t{V_m\cdot \cos(\omega t+\theta) \mathrm{d}t}= i(t)$$
Moreover, the result of the integral, and hence the current:
$$\frac{V_m}{\omega}\cdot(sin(\omega t+q)-sin(q))= i(t)$$$$\dfrac{V_m}{\omega}\cdot(\sin(\omega t+\theta)-\sin(\theta))= i(t)$$
If transformed to their complex counterparts via \$e^{j\omega t} = cos(\omega t)+jsin(\omega t)\$\$\mathrm{e}^{j\omega t} = \cos(\omega t)+j\sin(\omega t)\$, the result, which is the impedance, is not \$j\omega L\$ but some term similar to \$j\omega L\$, but also containing the phase of the voltage source, which shouldn't be there, since impedance is not dependent on the phase of the source.
Where am I going wrong?