Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Sage work with maxima 5.47 #35707

Merged
merged 14 commits into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/doc/de/tutorial/interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ deren :math:`i,j` Eintrag gerade :math:`i/j` ist, für :math:`i,j=1,\ldots,4`.
sage: A.eigenvalues()
[[0,4],[3,1]]
sage: A.eigenvectors()
[[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-4/3]],[[1,2,3,4]]]]
[[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-...4/3...]],[[1,2,3,4]]]]

Hier ein anderes Beispiel:

Expand Down Expand Up @@ -335,7 +335,7 @@ Und der letzte ist die berühmte Kleinsche Flasche:
sage: maxima("expr_1: 5*cos(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0) - 10.0")
5*cos(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)-10.0
sage: maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)")
-5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)
-...5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)...
sage: maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))")
5*(cos(x/2)*sin(2*y)-sin(x/2)*cos(y))
sage: maxima.plot3d ("[expr_1, expr_2, expr_3]", "[x, -%pi, %pi]", # not tested
Expand Down
4 changes: 2 additions & 2 deletions src/doc/de/tutorial/tour_algebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ Lösung: Berechnen Sie die Laplace-Transformierte der ersten Gleichung

sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)")
sage: lde1 = de1.laplace("t","s"); lde1
2*((-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)
2*(...-...%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)

Das ist schwierig zu lesen, es besagt jedoch, dass

Expand All @@ -227,7 +227,7 @@ Laplace-Transformierte der zweiten Gleichung:

sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)")
sage: lde2 = de2.laplace("t","s"); lde2
(-%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s
...-...%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s

Dies besagt

Expand Down
2 changes: 1 addition & 1 deletion src/doc/en/constructions/linear_algebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ Another approach is to use the interface with Maxima:
sage: A = maxima("matrix ([1, -4], [1, -1])")
sage: eig = A.eigenvectors()
sage: eig
[[[-sqrt(3)*%i,sqrt(3)*%i],[1,1]], [[[1,(sqrt(3)*%i+1)/4]],[[1,-(sqrt(3)*%i-1)/4]]]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I commented on this one already, but don't see it. I don't know why we're telling people to use the low-level maxima interface to compute the eigenvalues of a 2x2 matrix in a linear algebra tutorial. Personally I would just delete it (and the surrounding explanation).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then the gap section immediately after that should be dropped too. I think we should leave any further doc cleanup for a follow up ticket.

[[[-...sqrt(3)*%i...,sqrt(3)*%i],[1,1]], [[[1,(sqrt(3)*%i+1)/4]],[[1,-...(sqrt(3)*%i-1)/4...]]]]

This tells us that :math:`\vec{v}_1 = [1,(\sqrt{3}i + 1)/4]` is
an eigenvector of :math:`\lambda_1 = - \sqrt{3}i` (which occurs
Expand Down
4 changes: 2 additions & 2 deletions src/doc/en/tutorial/interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ whose :math:`i,j` entry is :math:`i/j`, for
sage: A.eigenvalues()
[[0,4],[3,1]]
sage: A.eigenvectors()
[[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-4/3]],[[1,2,3,4]]]]
[[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-...4/3...]],[[1,2,3,4]]]]

Here's another example:

Expand Down Expand Up @@ -321,7 +321,7 @@ The next plot is the famous Klein bottle (do not type the ``....:``)::
sage: maxima("expr_1: 5*cos(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0) - 10.0")
5*cos(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)-10.0
sage: maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)")
-5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)
-...5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)...
sage: maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))")
5*(cos(x/2)*sin(2*y)-sin(x/2)*cos(y))
sage: maxima.plot3d ("[expr_1, expr_2, expr_3]", "[x, -%pi, %pi]", # not tested
Expand Down
4 changes: 2 additions & 2 deletions src/doc/en/tutorial/tour_algebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ the notation :math:`x=x_{1}`, :math:`y=x_{2}`):

sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)")
sage: lde1 = de1.laplace("t","s"); lde1
2*((-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)
2*(...-...%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)

This is hard to read, but it says that

Expand All @@ -233,7 +233,7 @@ Laplace transform of the second equation:

sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)")
sage: lde2 = de2.laplace("t","s"); lde2
(-%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s
...-...%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s

This says

Expand Down
4 changes: 2 additions & 2 deletions src/doc/es/tutorial/tour_algebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ la notación :math:`x=x_{1}`, :math:`y=x_{2}`):

sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)")
sage: lde1 = de1.laplace("t","s"); lde1
2*((-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)
2*(...-...%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)

El resultado puede ser difícil de leer, pero significa que

Expand All @@ -213,7 +213,7 @@ Toma la transformada de Laplace de la segunda ecuación:

sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)")
sage: lde2 = de2.laplace("t","s"); lde2
(-%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s
...-...%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s

Esto dice

Expand Down
4 changes: 2 additions & 2 deletions src/doc/fr/tutorial/interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ pour :math:`i,j=1,\ldots,4`.
sage: A.eigenvalues()
[[0,4],[3,1]]
sage: A.eigenvectors()
[[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-4/3]],[[1,2,3,4]]]]
[[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-...4/3...]],[[1,2,3,4]]]]

Un deuxième exemple :

Expand Down Expand Up @@ -337,7 +337,7 @@ Et la fameuse bouteille de Klein (n'entrez pas les ``....:``):
sage: maxima("expr_1: 5*cos(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0) - 10.0")
5*cos(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)-10.0
sage: maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)")
-5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)
-...5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)...
sage: maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))")
5*(cos(x/2)*sin(2*y)-sin(x/2)*cos(y))
sage: maxima.plot3d ("[expr_1, expr_2, expr_3]", "[x, -%pi, %pi]", # not tested
Expand Down
4 changes: 2 additions & 2 deletions src/doc/fr/tutorial/tour_algebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Solution : Considérons la transformée de Laplace de la première équation

sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)")
sage: lde1 = de1.laplace("t","s"); lde1
2*((-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)
2*(...-...%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)

La réponse n'est pas très lisible, mais elle signifie que

Expand All @@ -198,7 +198,7 @@ la seconde équation :

sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)")
sage: lde2 = de2.laplace("t","s"); lde2
(-%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s
...-...%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s

Ceci signifie

Expand Down
4 changes: 2 additions & 2 deletions src/doc/it/tutorial/tour_algebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ la notazione :math:`x=x_{1}`, :math:`y=x_{2}`:

sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)")
sage: lde1 = de1.laplace("t","s"); lde1
2*((-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)
2*(...-...%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)

Questo è di difficile lettura, ma dice che

Expand All @@ -199,7 +199,7 @@ trasformata di Laplace della seconda equazione:

sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)")
sage: lde2 = de2.laplace("t","s"); lde2
(-%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s
...-...%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s

che significa

Expand Down
4 changes: 2 additions & 2 deletions src/doc/ja/tutorial/interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ Sage/Maximaインターフェイスの使い方を例示するため,ここで
sage: A.eigenvalues()
[[0,4],[3,1]]
sage: A.eigenvectors()
[[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-4/3]],[[1,2,3,4]]]]
[[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-...4/3...]],[[1,2,3,4]]]]


使用例をもう一つ示す:
Expand Down Expand Up @@ -302,7 +302,7 @@ Sage/Maximaインターフェイスの使い方を例示するため,ここで
sage: maxima("expr_1: 5*cos(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0) - 10.0")
5*cos(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)-10.0
sage: maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)")
-5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)
-...5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)...
sage: maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))")
5*(cos(x/2)*sin(2*y)-sin(x/2)*cos(y))
sage: maxima.plot3d ("[expr_1, expr_2, expr_3]", "[x, -%pi, %pi]", # not tested
Expand Down
4 changes: 2 additions & 2 deletions src/doc/ja/tutorial/tour_algebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Sageを使って常微分方程式を研究することもできる. :math:`x'

sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)")
sage: lde1 = de1.laplace("t","s"); lde1
2*((-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)
2*(...-...%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)

この出力は読みにくいけれども,意味しているのは

Expand All @@ -228,7 +228,7 @@ Sageを使って常微分方程式を研究することもできる. :math:`x'

sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)")
sage: lde2 = de2.laplace("t","s"); lde2
(-%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s
...-...%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s

意味するところは

Expand Down
4 changes: 2 additions & 2 deletions src/doc/pt/tutorial/interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ entrada :math:`i,j` é :math:`i/j`, para :math:`i,j=1,\ldots,4`.
sage: A.eigenvalues()
[[0,4],[3,1]]
sage: A.eigenvectors()
[[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-4/3]],[[1,2,3,4]]]]
[[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-...4/3...]],[[1,2,3,4]]]]

Aqui vai outro exemplo:

Expand Down Expand Up @@ -334,7 +334,7 @@ E agora a famosa garrafa de Klein:
....: "- 10.0")
5*cos(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)-10.0
sage: maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)")
-5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)
-...5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)...
sage: maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))")
5*(cos(x/2)*sin(2*y)-sin(x/2)*cos(y))
sage: maxima.plot3d("[expr_1, expr_2, expr_3]", "[x, -%pi, %pi]", # not tested
Expand Down
4 changes: 2 additions & 2 deletions src/doc/pt/tutorial/tour_algebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ equação (usando a notação :math:`x=x_{1}`, :math:`y=x_{2}`):

sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)")
sage: lde1 = de1.laplace("t","s"); lde1
2*((-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)
2*(...-...%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)

O resultado é um pouco difícil de ler, mas diz que

Expand All @@ -221,7 +221,7 @@ calcule a transformada de Laplace da segunda equação:

sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)")
sage: lde2 = de2.laplace("t","s"); lde2
(-%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s
...-...%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s

O resultado significa que

Expand Down
4 changes: 2 additions & 2 deletions src/doc/ru/tutorial/interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ gnuplot, имеет методы решения и манипуляции мат
sage: A.eigenvalues()
[[0,4],[3,1]]
sage: A.eigenvectors()
[[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-4/3]],[[1,2,3,4]]]]
[[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-...4/3...]],[[1,2,3,4]]]]

Вот другой пример:

Expand Down Expand Up @@ -326,7 +326,7 @@ gnuplot, имеет методы решения и манипуляции мат
sage: maxima("expr_1: 5*cos(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0) - 10.0")
5*cos(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)-10.0
sage: maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)")
-5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)
-...5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)...
sage: maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))")
5*(cos(x/2)*sin(2*y)-sin(x/2)*cos(y))
sage: maxima.plot3d ("[expr_1, expr_2, expr_3]", "[x, -%pi, %pi]", # not tested
Expand Down
4 changes: 2 additions & 2 deletions src/doc/ru/tutorial/tour_algebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ Sage может использоваться для решения диффер

sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)")
sage: lde1 = de1.laplace("t","s"); lde1
2*((-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)
2*(...-...%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)

Данный результат тяжело читаем, однако должен быть понят как

Expand All @@ -212,7 +212,7 @@ Sage может использоваться для решения диффер

sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)")
sage: lde2 = de2.laplace("t","s"); lde2
(-%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s
...-...%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s

Результат:

Expand Down
4 changes: 2 additions & 2 deletions src/sage/calculus/calculus.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ def nintegral(ex, x, a, b,
Now numerically integrating, we see why the answer is wrong::

sage: f.nintegrate(x,0,1)
(-480.0000000000001, 5.32907051820075...e-12, 21, 0)
(-480.000000000000..., 5.32907051820075...e-12, 21, 0)

It is just because every floating point evaluation of return -480.0
in floating point.
Expand Down Expand Up @@ -1336,7 +1336,7 @@ def limit(ex, dir=None, taylor=False, algorithm='maxima', **argv):
sage: limit(floor(x), x=0, dir='+')
0
sage: limit(floor(x), x=0)
und
...nd

Maxima gives the right answer here, too, showing
that :trac:`4142` is fixed::
Expand Down
6 changes: 3 additions & 3 deletions src/sage/calculus/desolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def desolve(de, dvar, ics=None, ivar=None, show_method=False, contrib_ode=False,
Clairaut equation: general and singular solutions::

sage: desolve(diff(y,x)^2+x*diff(y,x)-y==0,y,contrib_ode=True,show_method=True)
[[y(x) == _C^2 + _C*x, y(x) == -1/4*x^2], 'clairault']
[[y(x) == _C^2 + _C*x, y(x) == -1/4*x^2], 'clairau...']

For equations involving more variables we specify an independent variable::

Expand Down Expand Up @@ -1325,15 +1325,15 @@ def desolve_rk4(de, dvar, ics=None, ivar=None, end_points=None, step=0.1, output

sage: x,y = var('x,y')
sage: desolve_rk4(x*y*(2-y),y,ics=[0,1],end_points=1,step=0.5)
[[0, 1], [0.5, 1.12419127424558], [1.0, 1.461590162288825]]
[[0, 1], [0.5, 1.12419127424558], [1.0, 1.46159016228882...]]

Variant 1 for input - we can pass ODE in the form used by
desolve function In this example we integrate backwards, since
``end_points < ics[0]``::

sage: y = function('y')(x)
sage: desolve_rk4(diff(y,x)+y*(y-1) == x-2,y,ics=[1,1],step=0.5, end_points=0)
[[0.0, 8.904257108962112], [0.5, 1.909327945361535], [1, 1]]
[[0.0, 8.904257108962112], [0.5, 1.90932794536153...], [1, 1]]

Here we show how to plot simple pictures. For more advanced
applications use list_plot instead. To see the resulting picture
Expand Down
4 changes: 2 additions & 2 deletions src/sage/functions/bessel.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ class Function_Bessel_J(BuiltinFunction):
1/24*x^3*hypergeometric((3/2,), (5/2, 3), -1/4*x^2)
sage: m = maxima(bessel_J(2, x))
sage: m.integrate(x)
(hypergeometric([3/2],[5/2,3],-_SAGE_VAR_x^2/4)*_SAGE_VAR_x^3)/24
(hypergeometric([3/2],[5/2,3],-..._SAGE_VAR_x^2/4)...*_SAGE_VAR_x^3)/24

Visualization (set plot_points to a higher value to get more detail)::

Expand Down Expand Up @@ -1122,7 +1122,7 @@ def Bessel(*args, **kwds):
sage: f.derivative('_SAGE_VAR_x')
(%pi*csc(%pi*_SAGE_VAR_x) *('diff(bessel_i(-_SAGE_VAR_x,_SAGE_VAR_y),_SAGE_VAR_x,1) -'diff(bessel_i(_SAGE_VAR_x,_SAGE_VAR_y),_SAGE_VAR_x,1))) /2 -%pi*bessel_k(_SAGE_VAR_x,_SAGE_VAR_y)*cot(%pi*_SAGE_VAR_x)
sage: f.derivative('_SAGE_VAR_y')
-(bessel_k(_SAGE_VAR_x+1,_SAGE_VAR_y)+bessel_k(_SAGE_VAR_x-1, _SAGE_VAR_y))/2
-(...bessel_k(_SAGE_VAR_x+1,_SAGE_VAR_y)+bessel_k(_SAGE_VAR_x-1, _SAGE_VAR_y)).../2...

Compute the particular solution to Bessel's Differential Equation that
satisfies `y(1) = 1` and `y'(1) = 1`, then verify the initial conditions
Expand Down
5 changes: 4 additions & 1 deletion src/sage/functions/hypergeometric.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
sage: sum(((2*I)^x/(x^3 + 1)*(1/4)^x), x, 0, oo)
hypergeometric((1, 1, -1/2*I*sqrt(3) - 1/2, 1/2*I*sqrt(3) - 1/2),...
(2, -1/2*I*sqrt(3) + 1/2, 1/2*I*sqrt(3) + 1/2), 1/2*I)
sage: sum((-1)^x/((2*x + 1)*factorial(2*x + 1)), x, 0, oo)
sage: res = sum((-1)^x/((2*x + 1)*factorial(2*x + 1)), x, 0, oo)
sage: res # not tested - depends on maxima version
hypergeometric((1/2,), (3/2, 3/2), -1/4)
sage: res in [hypergeometric((1/2,), (3/2, 3/2), -1/4), sin_integral(1)]
True

Simplification (note that ``simplify_full`` does not yet call
``simplify_hypergeometric``)::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/functions/orthogonal_polys.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ def __init__(self):
sage: chebyshev_U(x, x)._sympy_()
chebyshevu(x, x)
sage: maxima(chebyshev_U(2,x, hold=True))
3*((-(8*(1-_SAGE_VAR_x))/3)+(4*(1-_SAGE_VAR_x)^2)/3+1)
3*(...-...(8*(1-_SAGE_VAR_x))/3)+(4*(1-_SAGE_VAR_x)^2)/3+1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sage: maxima(chebyshev_U(2,x, hold=True)).sage()
4*(x - 1)^2 + 8*x - 5

I don't know what this is trying to acomplish... I guess that maxima knows how to handle chebyshev_U(2, x).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's testing conversion to maxima, so I'm not sure converting back to sage the result makes much sense

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's supposed to be an example of the __init__ method. Why send it to maxima at all?

sage: maxima(chebyshev_U(n,x, hold=True))
chebyshev_u(_SAGE_VAR_n,_SAGE_VAR_x)
"""
Expand Down
2 changes: 1 addition & 1 deletion src/sage/functions/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def __init__(self):
sage: a = floor(5.4 + x); a
floor(x + 5.40000000000000)
sage: a.simplify()
floor(x + 0.4000000000000004) + 5
floor(x + 0.400000000000000...) + 5
sage: a(x=2)
7

Expand Down
2 changes: 1 addition & 1 deletion src/sage/functions/special.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ class EllipticE(BuiltinFunction):
elliptic_e(z, 1)
sage: # this is still wrong: must be abs(sin(z)) + 2*round(z/pi)
sage: elliptic_e(z, 1).simplify()
2*round(z/pi) + sin(z)
2*round(z/pi) ... sin(...z)
sage: elliptic_e(z, 0)
z
sage: elliptic_e(0.5, 0.1) # abs tol 2e-15
Expand Down
Loading