WolframAlpha computational knowledge AI
d/dp [(4p(1-q) + pq + q(4(1-p) + p))/(1 + q)]