A $4,000 principal is invested in two accounts, one earning 3% interest and another earning 4% interest. If the total interest for the year is $126, then how much is invested in each account?

126=M(.03)+(4000-M)*.04)

where M is at 3 percent.

126=m(.03-.04)+160

M= 34/.01= 3400
and 4000-M=600

To find out how much is invested in each account, we can set up a system of equations based on the given information.

Let's denote the amount invested in the account earning 3% interest as "x" and the amount invested in the account earning 4% interest as "y".

According to the problem, we know that the total amount invested is $4,000, so we can express this information as:

x + y = 4000 -- Equation 1

We also know that the total interest earned for the year is $126. Since interest is calculated by multiplying the principal by the interest rate, we can calculate the interest earned in each account as:

0.03x + 0.04y = 126 -- Equation 2

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

One way to do this is by using the substitution method:

1. Solve Equation 1 for y:
y = 4000 - x

2. Substitute the value of y in Equation 2:
0.03x + 0.04(4000 - x) = 126

3. Simplify and solve for x:
0.03x + 160 - 0.04x = 126
-0.01x = -34
x = -34 / -0.01
x = 3400

Now that we have found the value of x, we can substitute it back into Equation 1 to find the value of y:

x + y = 4000
3400 + y = 4000
y = 4000 - 3400
y = 600

Therefore, $3,400 is invested in the account earning 3% interest, and $600 is invested in the account earning 4% interest.