Skip to content

Commit 1ec45d6

Browse files
committed
Fix doctests
1 parent b5ff41a commit 1ec45d6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/doc/en/a_tour_of_sage/index.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ Here we integrate a simple function.
3838

3939
::
4040

41-
sage: var('x') # create a symbolic variable
41+
sage: x = var('x') # create a symbolic variable
4242
sage: integrate(sqrt(x) * sqrt(1 + x), x)
4343
1/4*((x + 1)^(3/2)/x^(3/2) + sqrt(x + 1)/sqrt(x))/((x + 1)^2/x^2 - 2*(x + 1)/x + 1) - 1/8*log(sqrt(x + 1)/sqrt(x) + 1) + 1/8*log(sqrt(x + 1)/sqrt(x) - 1)
4444

4545
This asks Sage to solve a quadratic equation. The symbol ``==`` represents equality in Sage.
4646

4747
::
4848

49-
sage: var('a')
49+
sage: a = var('a')
5050
sage: S = solve(x^2 + x == a, x); S
5151
[x == -1/2*sqrt(4*a + 1) - 1/2, x == 1/2*sqrt(4*a + 1) - 1/2]
5252

@@ -126,8 +126,6 @@ This asks Sage to factor a polynomial in two variables.
126126
x^30*y^30 - x^27*y^33 + x^21*y^39 + x^18*y^42 - x^12*y^48 -
127127
x^9*y^51 + x^3*y^57 + y^60)
128128

129-
::
130-
131129
sage: F.expand()
132130
x^99 + y^99
133131

0 commit comments

Comments
 (0)