solve y=x+c*(u-x)+(1-c)*q for q