OK, a line distance on a parabola is not obtained by integration per se. I replaced your a with \gamma for convenience.
y = gamma(x-alpha)(x-beta) -> gamma*x^2 + (-gamma*alpha - gamma*beta)*x + alpha*beta*gamma
Substitute:
a = gamma
b = -gamma*alpha - gamma*beta
c = alpha*beta*gamma
So one can write:
y = a*x^2 + b*x + c
From this formula (parabola) the focal point f is determined by:
f = (1-D)/(4*a) - (-D)/(4*a)
In which
D = b^2 - 4*a*c
Now first define p as the perpendicular distance from a location on the curve to the vertical axis of symmetry x_p:
p = -b / (2*a) - x_p;
From this the arc length is calculated by:
h = p/2
q = sqrt(f^2+h^2)
s = h*q/f + f* ln (h*q/f)
In which s is the paramatric representations of your curve. The length of a curve is found by using two points s and then the distance between those points, so:
Distance = s_1 - s_2 = (h_1*q_1/f + f * ln (h_1*q_1/f)) - (h_2*q_2/f + f * ln (h_2*q_2/f))
With some simplifications:
Distance = (h_1*q_1 - h_2*q_2)/f + f* ln (( h_1 + q_1) / (h_2 + q_2))
To implement it fully in MatLab is up to you for now. Let me know if you run into any problems.
Good luck and have fun!