Jamaal is planning to invest up to $23000 in City Bank or State Bank. He wants to invest at least $4000 in City Bank, but not more than $16000; since State Bank does not insure more than $8000, he wants to invest no more than this amount in State Bank. The interest at City Bank is 5%, and the interest at State Bank is 7%. How much should he invest in each bank to earn the most interest? What is the maximum amount of interest that Jamaal can earn?

To find out how much Jamaal should invest in each bank to earn the most interest, we can solve this problem using linear programming.

Let's represent the amount Jamaal invests in City Bank as "x" and the amount he invests in State Bank as "y."

We are given the following information:
- Jamaal wants to invest at least $4000 in City Bank but no more than $16000. So we have the constraint: 4000 ≤ x ≤ 16000.
- State Bank does not insure more than $8000. Therefore, we have the constraint: y ≤ 8000.
- Jamaal plans to invest up to $23000 in total. So we have the constraint: x + y ≤ 23000.

Now let's determine the objective function to maximize the interest earned:
- The interest earned at City Bank is 5% of the invested amount, so the interest earned at City Bank is 0.05x.
- The interest earned at State Bank is 7% of the invested amount, so the interest earned at State Bank is 0.07y.
- Therefore, the total interest earned is 0.05x + 0.07y.

To find the maximum amount of interest, we need to solve this linear programming problem.

Once we solve, we can determine the respective values of x and y, which will tell us how much Jamaal should invest in each bank, and the resulting maximum interest earned.

I'll now solve the linear programming problem using an optimization tool.

To find the optimal investment strategy for Jamaal, let's break down the given information step by step:

1. Let's assume Jamaal invests x dollars in City Bank.
2. Since he wants to invest at least $4000 in City Bank, we have the inequality: x >= $4000.
3. However, he also doesn't want to invest more than $16000 in City Bank, so we have the inequality: x <= $16000.
4. Since State Bank doesn't insure more than $8000, Jamaal can invest up to this amount: $8000.
5. Therefore, the amount Jamaal will invest in State Bank will be y dollars, where y <= $8000.

Now, let's calculate the interest earned from each bank:

The interest earned at City Bank will be 5% of x dollars: (5/100) * x = 0.05x dollars.

The interest earned at State Bank will be 7% of y dollars: (7/100) * y = 0.07y dollars.

To maximize the interest earned, Jamaal should invest the maximum amount allowed in each bank. So Jamaal should invest $16000 in City Bank (as this is the upper limit) and $8000 in State Bank.

Therefore, the maximum interest he can earn is:
Interest from City Bank = 0.05 * $16000 = $800.
Interest from State Bank = 0.07 * $8000 = $560.

The maximum amount of interest Jamaal can earn is $800 + $560 = $1360.