Try this:
dfdx = @(f,x) (f(x + 1E-8) - f(x)) ./ 1E-8; % Simple Numeric Derivative
a = @(x) (integral(@(x1) sqrt((x+4).*(x1+2)./(x1+1)),0,1, 'ArrayValued',1))
x = linspace(-1, 1, 25);
dadx = dfdx(a,x);
figure
plot(x, dadx)
grid
Make appropriate changes to ‘x’ for your needs.
EDIT —
You can also use the gradient (link) function to calculate the derivative of a (regularly-spaced) vector of values proeuced by your ‘a’ function.
