microsoft/qdk
Publicmirrored fromhttps://github.com/microsoft/qdkAvailable
katas/content/complex_arithmetic/complex_exponents/solution.md
7lines · modecode
| 1 | To start, you'll rewrite the expression $e^{a + bi}$ as a product of two simpler expressions: $ e^a \cdot\ e^{bi} $. |
| 2 | The first part is a real number. |
| 3 | The second part can be expressed using the formula $e^{i\theta} = \cos \theta + i\sin \theta$. |
| 4 | Substituting this into the expression gives: |
| 5 | $$ e^a(\cos b + i\sin b) = \underset{real}{\underbrace{e^a \cos b}} + \underset{imaginary}{\underbrace{e^a \sin b}}i $$ |
| 6 | |
| 7 | @[solution]({"id": "complex_arithmetic__complex_exponents_solution", "codePath": "Solution.qs"}) |
| 8 | |