# Length of an arc: arcLen

### 5.19.2 Length of an arc: arcLen

The arcLen command finds the lengths of curves in the plane, which can either be given by an equation or a curve object.

To find the length of a curve given by an equation:

- arcLen takes four arguments:
  - expr, an expression (resp. a list of two expressions [expr1,expr2]) involving a variable x.
  - x, the name of the variable.
  - a and b, two values for the bounds of this variable.
- arcLen(expr,x,a,b) (resp. arcLen([expr1,expr2]x,a,b)) returns the length of the curve defined by y=f(x)=expr (resp. by x1=expr1,x2=expr2) as x varies from a to b, using the formula

  arcLen(f(x),x,a,b)=

  ∫

  b
  a

  √

  f′(x)2+1

  dx

  or

  arcLen(f(x),x,a,b)=

  ∫

  b
  a

  √

  x′(t)2+y′(t)2

  dt

#### Examples.

- Compute the length of the parabola y=x2 from x=0 to x=1.
  Input:
  arcLen(x^2,x,0,1)
  or:
  arcLen([t,t^2],t,0,1)
  Output:

  2

  √

  5

  −ln

  ⎛
  ⎜
  ⎝

  √

  5

  −2

  ⎞
  ⎟
  ⎠

  4

- Compute the length of the curve y=cosh(x) from x=0 to x=ln(2).
  Input:
  arcLen(cosh(x),x,0,log(2))
  Output:

  3
  4

- Compute the length of the circle x=cos(t),y=sin(t) from t=0 to t=2*π.
  Input:
  arcLen([cos(t),sin(t)],t,0,2*pi)
  Output:

  2 π

To find the length of a curve given by a curve object:

- arcLen takes a single argument: curve, a geometric curve defined in one of the graphics chapters (chapters 13 and 14).
- arcLen(curve) returns the length of the curve.

#### Examples.

- Input:
  arcLen(circle(0,1,0,pi/2))
  Output:

  1
  2

  π

- Input:
  arcLen(arc(0,1,pi/2))
  Output:

  1
  4

  π

  √

  2