It's not really a math problem. The equations of the discharge of a capacitor through a resistor are :
$\begin{cases} V(t)=RI(t) \\\ I(t)=-C\frac{dV}{dt} \end{cases}$ $\quad\to\quad V(t)=-RC\frac{dV}{dt}$
If the resistor is standard (constant value) solving the ODE leads to $\quad V(t)=V_0e^{-\frac{t}{RC}}\quad$, so an exponential decay of voltage.
Suppose that we want a linear decay, such as $\quad V(t)=V_0(1-\alpha t)$, then the resistor must be variable, so that $\quad \frac{dV}{dt}=-V_0\alpha \quad\to\quad V=(-R(t)C)(-V_0\alpha)=V_0(1-\alpha t)$ $$R(t)=\frac{1-\alpha t}{\alpha C}$$ At this point, we come back to a physical problem : How can the resistor varie ? It isn't indicated in the wording of the question, so, we cannot go further. In any case, $\frac{dV}{dt}$ must be constant, hence the current $I$ must be constant. This means that the resistor must be very special : For any voltage applied, he must let pass a constant current through it.