Can someone give me a mathematical proof of this statement?
If a bond trades at a discount, its yield to maturity will exceed its coupon rate.
If a bond trades at a discount, $P<FV$.
$\displaystyle\implies CPN\times\frac{1}{YTM_n}\left(1-\frac{1}{(1+YTM_n)^n}\right)+\frac{FV}{(1+YTM_n)^n}<FV$
$\displaystyle\implies CPN\times\frac{1}{YTM_n}\left(1-\frac{1}{(1+YTM_n)^n}\right)<FV-\frac{FV}{(1+YTM_n)^n}$
$\displaystyle\implies CPN\times\frac{1}{YTM_n}\left(1-\frac{1}{(1+YTM_n)^n}\right)<FV\left(1-\frac{1}{(1+YTM_n)^n}\right)$ --------------(1)
$\displaystyle YTM_n>0\implies 1+YTM_n>1\implies(1+YTM_n)^n>1\implies\frac{1}{(1+YTM_n)^n}<1\implies 1-\frac{1}{(1+YTM_n)^n}>0$
So, we divide both sides of (1) by $\displaystyle 1-\frac{1}{(1+YTM_n)^n}$ to get
$\displaystyle CPN\times\frac{1}{YTM_n}<FV$
$\displaystyle\implies\frac{CPN}{FV}<YTM_n$
$\displaystyle\implies r<YTM_n$
$\displaystyle\implies YTM_n>r$
QED
The tricky part of this question is that it does not specify that we are on a coupon date. If we are away from a coupon date, we normally assume that if we say that a bond “is trading at a discount”, we are talking about the clean price (which excludes accrued interest).
On a coupon date, we can use a simplified pricing formula and derive the relationship (as seen in another answer here).
The exact formula for the clean price will depend on the market convention. However, we could use the following structure for all market conventions.