Q:

How to integrate the infinitesimal spacetime interval?

Consider events A and B with coordinates $(t_A,x_A,y_A,z_A)$ and $(t_B,x_B,y_B,z_B)$ respectively. 
The spacetime interval $\Delta s$ between them is given by $$\Delta s= \sqrt{c^2\Delta t^2-\Delta x^2-\Delta y^2-\Delta z^2}$$
where $\Delta t=t_B-t_A$ etc.
I am trying to prove that the spacetime interval $\Delta s$ can also be found by integrating the  infinitesimal spacetime interval $ds$ using 
$$\Delta s=\int^B_A ds$$
where  $ds$ is given by
$$ds = \sqrt{c^2dt^2-dx^2-dy^2-dz^2}.$$
So I will have to integrate 
$$\int^B_A ds = \int^B_A \sqrt{c^2dt^2-dx^2-dy^2-dz^2}.$$
How can this be integrated to show that $\int^B_A ds = \Delta s$?

A:

Generically, it isn't.  $\int_A^B ds$ is the proper time elapsed along the worldline connecting $A$ and $B$, and its value depends very much on which worldline you choose.  The $\Delta s$ you mention is the proper time along the straight line connecting the events, meaning that it is the proper time as measured by an inertial observer traveling between them.
Explicitly, let $x,y,$ and $z$ be functions of $t$.  We then have
$$\int_{t_i}^{t_f}c\sqrt{1 - \frac{\dot x^2 - \dot y^2 - \dot z^2}{c^2}} dt$$
To go further, you need to specify what the functions $x,y,$ and $z$ are.  In the simplest case, (that of constant velocity), one could have
$$ x(t) = x_i + \frac{(x_f - x_i)}{t_f-t_i} t =x_i +\overline v_x t$$
$$ y(t) = y_i + \overline v_y t $$
$$ z(t) = z_1 + \overline v_z t $$
from there, the integral becomes
$$\int_{t_i}^{t_f} c\sqrt{1-\frac{\overline v_x^2 + \overline v_y^2 + \overline v_z^2}{c^2}} dt = \int_{t_i}^{t_f} c\sqrt{1-\frac{\overline v^2}{c^2}} dt = c\Delta t \sqrt{1-\frac{\overline v^2}{c^2}} $$
$$= \sqrt{ c^2\Delta t^2 - \Delta x^2 - \Delta y^2 - \Delta z^2}$$
However, if you choose a different worldline connecting $A$ and $B$, this will no longer be true.  As a good exercise, you might try the worldline you get by traveling at constant speed $2\overline v$ for half the time (assuming that $\overline v < c/2$, of course), and then sitting still for the remainder.  This is not the worldline of an inertial observer, so we would expect the corresponding proper time to be smaller than before; indeed, you should find that
$$\Delta s=c \frac{\Delta t}{2}\sqrt{1-\frac{4\overline v^2}{c^2}} + c \frac{\Delta t}{2}$$
$$ = \sqrt{\frac{c^2\Delta t^2}{4} - \Delta x^2 - \Delta y^2 - \Delta z^2} + \frac{c \Delta t^2}{2} < \sqrt{c^2\Delta t^2 - \Delta x^2 - \Delta y ^2 - \Delta z^2}$$

