Mark B. answered 12/26/16
Tutor
5.0
(169)
Programming help with C, C++, Java and more, including Harvard CS50 !
We have 4 unknowns in 2 equations, so there is no unique solution.
For real numbers there are infinite solutions.
If we limit a,b,c,d to positive integers, we can find a few that work:
Subtract the second equation from the first and we get
ab = 2
Then for positive integers, either a = 1, b = 2 or vice-versa.
Case 1: a=1, b=2
plug into bc+cd=4
2c+cd=4
c(2+d)=4
The only combinations of a product of two positive integers to get 4 are:
1x4, 4x1, 2x2
The only one that works with c(2+d) is 1x4
c=1, d=2
Therefore we get a solution:
(a,b,c,d)=(1,2,1,2) and ab + bc = 4
case 2: a=2, b=1
plug into bc+cd=4
c+cd=4
c(1+d)=4
The only combinations if c and d are positive integers are 1x4=4 and 2x2=4
c=1, d=3
c=2, d=1
Therefore we get two more solutions:
(a,b,c,d)=(2,1,1,3) and ab + bc = 3
(a,b,c,d)=(2,1,2,1) and ab + bc = 4
If you allow a,b,c,d to be negative integers and 0 you get more solutions.
If you allow a,b,c,d to be real numbers, you get infinite solutions.
For real numbers there are infinite solutions.
If we limit a,b,c,d to positive integers, we can find a few that work:
Subtract the second equation from the first and we get
ab = 2
Then for positive integers, either a = 1, b = 2 or vice-versa.
Case 1: a=1, b=2
plug into bc+cd=4
2c+cd=4
c(2+d)=4
The only combinations of a product of two positive integers to get 4 are:
1x4, 4x1, 2x2
The only one that works with c(2+d) is 1x4
c=1, d=2
Therefore we get a solution:
(a,b,c,d)=(1,2,1,2) and ab + bc = 4
case 2: a=2, b=1
plug into bc+cd=4
c+cd=4
c(1+d)=4
The only combinations if c and d are positive integers are 1x4=4 and 2x2=4
c=1, d=3
c=2, d=1
Therefore we get two more solutions:
(a,b,c,d)=(2,1,1,3) and ab + bc = 3
(a,b,c,d)=(2,1,2,1) and ab + bc = 4
If you allow a,b,c,d to be negative integers and 0 you get more solutions.
If you allow a,b,c,d to be real numbers, you get infinite solutions.
Mark M.
12/26/16