I'm trying to ListPlot3D
the following function
$f=\frac{-\frac{(t-1) (d-s) \left(2 c d (d (q-1)+s)-s \left(-2 d^2+d (s+2)+s^2\right)\right)}{2 s^2}+d^2-d s-d t+s t}{s}$
against $c \in [0,1]$ and $q \in [1,2]$ under the conditions of $s=2$, $d=0.8$, $t=0$, $0\leq c \leq 1$, and $1 \leq q \leq \frac{1}{c}$.
I'm struggling with how to reflect the last condition, i.e. $1 \leq q \leq \frac{1}{c}$ in my Mathematica code. I used Assumption
but didn't work.
Here is the code I tried:
Block[{s = 2, d = 0.8, t = 0}, f = (d^2 - d s - ((d - s) (2 c d (d (-1 + q) + s) - s (-2 d^2 + s^2 + d (2 + s))) (-1 + t))/(2 s^2) - d t + s t)/s; maxn = Flatten[Table[{c, q, f}, {c, 0, 1, .1}, {q, 1, 2, .1}, Assumptions -> {0 < c <= 1, 1 <= q <= 1/c}], 1];] {ListPlot3D[maxn, AxesLabel -> {"c", "q", "V"}]}