Mary has a total of $5000 invested in two accounts. One account pays 5% and the other 8%. Her interest in the first year was $331. Write and solve a system of equations to find out how much she has invested in both accounts

x = 05

y= 0.08

x + y = 5000
0.05x + .08y = 331


x + y = 5000
5x + 8y = 33100

Substitution methods
5(5000-y) + 8y = 33100
25000 -5y + 8y =33100
3y = 8100
y = 2700
x = 2300

Let's assume Mary has invested x dollars in the account that pays 5% interest, and y dollars in the account that pays 8% interest.

We know that the total amount Mary has invested in both accounts is $5000, so we can write the equation:

x + y = 5000 .....(Equation 1)

We also know that Mary earned $331 in interest in the first year. The interest earned from the account that pays 5% interest is calculated as 5% of x, and the interest earned from the account that pays 8% interest is calculated as 8% of y. So, we can write another equation:

0.05x + 0.08y = 331 .....(Equation 2)

To solve this system of equations, we can use the method of substitution or elimination. Let's solve it using the method of substitution.

Solving Equation 1 for x, we get:

x = 5000 - y

Substituting this value of x into Equation 2, we have:

0.05(5000 - y) + 0.08y = 331

250 - 0.05y + 0.08y = 331

0.03y = 81

y = 81 / 0.03 = 2700

Substituting the value of y back into Equation 1, we get:

x + 2700 = 5000

x = 5000 - 2700 = 2300

Therefore, Mary has $2300 invested in the account that pays 5% interest, and $2700 invested in the account that pays 8% interest.

To find out how much Mary has invested in both accounts, we can use a system of equations.

Let's assume that Mary has x dollars invested in the account that pays 5% interest, and y dollars invested in the account that pays 8% interest.

From the given information, we can create two equations:

Equation 1: The total amount invested is $5000:
x + y = 5000

Equation 2: The interest earned in one year is $331:
0.05x + 0.08y = 331

Now we can solve this system of equations.

One method to solve this is by substitution:

From Equation 1, we can isolate x:
x = 5000 - y

Substitute this value of x into Equation 2:
0.05(5000 - y) + 0.08y = 331

Simplify the equation:
250 - 0.05y + 0.08y = 331
0.03y = 331 - 250
0.03y = 81

Divide both sides by 0.03:
y = 81 / 0.03
y = 2700

Now substitute the value of y back into Equation 1 to find x:
x + 2700 = 5000
x = 5000 - 2700
x = 2300

Therefore, Mary has $2300 invested in the account that pays 5% interest and $2700 invested in the account that pays 8% interest.