# Table of variations of a function: tabvar

### 5.17.2 Table of variations of a function: tabvar

The table of variations of a function consists of

- The first row, for the variable, which gives the endpoints of subintervals of the domain, as well as any critical points and inflection points.
- The second row, for the derivative, which gives the values of the derivative at the values in the first row (or limits as the variable approaches one of the values) and between them the sign (+ or −) of the derivative in the corresponding subinterval.
- The third row, for the function, which gives the values of the function at the values in the first row, and between them whether the function is increasing or decreasing in the corresponding subinterval.
- The fourth row, for the second derivative, which gives the values of the second derivative at the values in the first row, and between them whether the second derivative is positive or negative (and hence whether the graph is concave up or concave down) in the subinterval.

The tabvar command finds the table of variations of a function.

- tabvar takes one mandatory argument and one optional argument.
  - expr, an expression of a single variable.
  - Optionally, x, the variable (by default, x=x).
- tabvar(expr ⟨ ,x⟩) returns the table of variations of the function f(x) = expr and draws the graph on the DispG screen, accessible with the menu Cfg▸Show▸DispG.

#### Examples.

- Input:
  tabvar(x^2 - x - 2,x)
  Output:

  Function plot x^2-x-2, variable x
  Domain x
  Vertical parabolic asymptote at -infinity
  Vertical parabolic asymptote at +infinity
  Variations x^2-x-2

  ⎡
  ⎢
  ⎢
  ⎢
  ⎢
  ⎢
  ⎢
  ⎢
  ⎢
  ⎢
  ⎣

  x

  −∞

  1
  2

  +∞

  y′=2 x−1 | −∞ | − | 0 | + | +∞

  y=x2−x−2

  +∞

  ↓

  −

  9
  4

  ↑

  +∞

  y″ | 2 | + (⋃) | 2 | + (⋃) | 2

  ⎤
  ⎥
  ⎥
  ⎥
  ⎥
  ⎥
  ⎥
  ⎥
  ⎥
  ⎥
  ⎦

  plotfunc(x^2-x-2,x=((-0.6681472) .. 1.7222552))
  Inside Xcas you can see the function with Cfg>Show>DispG.

- Input:
  tabvar((2*t-1)/(t-1),t)
  Output:

  Function plot (2*t-1)/(t-1), variable t
  Domain t<>1
  Vertical asymptote x=1
  Horizontal asymptote y=2
  Horizontal asymptote y=2
  Variations (2*t-1)/(t-1)

  ⎡
  ⎢
  ⎢
  ⎢
  ⎢
  ⎢
  ⎢
  ⎢
  ⎢
  ⎢
  ⎢
  ⎣

  t | −∞ |  | 1 | 1 |  | +∞

  y′=−

  1

  ⎛ ⎝ | t−1 | ⎞ ⎠ | 2

  0

  −

  ||

  ||

  −

  0

  y=

  2 t−1
  t−1

  2

  ↓

  −∞

  +∞

  ↓

  2

  y″ | 0 | − (⋂ ) | || | || | + (⋃ ) | 0

  ⎤
  ⎥
  ⎥
  ⎥
  ⎥
  ⎥
  ⎥
  ⎥
  ⎥
  ⎥
  ⎥
  ⎦

  plotfunc((2*t-1)/(t-1),t=((-0.1681472) .. 2.2222552))
  Inside Xcas you can see the function with Cfg>Show>DispG.

  Note that in this case, the value 1 appears twice in the first row, so that both one-sided limits of y can be displayed at the vertical asymptote t=1. The values of 2 for y at −∞ and ∞ indicate a horizontal asymptote of y=2.