I am taking my first course in statistical mechanics, one point that I don't really get is the justification for ignoring higher-order derivatives of entropy w.r.t energy.
We began the course by postulating the microcanonical distribution using the principle of equal a priori probabilities for microstates of an isolated system at equilibrium and then arrived at the canonical distribution by recognizing,
\begin{equation} P_r \propto \mathcal{N_{env}}(E_{total} - E_r) \end{equation}
Where,
$r\, :$ microstate of the system interacting with an environment at temperature T (only allowing exchange of energy).
$E_{r}\, :$ Energy associated with the microstate of the system.
$\mathcal{N_{env}}(E_{total} - E_r) :$ Number of microstates of the environment that satisfy the constraint $E_{total} = E_{r} + E_{env}$
Next, we used $S_{env} =k_{B} \ln (\mathcal{N_{env}}(E_{env}) ) \implies \mathcal{N_{env}}(E_{env}) = e^{\frac{S_{env}(E)}{k_B}}$ and Taylor expanded $S_{env}$ about $E_{total}$ to get,
\begin{equation} \mathcal{N_{env}}(E_{env}) \approx \,e^{\frac{1}{k_B} \left[S_{env}(E_{total}) - \frac{\partial S_{env}}{\partial E_{env}}E_r \right]} \end{equation}
Recognizing $\frac{\partial S_{env}}{\partial E_{env}} = \frac{1}{T}$ we get,
\begin{equation} P_r \,\propto \,e^{-\frac{E_r}{k_BT}}. \end{equation}
The justification given for neglecting higher-order terms say for example $\frac{\partial^2S_{env}}{\partial E_{env}^2} E_r^2$ was that since these are all extensive quantities the scale with number of particles i.e.
\begin{equation} \frac{\partial^2S_{env}}{\partial E_{env}^2} E_r^2 \rightarrow \frac{\partial^2(N_{env}S_{env})}{\partial (N_{env}E_{env})^2} (N_rE_r)^2 = \frac{\partial^2S_{env}}{\partial E_{env}^2} E_r^2 \left( \frac{N_r}{N_{env}}\right). \end{equation} And since $N_r << N_{env}$ this is valid, however, I'm having a hard time convincing myself that this is true since we are dealing with derivatives and we do encounter discontinuities in derivatives quite often in this subject. I faced pretty much the same issue with the Gibbs distribution too.
I'd be grateful for any insights on why this works, and some alternate approach apart from the above-mentioned scaling. I am new to this subject so I'd be fine with a non-rigorous explanation too.