Integrals and limits

### 5.20.7 Integrals and limits

The limit command (see Section 5.18) can compute limits involving integrals.subsubsection*Examples.

- Find the limit, as a approaches +∞, of

  | ∫ |
  a
  2
  1
  x2
  | dx

  Input (if a is assigned, first input purge(a)):
  limit(integrate(1/(x^2),x,2,a),a,+(infinity))
  Output:

  1
  2

  Since ∫2a1/x2dx = 1/2 − 1/a, the integral ∫2a1/x2dx tends to 1/2 as a goes to infinity.
- Find the limit, as a approaches +∞, of

  | ∫ |
  a
  2
  |  | ⎛ ⎜ ⎜ ⎝ |
  x
  x2−1
  | +ln | ⎛ ⎜ ⎜ ⎝ |
  x+1
  x−1
  | ⎞ ⎟ ⎟ ⎠ | ⎞ ⎟ ⎟ ⎠ | dx

  Input (if a is assigned, first input purge(a):
  limit(integrate(x/(x^2-1)+log((x+1)/(x-1)),x,2,a),a,+infinity)
  Output:

  +∞

  Since ∫2a x/(x2−1) dx = (1/2)(ln(a2−1) − ln(3)) and ∫2aln((x+1)/(x−1))dx = ln(a+1) + ln(a−1) +aln((a+1)/(a−1))−3ln(3), the integral ∫2ax/(x2−1) + ln((x+1)/(x−1))dx goes to infinity as a goes to infinity.
- For an example when the integral can’t be simply evaluated, find the limit, as a approaches 0, of

  ∫ |
  3a
  a
  cos(x)
  x
  | dx

  Input:
  limit(int(cos(x)/x,x,a,3a),a,0)
  Output:

  ln | ⎛ ⎝ | 3 | ⎞ ⎠

  To find this limit yourself, you can note that 1−x2/2 ≤ cos(x) ≤ 1, and so 1/x − x/2 ≤ cos(x)/x ≤ 1/x, and so ∫a3a1/x−x/2 dx ≤ ∫a3acos(x)/x dx ≤ ∫a3a1/x dx, which gives you ln(3) − 2a2 ≤ ∫a3acos(x)/x dx ≤ ln(3), and so as a approaches 0, ∫a3acos(x)/x dx will approach ln(3).