Integral Calculus

Besides the examples on this page, please see the discussion in BasicCalculus.

Definite and Indefinite Integrals

SAGE can compute both definite integrals like \int_0^1 \frac{dx}{x^3+1} and indefinite integrals such as \int \frac{dx}{x^3+1}:

sage: print integrate(1/(x^3+1),x)
                                         2 x - 1
                       2            atan(-------)
                  log(x  - x + 1)        sqrt(3)    log(x + 1)
                - --------------- + ------------- + ----------
                         6             sqrt(3)          3
sage: integrate(1/(x^3+1), x, 0, 1)
(6*log(2) + sqrt(3)*pi)/18 + sqrt(3)*pi/18

More examples:

sage: integrate(1/x^2, x, 1, infinity)
1
sage: f = x^3 
sage: f.integral()
x^4/4
sage: integral(x^3,x)
x^4/4
sage: f = x*sin(x^2)
sage: integral(f,x)
-cos(x^2)/2

The Definite Integral

Indefinite Integrals and Change

Substitution and Symmetry

Applications to Areas, Volume, and Averages

Using Integration to Determine Areas Between Curves

Computing Volumes of Surfaces of Revolution

Average Values

Polar coordinates and complex numbers

Integration Techniques

Integration by parts

Trigonometric integrals

Trigonometric substitutions

Factoring polynomials

Integration of Rational Functions Using Partial Fractions

Approximating Integrals

Regarding numerical approximation of \int_a^bf(x) dx , where f is a piecewise defined function, Sage can

sage: f1 = x^2      
sage: f2 = 5-x^2
sage: f = Piecewise([[(0,1),f1],[(1,2),f2]])
sage: f.trapezoid(4)
Piecewise defined function with 4 parts, [[(0, 1/2), x/2], [(1/2, 1), 9*(x - 1/2)/2 + 1/4], [(1, 3/2), (x - 1)/2 + 5/2], [(3/2, 2), 11/4 - 7*(x - 3/2)/2]]
sage: f.riemann_sum_integral_approximation(6,mode="right")
19/6
sage: f.integral()
3
sage: n(f.integral())
3.00000000000000

Improper Integrals

Integral_Calculus (last edited 2008-11-14 13:42:08 by anonymous)