I am struggling with the aggregate output of the wholesale sector (Equation 21): Q_t=\mathbb{E}[a_t|a\geq\tilde{a_t}]z_t\phi_tN_t \\
= \Bigg[\int_{\tilde{a_t}}^{\infty}a_t(\frac{f(a_t)}{1-F(\tilde{a_t})})da\Bigg]z_t\phi_tN_t

Now to solve the integral analytically, I assumed a logistic distribution and integrating by parts I get: \int_{\tilde{a_t}}^{\infty}a_tf(a_t)da=\Bigg[a_tF(a_t)\Bigg]_{\tilde{a_t}}^{\infty}-\int_{\tilde{a_t}}^{\infty}F(a_t)da

The problem that arises is that it diverges to infinity \Bigg[a_tF(a_t)\Bigg]_{\tilde{a_t}}^{\infty}=\Bigg[\infty\frac{1}{1+\exp(\frac{-\infty-a}{b})}\Bigg]-\Bigg[\tilde{a_t}\frac{1}{1+\exp(\frac{-\tilde{a_t}-a}{b})}\Bigg] \\
= \infty*1-\Bigg[\tilde{a_t}\frac{1}{1+\exp(\frac{-\tilde{a_t}-a}{b})}\Bigg]

Now I do not know how to proceed, as I cannot write the Model in Dynare because of \infty.

Thank you for the anwer. Unfortunately I really cannot manage to get to the right point. I do not understand how I should procede for giving in dynare the following expression:

Usually, with the stated distributional assumption, you can replace the integral with something that can be entered into the computer. An example is Section 7 “7 Adding BGG-type financial frictions as in Christiano, Motto, Rostagno” in https://www.sas.upenn.edu/~schorf/papers/hb%20forecasting%20appendix.pdf