<jupyter_start><jupyter_text>Stark effect calculationsDemonstrate the calculation of the Stark effect for the lowest few states of hydrogen, and the resulting UV/VIS spectrum<jupyter_code>from sympy import * # use sympy math library
init_printing()
n, l, m = symbols('n, l, m', integer=True)
n_max = 3 # highest value of n to use in the calculation
from sympy.physics.hydrogen import *
r, th, ph = symbols('r, th, ph')
n, l, m = symbols('n,l,m')
integrate(Psi_nlm(3,2,0,r,ph,th)*r*cos(th)*Psi_nlm(3,1,0,r,ph,th)*r**2*sin(th),(ph,0,2*pi),(th,0,pi),(r,0,oo))
integrate(Psi_nlm(3,1,0,r,ph,th)*r*cos(th)*Psi_nlm(3,0,0,r,ph,th)*r**2*sin(th),(ph,0,2*pi),(th,0,pi),(r,0,oo))<jupyter_output><empty_output><jupyter_text>Using the rule $Y_{\ell,m}^* = -Y_{\ell,-m} $:<jupyter_code>integrate(-Psi_nlm(3,2,-1,r,ph,th)*r*cos(th)*Psi_nlm(3,1,1,r,ph,th)*r**2*sin(th),(ph,0,2*pi),(th,0,pi),(r,0,oo))
integrate(-Psi_nlm(3,2,1,r,ph,th)*r*cos(th)*Psi_nlm(3,1,-1,r,ph,th)*r**2*sin(th),(ph,0,2*pi),(th,0,pi),(r,0,oo))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.24366471734892786, 'fraction_numerical': 0.043859649122807015, 'mean_word_length': 10.804597701149426, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '505047', 'license': 'MIT', 'n_tokens_mistral': 510, 'n_tokens_neox': 482, 'n_words': 67, 'path': 'StarkEffect.ipynb', 'repo_name': 'corcoted/Phys475', 'size': '1026'}