function out = objective_burial(X,d,N)


% unpack

ee = X(1).*1e-4.*2.7; % m/Myr to g/cm2/yr
tb = X(2).*1e6; % Myr to yr

% Compute steady erosion concentration

N10e = integral(@(t) PofZ((t.*ee),d.profile10).*exp(-d.l10.*t),0,8e6);
N36e = integral(@(t) PofZ((t.*ee),d.profile36).*exp(-d.l36.*t),0,3e6);

% Decay during burial

N10now = N10e.*exp(-d.l10.*tb);
N36now = N36e.*exp(-d.l36.*tb);

out = [N10now-N.N10 N36now-N.N36];