```python
import numpy as np
import math
import matplotlib.pyplot as plt
import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D
from IPython.display import display
from IPython.display import display_latex
import sympy
import sympy as sp
from sympy import Eq, symbols, simplify, trigsimp, pi
from sympy.functions.special.tensor_functions import KroneckerDelta
from sympy.vector import Vector, CoordSys3D, AxisOrienter, BodyOrienter, Del, curl, divergence, gradient, is_conservative, is_solenoidal, scalar_potential, Point, scalar_potential_difference, Del, express, matrix_to_vector
from sympy import latex, Array, Matrix, transpose, zeros, diff, Function, Derivative, cos, sin, sqrt, solve, linsolve, acos, atan, asin

from sympy.plotting import plot, plot_parametric
```


```python
# Usage: display_equation('u_x', x)
def display_equation(idx, symObj):
    if(isinstance(idx, str)):
        eqn = '\\[' + idx + ' = ' + latex(symObj) + '\\]'
        display_latex(eqn, raw=True)
    else:
        eqn = '\\[' + latex(idx) + ' = ' + latex(symObj) + '\\]'
        display_latex(eqn, raw=True)
    return
```


```python
import unittest

class TestNotebook(unittest.TestCase):
    
    def test_add(self):
        self.assertEqual(2 + 2, 4)
        

unittest.main(argv=[''], verbosity=2, exit=False)
```

    test_add (__main__.TestNotebook) ... ok
    
    ----------------------------------------------------------------------
    Ran 1 test in 0.002s
    
    OK





    <unittest.main.TestProgram at 0x179a09e29a0>



$v(t) = V_msin(wt + \phi)$  
where  
$V_m$ = the amplitude  
$w$ = the angular frequency in radians/s  
$\omega t + \phi$ = the argument of the sinusoid  
$\phi$ = the phase 

$T = \frac{2 \pi}{\omega}$


```python
V_m, omega, m, t, T, phi, theta = symbols('V_m omega m t T phi theta')
```


```python
T = 2*pi/omega
V_m = sin(omega * (t + T))
display_equation('V_m', V_m)
V_m = trigsimp(simplify(V_m))
display_equation('V_m', V_m)
display_equation('T', T)
display_equation('V_m', V_m)
#N(V_m, 5)
#V_m.evalf()
#V_m.subs(t, 2).subs(omega, 30)
```


\[V_m = \sin{\left(\omega \left(t + \frac{2 \pi}{\omega}\right) \right)}\]



\[V_m = \sin{\left(\omega t \right)}\]



\[T = \frac{2 \pi}{\omega}\]



\[V_m = \sin{\left(\omega t \right)}\]


Periodic Function

$f = \frac{1}{T}$  
$\omega = 2 \pi f$  


```python
wt = symbols('wt')
V_m = sin(wt + phi)
aplot = plot(V_m.subs(phi, 0), V_m.subs(phi, pi / 2), (wt, 0, 2*pi))
aplot[0].line_color = 'b'
aplot[1].line_color = 'r'
aplot.show()
```

Note: Graphical method for phase shift is a blessing

$z = x + jy$ Rectangular form  
$z = r \angle\phi$ Polar form  
$z = re^{j \phi }$ Exponential form  
$z = x + jy = r\angle\phi = re^{\pm j \phi} = r(cos\phi + j sin\phi)$

Addition and subtraction of complex numbers are better performed
in rectangular form; multiplication and division are better done in polar
form.

$e^{\pm j \phi} = cos\phi \pm jsin\phi$  
$cos\phi = Re(e^{j\phi})$  
$sin\phi = Im(e^{j\phi})$  

$v(t) = V_mcos(\omega t + \phi) = Re(V_m e^{j(\omega t + \phi)}) = Re(V_m e^{j(\omega t + \phi)}) = Re(V_m e^{j\omega t} e^{j\phi)})$

Thus,



```python

```

f764a667678a070a0d7ce1ee5afd6d323833a313
ipynb
Jupyter Notebook
.ipynb_checkpoints/AC_Circuits-checkpoint.ipynb
Valentine-Efagene/Jupyter-Notebooks
91a1d98354a270d214316eba21e4a435b3e17f5d
MIT
.ipynb_checkpoints/AC_Circuits-checkpoint.ipynb
Valentine-Efagene/Jupyter-Notebooks
91a1d98354a270d214316eba21e4a435b3e17f5d
MIT
.ipynb_checkpoints/AC_Circuits-checkpoint.ipynb
Valentine-Efagene/Jupyter-Notebooks
91a1d98354a270d214316eba21e4a435b3e17f5d
MIT
Qwen/Qwen-72B
1. YES
2. YES