input: Write a python function to optimize the dimensions of a beam to minimize its volume subject to certain constraints using the COBYLA method.
  assert optimize_beam([0.02, 0.02, 0.02]) == [some_expected_result]
  assert optimize_beam([0.05, 0.05, 0.05]) == [some_expected_result]
  assert optimize_beam([0.1, 0.1, 0.1]) == [some_expected_result]
output: from scipy.optimize import minimize
  
  def optimize_beam(initial_guess):
      # Constants
      P = 5000  # Load in Newtons
      L = 300  # Length in cm
      E = 200e9  # Young's modulus in Pa
      sigma_max = 250e6  # Maximum stress in Pa
  
      # Objective function: Volume of the beam
      def volume(x):
          b, h, t = x
          return b * h * t
  
      # Constraints
      def stress_constraint(x):
          b, h, t = x
          I = (b * h**3) / 12
          sigma = (P * L) / (2 * I)
          return sigma_max - sigma
  
      def deflection_constraint(x):
          b, h, t = x
          I = (b * h**3) / 12
          delta = (P * L**3) / (48 * E * I)
          return 0.01 - delta  # Limit deflection to 1% of the length
  
      constraints = [
          {'type': 'ineq', 'fun': stress_constraint},
          {'type': 'ineq', 'fun': deflection_constraint}
      ]
  
      bounds = [(0.01, 0.1), (0.01, 0.1), (0.01, 0.1)]  # Bounds for b, h, t
  
      result = minimize(volume, initial_guess, method='COBYLA', constraints=constraints, bounds=bounds)
  
      return result.x.tolist()