-
Now we compute the difference in net return as a function of the energy price in $/min - this is the marginal change in net return as a function of energy.

Input := 


diffsetStuff = {};

Do[diffsetStuff = Append[diffsetStuff,

          {setStuff[[i]][[1]],

		(setStuff[[i+1]][[2]] - setStuff[[i]][[2]])*

			1/(setStuff[[i+1]][[1]] - setStuff[[i]][[1]])} ],

				{i,1, Length[setStuff]-1}]

Input := 


df[x_] = Fit[diffsetStuff,{1,x,x^2},x]

Output =


                                2

-29.1517 + 370.934 x - 2735.84 x

Input := 


dfPlot = Plot[df[x],{x,0,.05}]

Output =


-Graphics-

Input := 


diffsetPlot = ListPlot[diffsetStuff,PlotStyle->PointSize[.01],

		PlotRange->{{0,.05},{-30,-18}},

	AxesLabel->{"Energy cost ($/min)","MaxNet/($/min)"}]

Output =


-Graphics-

Input := 


Show[diffsetPlot,dfPlot]

Output =


-Graphics-