## Step 1: Define the symbolic representation of the problem

Let's denote the amount invested in each sector as follows:
- $x_1$ for solar
- $x_2$ for wind
- $x_3$ for nuclear
- $x_4$ for coal

The annual rates of return for each sector are given as:
- Solar: 6% or 0.06
- Wind: 9% or 0.09
- Nuclear: 12% or 0.12
- Coal: 3% or 0.03

## Step 2: Formulate the objective function

The objective is to maximize the total return on investment. The total return can be represented as:
\[ 0.06x_1 + 0.09x_2 + 0.12x_3 + 0.03x_4 \]

## 3: Define the constraints

1. The total investment is $1,000,000:
\[ x_1 + x_2 + x_3 + x_4 \leq 1000000 \]

2. The amount invested in coal cannot exceed the amount invested in solar:
\[ x_4 \leq x_1 \]

3. The amount invested in wind cannot exceed the amount invested in nuclear:
\[ x_2 \leq x_3 \]

4. At most 10% of the investment can be in coal:
\[ x_4 \leq 0.10 \times 1000000 \]
\[ x_4 \leq 100000 \]

5. Non-negativity constraints:
\[ x_1, x_2, x_3, x_4 \geq 0 \]

## 4: Symbolic Representation

```json
{
'sym_variables': [
    ('x1', 'solar'), 
    ('x2', 'wind'), 
    ('x3', 'nuclear'), 
    ('x4', 'coal')
],
'objective_function': '0.06*x1 + 0.09*x2 + 0.12*x3 + 0.03*x4',
'constraints': [
    'x1 + x2 + x3 + x4 <= 1000000', 
    'x4 <= x1', 
    'x2 <= x3', 
    'x4 <= 100000', 
    'x1 >= 0', 
    'x2 >= 0', 
    'x3 >= 0', 
    'x4 >= 0'
]
}
```

## 5: Gurobi Code

```python
import gurobi

def solve_investment_problem():
    # Create a new model
    model = gurobi.Model()

    # Define the variables
    x1 = model.addVar(name='solar', lb=0)
    x2 = model.addVar(name='wind', lb=0)
    x3 = model.addVar(name='nuclear', lb=0)
    x4 = model.addVar(name='coal', lb=0)

    # Objective function: maximize return
    model.setObjective(0.06*x1 + 0.09*x2 + 0.12*x3 + 0.03*x4, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(x1 + x2 + x3 + x4 <= 1000000)  # Total investment
    model.addConstr(x4 <= x1)  # Coal vs Solar
    model.addConstr(x2 <= x3)  # Wind vs Nuclear
    model.addConstr(x4 <= 100000)  # Coal limit

    # Solve the model
    model.optimize()

    # Print the solution
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal investment:")
        print(f"Solar: ${x1.varValue:.2f}")
        print(f"Wind: ${x2.varValue:.2f}")
        print(f"Nuclear: ${x3.varValue:.2f}")
        print(f"Coal: ${x4.varValue:.2f}")
        print(f"Max Return: ${model.objVal:.2f}")
    else:
        print("No optimal solution found.")

solve_investment_problem()
```