Answer: (a) \(m=\frac{1}{6},\; k=1,\; c=\frac{1}{12}\).
(b) Lower quartile \(=\sqrt{3}\), upper quartile \(=4\), so the interquartile range is \(4-\sqrt{3}\).
(a) Since \(\mathrm{P}(X\le 2)=\frac{1}{3}\), we use the first part of the density:
\(\displaystyle \int_0^2 mx\,dx=\frac13\).
So
\(\displaystyle \left[\frac{mx^2}{2}\right]_0^2=\frac13\Rightarrow \frac{m(4)}{2}=\frac13\Rightarrow 2m=\frac13\Rightarrow m=\frac16.\)
Now the total probability is 1, so the probability from \(2\) to \(6\) must be \(\frac23\):
\(\displaystyle \int_2^6\left(\frac{k}{x^2}+c\right)dx=\frac23.\)
Integrating,
\(\displaystyle \left[-\frac{k}{x}+cx\right]_2^6=\frac23.\)
This gives
\(\displaystyle \left(-\frac{k}{6}+6c\right)-\left(-\frac{k}{2}+2c\right)=\frac23\)
\(\displaystyle \frac{k}{3}+4c=\frac23.\)
Multiplying by 3:
\(k+12c=2.\)
Because \(f\) is continuous, the two expressions for the density must agree at \(x=2\):
\(m(2)=\frac{k}{2^2}+c.\)
Using \(m=\frac16\),
\(\displaystyle \frac{1}{3}=\frac{k}{4}+c.\)
Multiplying by 12:
\(3k+12c=4.\)
Now solve the simultaneous equations
\(k+12c=2\)
\(3k+12c=4.\)
Subtracting gives
\(2k=2\Rightarrow k=1.\)
Then
\(1+12c=2\Rightarrow 12c=1\Rightarrow c=\frac{1}{12}.\)
Therefore,
\(m=\frac16,\quad k=1,\quad c=\frac{1}{12}.\)
(b) The lower quartile \(Q_1\) satisfies \(\mathrm{P}(X\le Q_1)=\frac14\).
Since \(\mathrm{P}(X\le 2)=\frac13\), the lower quartile lies in the interval \([0,2]\). So
\(\displaystyle \int_0^{Q_1}\frac16x\,dx=\frac14.\)
Hence
\(\displaystyle \left[\frac{x^2}{12}\right]_0^{Q_1}=\frac14\Rightarrow \frac{Q_1^2}{12}=\frac14\Rightarrow Q_1^2=3.\)
Since \(Q_1\ge 0\),
\(Q_1=\sqrt3.\)
The upper quartile \(Q_3\) satisfies \(\mathrm{P}(X\le Q_3)=\frac34\).
Because \(\frac34\gt\frac13\), this quartile lies in the interval \([2,6]\). So
\(\displaystyle \frac13+\int_2^{Q_3}\left(\frac{1}{x^2}+\frac{1}{12}\right)dx=\frac34.\)
Therefore
\(\displaystyle \int_2^{Q_3}\left(\frac{1}{x^2}+\frac{1}{12}\right)dx=\frac34-\frac13=\frac{5}{12}.\)
Integrating,
\(\displaystyle \left[-\frac1x+\frac{x}{12}\right]_2^{Q_3}=\frac{5}{12}.\)
So
\(\displaystyle \left(-\frac1{Q_3}+\frac{Q_3}{12}\right)-\left(-\frac12+\frac16\right)=\frac{5}{12}.\)
Since \(-\frac12+\frac16=-\frac13\),
\(\displaystyle -\frac1{Q_3}+\frac{Q_3}{12}+\frac13=\frac{5}{12}.\)
Hence
\(\displaystyle -\frac1{Q_3}+\frac{Q_3}{12}=\frac{1}{12}.\)
Multiply by \(12Q_3\):
\(\displaystyle -12+Q_3^2=Q_3.\)
So
\(Q_3^2-Q_3-12=0.\)
Factorising,
\((Q_3-4)(Q_3+3)=0.\)
Since \(Q_3\) must lie between \(2\) and \(6\),
\(Q_3=4.\)
Therefore the interquartile range is
\(\mathrm{IQR}=Q_3-Q_1=4-\sqrt3.\)
So \(\mathrm{IQR}=4-\sqrt3.\)