Quantity01234567Total cost (in €)89101113192737Total revenue (in €)08162432404856a) Calculate profit for each quantity. How much should the firm produce to maximize profit?b) Calculate marginal revenue and marginal cost for each quantity.

Consider the total cost and the total revenue given in the table below:Quantity01234567Total cost (in €)89101113192737Total revenue (in €)08162432404856a) Calculate profit for each quantity. How much should the firm produce to maximize profit?b) Calculate marginal revenue and marginal cost for each quantity.