Skip to content

Commit a286790

Browse files
documentation: added documentation to demonstrate how a mathematician would integrate a polynomial w.r.t. x.
1 parent ecb00fc commit a286790

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Math-Tests-Polynomials/PMPolynomialTest.class.st

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ PMPolynomialTest >> testPolynomialHash [
126126
{ #category : #'testing - algebra' }
127127
PMPolynomialTest >> testPolynomialIntegral [
128128
"Code example 2.3"
129+
"
130+
Given p(x) = x^3 + 2x^2 + 7x - 3
131+
then the integral is I(x) = 1/4 x^3 + 2/3 x^3 + 7/2 x^2 - 3x + C, where C is an arbitary
132+
constant.
133+
"
129134

130135
| polynomial expectedCoefficients expected |
131136
polynomial := (PMPolynomial coefficients: #( -3 7 2 1 )) integral.

0 commit comments

Comments
 (0)