A fertilizer company needs to supply 50 tons of fertilizer at the end of the first month, 70 tons at the end of second month, and 90 tons at the end of third month. The cost of producing x tons of fertilizer in any month is given by $(4500X + 20X2 ). It can produce more fertilizer in any month and supply it in the next month. However, there is an inventory carrying cost of $400 per ton per month.
Find the optimal level of production in each of the three periods and the total cost involved by solving it as an initial value problem.