I am unable to get anywhere regarding the distance between the incentre and an excentre of $\triangle ABC$. I do know that it is generalised as:
$$IJ_c=c\sec\left(\frac C2\right)$$ For the incenter $I$ and excenter $J_c$, where side $c$ is opposite $\angle C$.
But how can I prove this? Kindly assist.
Consider this diagram:
Consider that the distance between $I$ and $E_c$ is simply: $$d=E_cC-IC\tag{1}$$
And we have: $$\cos \left(\frac C2\right)=\frac{KC}{E_cC}\implies E_cC=\frac{KC}{\cos(C/2)}\\ \cos\left(\frac C2\right)=\frac{T_bC}{IC}\implies IC=\frac{T_bC}{\cos(C/2)}$$ However, we know that $T_bC=\frac{b+a-c}2$. This makes $IC=\frac{b+a-c}{2\cos (C/2)}$, and from $(1)$, we get: $$d=\frac{KC}{\cos(C/2)}-\frac{b+a-c}{2\cos(C/2)}\tag{2}$$ However, looking at the diagram, we know that $KC=b+E_cA\sin(A/2)$, because $KC=b+AK$, and $AK$ is easily derivable using law of sines for right triangles. Therefore, $(2)$ becomes: $$d=\frac{b+E_cA \sin(A/2)}{\cos(C/2)}-\frac{b+a-c}{2\cos(C/2)}\\ \implies d=\frac{b+E_cA\sin(A/2)-\frac{b+a-c}{2}}{\cos (C/2)}$$
However, from the original statement $d=\frac{c}{\cos (C/2)}$, what we only need to show is that: $$b+E_c A\sin(A/2)-\frac{b+a-c}2=c\tag{3}$$
Polishing $(3)$ we get: $$b-a+2E_cA\sin(A/2)=c$$ This implies that in order to get $c$, we need: $$E_cA\sin (A/2)=\frac{a+c-b}{2}\tag{4}$$
From the diagram, consider that $\sin (A/2)$, can be written as: $$\frac{\sin(C/2)}{IA}=\frac{\sin (A/2)}{IC}\implies \sin (A/2)=\frac{IC \sin (C/2)}{IA}\tag{5}$$ Now, see that $IT_b$ is essentially the inradius, which is equal to: $$r=IT_b=IC \sin (C/2)$$ Knowing that the inradius $r$ can be written as (which is easily provable): $$r=\frac{ab\sin C}{a+b+c}$$ Using the value of the updated $(5)$, and substituting it in $(4)$, we get:
$$E_cA\left(\frac{ab\sin C}{(a+b+c)IA}\right)=\frac{a+c-b}2$$ After some, rearrangement, we get: $$\frac{E_cA}{IA}=\frac{(a+b+c)(a-b+c)}{2ab\sin C}\tag{6}$$ Now, consider the right triangle $E_cAI$ and after some angle-chasing, you will get that $\angle I=\frac{a+c}2$. Notice that simply, $\tan \angle I=\frac{E_cA}{IA}$. Using this information, we get: $$\tan\left(\frac{A+C}2\right)=\frac{(a+b+c)(a-b+c)}{2ab\sin C} \tag{7}$$
Expanding the RHS, we get: $$\tan\left(\frac{A+C}2\right)=\frac{a^2-b^2+c^2+2ac}{2ab\sin C} \tag{8}$$ Using the cosine law, we can show that $2ac\cos B=a^2+c^2-b^2$, substituting this in $(8)$ and we get: $$\tan\left(\frac{A+C}2\right)=\frac{2ac\cos B+2ac}{2ab\sin C}=\frac{c(1+\cos B) }{b\sin C}$$ Now replacing $B=\pi - A-C$, we get: $$\tan\left(\frac{A+C}2\right)=\frac{c(1-\cos{(A+C)})}{b\sin C}$$ Using the half-angle formula for $\tan$, we get: $$\frac{\sin (A+C)}{1+\cos(A+C)}=\frac{c(1-\cos{(A+C)})}{b\sin C}\\ b\sin(A+C)\sin C=c(1-\cos^2(A+C))\\ b\sin (A+C)\sin C=c(\sin^2(A+C))\\ \sin(A+C)=\frac{b\sin C}{c}$$ However, using the sine law, we can write $b$ as $b=\frac{c \sin B}{\sin C}$, thus we get: $$\sin(A+C)=\sin B$$ Which is always true since: $$B=\pi-A-C\implies \sin(\pi-A-C)=\sin(A+C)\\ Q.E.D.$$
This proof was very long winded, however. There are many ways to write the distance between the excenters and incenters. For example, you have: $$d=\frac{r_x-r}{\sin(C/2)}$$ For the exradius $r_x$ and in radius $r$. Also, you have $d$: $$d=\frac{r}{\sin(\frac A2)\cos(\frac{A+C}2)}$$