9.2.3 Increasing the phase by π/2 in a trigonometric expression
The shift_phase command
increases the phase of a trigonometric expression by π/2.
-
shift_phase takes
expr, a trigonometric expression.
- shift_phase(expr) returns
expr with the phase increased by π/2 (after
automatic simplification).
Examples
Quoting the argument will prevent the automatic simplification.
shift_phase('sin(x+pi/2)') |
With an unquoted sine, you get:
since sin(x+pi/2) is evaluated (in this case simplified)
before shift_phase is called, and
shift_phase(cos(x)) returns sin((pi+2*x)/2).