<jupyter_start><jupyter_text>Euler's Formula[back to overview page](index.ipynb)a proof: http://austinrochford.com/posts/2014-02-05-eulers-formula-sympy.html<jupyter_code>import sympy as sp
sp.init_printing()
x = sp.symbols('x', real=True)
exp1 = sp.exp(sp.I * x)
exp1
exp2 = exp1.expand(complex=True)
exp2
exp2.rewrite(sp.exp)<jupyter_output><empty_output><jupyter_text>Euler's identity:<jupyter_code>sp.exp(sp.I * sp.pi) + 1<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15789473684210525, 'fraction_numerical': 0.03289473684210526, 'mean_word_length': 7.622641509433962, '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': '227191', 'license': 'CC0-1.0', 'n_tokens_mistral': 210, 'n_tokens_neox': 199, 'n_words': 25, 'path': 'sympy/euler.ipynb', 'repo_name': 'mgeier/python-audio', 'size': '456'}