A person plans to invest a total of $9000 in an account that pays 3% annual interest and another account which pays 8% annual interest. How much should be invested in each account so that the total interest for one year will be $580.

amount at 3% --- x

amount at 8% --- 9000-x

.03x + .08(9000-x) = 580

solve for x

To solve this problem, we can use a system of equations. Let's represent the amount invested in the 3% account as x and the amount invested in the 8% account as y.

Since the person plans to invest a total of $9000, we have the equation:
x + y = 9000 (1)

The interest earned from the 3% account can be calculated as 0.03x, and the interest earned from the 8% account can be calculated as 0.08y.

The total interest earned for one year is given as $580, so we have the equation:
0.03x + 0.08y = 580 (2)

Now, we can solve this system of equations to find the values of x and y.

There are multiple methods to solve this system of equations, such as substitution or elimination. Let's use the elimination method here:

Multiply equation (1) by 0.03 to make the coefficients of x in both equations equal:
0.03(x + y) = 0.03(9000)
0.03x + 0.03y = 270 (3)

Now, we can subtract equation (3) from equation (2) to eliminate the x variable:
(0.03x + 0.08y) - (0.03x + 0.03y) = 580 - 270
0.08y - 0.03y = 310
0.05y = 310
y = 310 / 0.05
y = 6200

Now, substitute the value of y back into equation (1) to solve for x:
x + 6200 = 9000
x = 9000 - 6200
x = 2800

Therefore, the person should invest $2800 in the account that pays 3% interest and $6200 in the account that pays 8% interest in order to earn a total interest of $580 in one year.