function ip = c_inner_product(w, a, b, v1, v2)
  integrand = @(x) w(x)*v1(x)*v2(x)
  ip = quad(integrand, a, b)
end
