Back to Symbolic Math (SymEngine)
sym.rewrite_as_exp
Rewrites trigonometric functions in terms of complex exponentials.
Syntax
sym.rewrite_as_exp(expr)
Description
Rewrites trigonometric functions in terms of complex exponentials. Uses Euler's formula to convert sine and cosine to exponential form: - sin(x) = (e^(ix) - e^(-ix)) / (2i) - cos(x) = (e^(ix) + e^(-ix)) / 2
Parameters
| Name | Description |
|---|---|
| expr | - The expression to rewrite. |
Returns
Expr