Opened 5 years ago
Closed 5 years ago
#23108 closed enhancement (fixed)
Add an example to expand_trig
Reported by: | mforets | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.0 |
Component: | symbolics | Keywords: | documentation, trigonometric |
Cc: | rws | Merged in: | |
Authors: | Marcelo Forets | Reviewers: | Travis Scrimshaw |
Report Upstream: | N/A | Work issues: | |
Branch: | 6be6fe7 (Commits, GitHub, GitLab) | Commit: | 6be6fe73c08e38154a8c1ad00f3c959924a96efb |
Dependencies: | Stopgaps: |
Description
Add an example showing expressions do not get trig-expanded if one does not expand them first, in general:
sage: (x, k1, k2) = var('x, k1, k2') sage: cos((k1-k2)*x).expand_trig() cos((k1 - k2)*x) sage: cos((k1-k2)*x).expand().expand_trig() cos(k1*x)*cos(k2*x) + sin(k1*x)*sin(k2*x)
This behavior is stated in the function's description (For best results, self should already be expanded.
.) and this ticket proposes to illustrate it.
Change History (4)
comment:1 Changed 5 years ago by
- Branch set to u/mforets/23108
- Commit set to 6be6fe73c08e38154a8c1ad00f3c959924a96efb
- Status changed from new to needs_review
comment:2 Changed 5 years ago by
- Cc rws added
- Reviewers set to Travis Scrimshaw
- Status changed from needs_review to positive_review
+1 for illustrative examples.
comment:3 Changed 5 years ago by
thanks for the feedback.
comment:4 Changed 5 years ago by
- Branch changed from u/mforets/23108 to 6be6fe73c08e38154a8c1ad00f3c959924a96efb
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
New commits:
add cos example to expand_trig