Is there a mathematical representation that represents the output voltage of a buck or boost converter in discontinuous mode?
Is there a formula that represents the output voltage of a buck \$\color{red}{\boxed{\text{or}}}\$ boost converter in discontinuous mode?

The short answer for a boost converter is this: \$\dfrac{V_{OUT}}{V_{IN}} = \dfrac{1}{2} + \sqrt{\dfrac{1}{4} + \dfrac{D^2\cdot R_{LOAD}}{2\cdot L\cdot F_{SW}}}\$

\$D\$ is duty cycle
\$L\$ is inductance
\$F_{SW}\$ is the switching frequency


Long answer:
For a boost converter, the \$\color{red}{\text{discontinuous}}\$ mode switching cycle comprises three sections: -

Charge the inductor with energy
Transfer that energy to the load
Hold until the next cycle begins (this happens only in discontinuous mode)


If the load current increases, the energy to be transferred needs to increase in order to keep the output voltage constant. This is done by continually sensing the output voltage and adjusting the duty cycle (charge time relative to the whole switching cycle time) if the voltage changes. Duty cycle dictates how much energy needs to be stored and transferred.
To get to the equation at the top you have to start by working out how much &quot;magnetic&quot; power needs to be transferred to the load and this may not be as obvious as you first think.
For instance, you might want Vout to be 16 volts feeding a 5 Ω load and, your input supply (Vin) might be 12 volts. Therefore, the load power is 16²/5 = 51.2 watts. However, that isn't the power that needs to be transferred via the inductor's energy storage mechanism.
In fact, the inductor only needs to &quot;uplift&quot; Vout from 12 volts to 16 volts (Δ 4 volts) hence, the uplift power is somewhat smaller. If we calculate load current (16/5), we get 3.2 amps therefore, the inductor's power-uplift is only 4 volts x 3.2 amps = 12.8 watts.
In the real world we would add-on a few watts for diode forward conduction losses. I'm going to ignore this because, any decent boost-converter will raise its duty cycle (D) to accommodate diode losses. In other words, I can assume that the control loop will do what it needs to do.
So using the &quot;uplift&quot; power calculated from above, the energy (W or work) to be transferred per switching cycle is that power divided by switching frequency \$F_{SW}\$. We can then use the well-know inductor energy formula: -
$$W = \dfrac{L\cdot I^2}{2}$$
From this we can calculate how much current (\$I_{PK}\$) needs to flow into the inductor: -
$$I_{PK} = \sqrt{\dfrac{2\cdot W}{L}}$$
We can then use this well-known formula: -
$$V = L\cdot \dfrac{di}{dt}$$
We can re-arrange it like this: -
$$t_1 = \dfrac{L\cdot I_{PK}}{V_{IN}}$$
Parameter \$t_1\$ is the charge time and duty cycle, \$D = t_1\cdot F_{SW}\$
Summarising the above we get this: -
$$D = \dfrac{1}{V_{IN}}\cdot\sqrt{2\cdot L\cdot F_{SW}\cdot P_{UPLIFT}}$$
This can also be rewritten as: -
$$D = \dfrac{1}{V_{IN}}\cdot\sqrt{\dfrac{2\cdot L\cdot F_{SW}\cdot (V_{OUT}-V_{IN})}{R_{LOAD}}}$$
To get towards the formula at the top needs a little math manipulation using the formula immediately above: -
$$\dfrac{D^2\cdot V_{IN}^2\cdot R_{LOAD}}{2\cdot L\cdot F_{SW}} = V_{OUT}\cdot(V_{OUT}- V_{IN})$$
This can be turned into a quadratic equation: -
$$\dfrac{D^2\cdot R_{LOAD}}{2\cdot L\cdot F_{SW}} = \dfrac{V_{OUT}^2}{V_{IN}^2} - \dfrac{V_{OUT}}{V_{IN}}$$
Which has a solution as shown at the top of the page: -
$$\dfrac{V_{OUT}}{V_{IN}} = \dfrac{1}{2} + \sqrt{\dfrac{1}{4} + \dfrac{D^2\cdot R_{LOAD}}{2\cdot L\cdot F_{SW}}}$$
Picture and formulas from this site. There is also a calculator like this: -