I'm having trouble understanding the maths for impedance.
Suppose we have a voltage of \$V(t)=V_{0}sin({\omega}t)\$ and we plug this into the capacitor equation \$I(t)=C\frac{dV(t)}{dt}\$. This would yield, $$I(t)=C\frac{d}{dt}V_{0}sin({\omega}t)$$ Pulling \$V_0\$ out (as it's a constant) and taking a derivative yields, $$I(t)=V_{0}C{\omega}cos({\omega}t)$$ Now we know that impedance is \$\frac{V(t)}{I(t)}=Z\$. Therefore If I try to calculate impedance by dividing the voltage by current, I would get, $$\frac{V(t)}{I(t)}=\frac{V_0sin({\omega}t)}{V_{0}C{\omega}cos({\omega}t)}$$ Simplifying this yields, $$\frac{V(t)}{I(t)}=\frac{1}{{\omega}C}*\frac{sin({\omega}t)}{cos({\omega}t)}$$ Therefore our \$Z\$ would be $$Z=\frac{1}{{\omega}C}*\frac{sin({\omega}t)}{cos({\omega}t)}$$ However capacitors impedance Z is equal to $$Z = \frac{1}{{\omega}C}*-j$$ So my question is How does \$\frac{sin({\omega}t)}{cos({\omega}t)} = -j\$? or since \$\frac{sin({\omega}t)}{cos({\omega}t)}=tan({\omega}t)\$, I can rewrite my question as How does \$tan({\omega}t)=-j\$?