We can set up a system of two equations in two variables.
First, we define two variables.
Let
x = the amount invested at 4%
y = the amount invested at 8%
The total amount invested was $4000, so we can write the first equation.
x + y = 4000
Now we deal with the interest earned by the two accounts.
x amount invested at 4% earns 0.04x interest in one year.
y amount invested at 8% earns 0.08y interest in one year.
The total interest earned in one year was $200, so now we can write the second equation.
0.04x + 0.08y = 200
Here is our system, of equations.
x + y = 4000
0.04x + 0.08y = 200
I will solve the system of equations using the substitution method.
Solve the first equation for x.
x + y = 4000
x = 4000 - y
Now we substitute 4000 - y for x in the second equation.
0.04(4000 - y) + 0.08y = 200
160 - 0.04y + 0.08y = 200
0.04y = 40
y = 1000
Now substitute 1000 for y in the first equation, and solve for x.
x + y = 4000
x + 1000 = 4000
x = 3000
Answer: $3000 was invested at 4%, and $1000 was invested at 8%