Hi @Mara,
I think you're actually overthinking this a bit. The numerical approach you've already started is the right way to go. Using symsum and int for this problem won't really help you because the sum of multiple lognormal distributions doesn't have a closed-form solution, so MATLAB would just return an unevaluated symbolic expression anyway.
Since you already have actual numerical values for your modes, the numerical integration approach is both more practical and more accurate. Here's how to complete what you started.
The key thing you're missing is normalization. Your total integral should be 1.0, but without normalizing after you sum the modes, it won't be. Here's the complete working code:
binsp = (exp(1/60)*0.7)-0.7;
gfpdf = zeros(size(gf_rng));
pdf_mode = (f0s(i)./sqrt(2.*pi.*(log(sig0s(i))).^2)) .* ...
((log(gf_rng./g0s(i)).^2)./((log(sig0s(i))).^2)));
gfpdf = gfpdf + pdf_mode;
gfpdf_normalized = gfpdf / trapz(gf_rng, gfpdf);
f_act = trapz(gf_rng(idx), gfpdf_normalized(idx))
fprintf('Fraction above GFc = %.4f\n', f_act);
Fraction above GFc = 0.6700
total_integral = trapz(gf_rng, gfpdf_normalized);
fprintf('Total integral (should be ~1): %.4f\n', total_integral);
Total integral (should be ~1): 1.0000
plot(gf_rng, gfpdf_normalized, 'b-', 'LineWidth', 2);
xline(GFc, 'r--', 'LineWidth', 2);
fill([gf_rng(idx), fliplr(gf_rng(idx))], ...
[gfpdf_normalized(idx), zeros(size(gfpdf_normalized(idx)))], ...
title('Bimodal GF-PDF (Normalized)');
legend('GF-PDF', 'GFc cutoff', sprintf('Area = %.4f', f_act));
*Results*: please see attached.
To answer your specific question about where to go from here: the summation is already happening in your loop where you do gfpdf = gfpdf + pdf_mode. That's literally the sum over k modes. You don't need symsum for that. The integration from GFc to infinity is just using trapz on the portion of your range above GFc, which the code above shows with the idx indexing.
For your bimodal case with GFc = 1.3, you should get a fraction around 0.67, which makes sense because most of your second mode centered at 1.5 is above the cutoff, plus a bit of the tail from the first mode at 1.1.
This approach scales easily too. If you end up with 3 or 4 modes later, just add more values to your g0s, sig0s, and f0s arrays and the loop handles it automatically. The functions you already created work fine, you just needed the normalization step and to use trapz for the integration part.
I know you mentioned integration as a whole has been confusing, but I think that confusion was coming from trying to make it symbolic. Once you realize you can just use trapz directly on your numerical arrays (no symbolic function needed), it becomes straightforward. The idx indexing just selects the part of your gf_rng array that's above GFc, and trapz integrates that portion.
Hope this clears things up.