For a perfectly elastic body, Bulk modulus always remains constant and is defined as, $$B=-V_i \frac{\Delta P}{\Delta V} \tag{1}$$ Which means, $$B \left(\frac{V_f -V_i}{V_i}\right)= -(P_f-P_i)$$
But, the definition of bulk modulus in a lot of places is given as, $$B=-V\frac{dP}{dV}\tag{2}$$ In particular, this definition is used to show that for an ideal gas in an isothermal process, we get $B=P$, i.e., the bulk modulus is equal to the pressure for an ideal gas in constant temperature.
Using the definition ($2$) for an elastic body, we get, $$\frac{B}{V}dV = -dP$$ $$\Rightarrow \int_{V_i}^{V_f} \frac{B}{V}dV= -\int_{P_i}^{P_f}dP$$ $$\Rightarrow B\ln\frac{V_f}{V_i}= -(P_f -P_i) $$
Clearly, this doesn't confirm the definition ($1$).
What is a general definition of bulk modulus that we can get ($1$) for an elastic body and ($2$) for an ideal gas? Also, the general definition should not allow us to use definition ($2$) in the case of an elastic body.
If there is no such general definition, why call the quantities in ($1$) and ($2$) with the same name 'Bulk modulus'?