```python
import math, cmath
from sympy import *
theta = symbols('theta')
init_printing(use_unicode=True)

def P_l(l):
    """Legendre Polynomial"""
    fx = cos(theta)
    x = cos(theta)
    factor = 1/(2**l * math.factorial(l))
    fx = diff((fx**2 - 1)**l, x, l)
    P_l = factor * fx
    return P_l # SymPy Expression!

def Pm_l(m, l):
    """Associated Legendre Function"""
    fx = cos(theta)
    x = cos(theta)
    factor = (1-fx**2)**(m/2)
    fx = diff(P_l(l), x, abs(m))
    Pm_l = factor * fx
    return Pm_l # SymPy Expression!

def angular_wave_func(m, l, theta_value, phi):
    if m > 0:
        E = (-1)**m
    else:
        E = 1
    A_factor_1 = (2*l+1)/(4*math.pi)
    A_factor_2 = math.factorial(l-abs(m)) / math.factorial(l+abs(m))
    A = math.sqrt(A_factor_1*A_factor_2)
    B = cmath.exp(m*phi*1j)
    C = Pm_l(m,l).subs(theta, theta_value)
    long_ans = complex(E * A * B * C.evalf())
    ans = round(long_ans.real, 5) + round(long_ans.imag, 5)*1j
    return ans
```


```python
print(angular_wave_func (0,0,0,0))
print(angular_wave_func (0,1,cmath.pi ,0))
print(angular_wave_func (1,1,cmath.pi/2,cmath.pi))
print(angular_wave_func (0,2,cmath.pi ,0))
```

    (0.28209+0j)
    (-0.4886+0j)
    (0.34549+0j)
    (0.63078+0j)



```python
import math, cmath
from sympy import *
import scipy.constants as c
e = 2.7182818284590452353602874713526624977572
r, x, a = symbols('r x a')
init_printing(use_unicode=True)

def Lq(q,n):
    """Laguerre Polynomial"""
    factor = e**x
    expression = e**(-x) * x**q
    A = diff(expression, x, q)
    return factor * A

def assoc_Lq(p,q,n):
    """Associated Laguerre Function"""
    factor = (-1)**p
    A = diff(Lq(q,n), x, p)
    assoc_Lq = (factor * A).subs(x,2*r/(n*a))
    return assoc_Lq

def radial_wave_func(n, l, radius):
    bohr=c.physical_constants['Bohr radius'][0]
    A_factor_1 = (2/(n*a))**3
    A_factor_2 = (math.factorial(n-l-1)) / (2*n*(math.factorial(n+l))**3)
    A = (A_factor_1 * A_factor_2)**0.5
    B = e**(-radius/(n*a))
    C = ((2*radius)/(n*a))**l
    p = 2*l + 1
    q = n-l-1+p
    D = assoc_Lq(p,q,n)
    expression = A * B * C * D / (a**(-3/2))
    subbed = expression.subs(r, radius).subs(a, bohr)
    return round(subbed.evalf(), 5)
```


```python
print(radial_wave_func (1,0,a))
print(radial_wave_func (2,1,a))
print(radial_wave_func (2,1,2*a))
print(radial_wave_func (3,1,2*a))
```

    0.73576
    0.12381
    0.15019
    0.08281



```python

```

9686c0071ef8d58728df3df3475c9d8b31fe39b4
ipynb
Jupyter Notebook
Randoms/Week3Chemistry.ipynb
tlkh/DigitalWorld
c59b937faac9a1574c4180f4d75a84c3bf50b86c
MIT
Randoms/Week3Chemistry.ipynb
tlkh/DigitalWorld
c59b937faac9a1574c4180f4d75a84c3bf50b86c
MIT
Randoms/Week3Chemistry.ipynb
tlkh/DigitalWorld
c59b937faac9a1574c4180f4d75a84c3bf50b86c
MIT
Qwen/Qwen-72B
1. YES
2. YES