Here is my code
var("w0, pi, D, I")
A = matrix(SR, 2, 2, [[w0, 1],[w0-pi,1]])
y = vector([w0-D, w0-D-pi+I])
sol=A.solve_right(y)
sola=sol[0].full_simplify().function(D, pi, I, w0)
solb=sol[1].full_simplify().function(D, pi, I, w0)
f(x, D, pi, I, w0)=sola*x + solb
show(f(x, D, pi, I, w0))
f_x = f.diff(x).full_simplify()
show(f_x)
f_I = f.diff(I).full_simplify()
show(f_I)
Now, I make some assumptions and I verify the sign of $f_x$ and $f_I$.
assume(I, "real")
assume(pi, "real")
assume(I > pi)
bool(f_x < 0)
assume(w0, "real")
assume(x, "real")
assume(w0 > x)
bool(f_I > 0)
What is weird is that the result doesn't change should I ask for bool(f_x < 0)
or bool(f_x > 0)
and the same for $f_I$.