suppose walmart stock is selling at $59 a share and mattel stock is selling at $28 a share. Amy waller has a maximum of $6000 to invest. she wishes to purchase four times as many shares of walmart as of mattel. only whole shares of stock can be purchase. how many shares of each will be purchase? and how much money will be left over?

add up dollars spent

59w + 28m <= 6000
w = 4m

59(4m) + 28m <= 6000
264m <= 6000
m = 22
w = 88

59w + 28m = 5192 + 616 = 5808

If she bought 1 more share of mattel, she'd have to bu 4 more shares of walmart, exceeding $6000

To solve this problem, we can set up a system of equations. Let's denote the number of shares of Walmart stock as "x" and the number of shares of Mattel stock as "y".

Given that Amy wishes to purchase four times as many shares of Walmart as of Mattel, we have the equation:
x = 4y

We also know that the total amount Amy can invest is $6000. Considering the share prices, we can write the equation:
59x + 28y = 6000

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

1. Substitute x = 4y into the second equation:
59(4y) + 28y = 6000
236y + 28y = 6000
264y = 6000
y = 6000/264
y ≈ 22.73

Since only whole shares can be purchased, we need to round down y to the nearest whole number:
y = 22

2. Substitute the value of y back into x = 4y:
x = 4(22)
x = 88

So, Amy will purchase 88 shares of Walmart stock and 22 shares of Mattel stock.

To find out how much money will be left over, we need to subtract the total investment from the available funds:
Total investment = (59 * 88) + (28 * 22)
Total investment = $6104

Amount of money left over = $6000 - $6104
Amount of money left over ≈ $-104

Amy will not have any money left over. In fact, she will be short by approximately $104.