# Minimize a function of a variable of four variables and one parameter with constraints

I just started to use Mathematica. Using the following simple command to minimize a function of variables $$a,b,c,d$$ with parameter $$n$$, it takes too much time. Do you know if there is a mistake in this command syntax?

Minimize[{((b (b - 1)/2)*(c + d) +
b*a*(c + d) + (d (d - 1)/2)*(a + b) +
c*d*(a + b))/((a + b)*(a + b - 1)*(c + d)/
2 + (c + d)*(c + d - 1)*(a + b)/2), a + c == n && b + d == n && n >= 1000 a >= 1 && b >= 0 && c >= 1 && d >= 0}, {a, b, c, d}]

• Just a little curious: is there a comma missed? n >= 1000 a >= 1 or n >= 1000, a >= 1? Commented Sep 8, 2020 at 15:14
• If I guess right,Minimize[{((b (b - 1)/2)*(c + d) + b*a*(c + d) + (d (d - 1)/2)*(a + b) + c*d*(a + b))/((a + b)*(a + b - 1)*(c + d)/ 2 + (c + d)*(c + d - 1)*(a + b)/2), a + c == n, b + d == n, n >= 1000 , a >= 1, b >= 0, c >= 1, d >= 0}, {a, b, c, d}] returns what you want. Commented Sep 8, 2020 at 15:16
• Thank you a lot @wuyudi! Commented Sep 8, 2020 at 15:29

Assuming[n >= 1000,