sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.45k stars 482 forks source link

Add half-angle transformations #32389

Closed 7822f248-ba56-45f1-ab3d-4de7482bdf9f closed 3 months ago

7822f248-ba56-45f1-ab3d-4de7482bdf9f commented 3 years ago

In some circumstances (e.g. integration), it may be useful to rewrite

This ticket implements a method for this transformation.

CC: @slel

Component: symbolics

Author: Emmanuel Charpentier, Samuel Lelièvre

Branch/Commit: u/slelievre/32389 @ a60e101

Reviewer: Samuel Lelièvre, Emmanuel Charpentier

Issue created by migration from https://trac.sagemath.org/ticket/32389

7822f248-ba56-45f1-ab3d-4de7482bdf9f commented 3 years ago

Branch: u/charpent/half_angle

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

2f7d665Half_angle : documentation.
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Commit: 2f7d665

7822f248-ba56-45f1-ab3d-4de7482bdf9f commented 3 years ago
comment:3

This passes ptestlong without any new failure.

==> needs_review, if only to activate patchbots.

7822f248-ba56-45f1-ab3d-4de7482bdf9f commented 3 years ago

Author: Emmanuel Charpentier

7822f248-ba56-45f1-ab3d-4de7482bdf9f commented 3 years ago
comment:5

pycode and blocks fail : minor mistakes. needs_work

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

0f61904Half-angle : fix minor lint squabbles.
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Changed commit from 2f7d665 to 0f61904

7822f248-ba56-45f1-ab3d-4de7482bdf9f commented 3 years ago
comment:7

needs_work to start the patchbots.

slel commented 3 years ago

Description changed:

--- 
+++ 
@@ -1,3 +1,10 @@
-In some circumstances (e. g. integration), it may be useful to replace expressions in sin(h)(x), cos(h)(x), etc... as expressions in tan(h)(x/2).
+In some circumstances (e.g. integration),
+it may be useful to rewrite

-This ticket implements a method for this transformation.
+- expressions in sin(x), cos(x), etc.
+  as expressions in tan(x/2),
+- expressions in sinh(x), cosh(x), etc.
+  as expressions in tanh(x/2)
+
+This ticket implements a method
+for this transformation.
slel commented 3 years ago

Reviewer: Samuel Lelièvre

slel commented 3 years ago
comment:8

This is a good thing to add.

I rebased on Sage 9.4.rc2 and added a commit with:

Set to positive review if you agree with these changes.

slel commented 3 years ago

Changed commit from 0f61904 to a60e101

slel commented 3 years ago

New commits:

aa9339aHalf_angle : code (not yet commented).
a9e702cHalf_angle : documentation.
b5899f7Half-angle : fix minor lint squabbles.
a60e10132389: Improve formatting
slel commented 3 years ago

Changed branch from u/charpent/half_angle to u/slelievre/32389

7822f248-ba56-45f1-ab3d-4de7482bdf9f commented 3 years ago
comment:10

Replying to @slel:

This is a good thing to add.

Indeed... sympy's and giac integrators use this often.

I rebased on Sage 9.4.rc2 and added a commit with:

  • changes from \| to | in FriCAS output reverted: they break tests for me

??? Not for me. Go figure...

  • some refactoring for readability of code ​and examples
    • use half for Integer(1)/Integer(2) (also makes lines shorter)

Smart. I should have thought of this, I didn't...

  • less parentheses, brackets and backslashes in the all(...) test
  • make trig_expand example more compelling by naming a and b
    • some reformatting, in particular :: and ​....: ​for example and test blocks

I'm still struggling with ResStructuredText (too much markup syntaxes : LaTeX, Markdown, Org, Oxygen, WikiFormatting and now this...). Thanks a lot !

  • minor rephrasing, fix spacing and a typo

Set to positive review if you agree with these changes.

Thanks ! I do.

BTW : you should be co-author, but I'm almost sure that Trac will balk at the same name in Author and Reviewer fields.

In the same spirit (probably more useful), you may be interested in my attempt to #10038 (demoivre/exponentialize).

slel commented 3 years ago
comment:11

The FriCAS output can be a different ticket. Maybe it depends on the version of FriCAS.

Trac won't mind us being co-authors and co-reviewers of the ticket. It's frequent.

Regarding #10038, I saw you pushed a branch and I'm planning to look at it soon.

slel commented 3 years ago

Changed author from Emmanuel Charpentier to Emmanuel Charpentier, Samuel Lelièvre

slel commented 3 years ago

Changed reviewer from Samuel Lelièvre to Samuel Lelièvre, Emmanuel Charpentier

slel commented 3 years ago
comment:12

The FriCAS output problem might be fixed by #32279 (see also #32379).

vbraun commented 3 years ago
comment:13

Merge conflict