find the number of units of natural gas that are to be produced to maximize the profit if….

We are asked to determine the maximum value of "x" for a profit function given the functions of revenue and cost. To do that let's remember that profit is defined as:
[tex]\text{Profit}=\text{revenue - cost}[/tex]Let P(x) be the function of profit, then the difference between the functions of revenue and cost is the function of profit, therefore:
[tex]P(x)=R(x)-C(x)[/tex]Replacing the functions we get:
[tex]P(x)=162x-2x^2-(x^2+114x+2)[/tex]Now we apply the distributive property in the parenthesis:
[tex]P(x)=162x-2x^2-x^2-114x-2[/tex]Adding like terms:
[tex]P(x)=48x-3x^2-2[/tex]Now, to determine the maximum profit we will determine the derivative of the profit function with respect to "x":
[tex]\frac{dP}{dx}=\frac{d}{dx}(48x-3x^2-2)[/tex]Now we distribute the derivative on the left side:
[tex]\frac{dP}{dx}=\frac{d}{dx}(48x)-\frac{d}{dx}(3x^2)-\frac{d}{dx}(2)[/tex]Now we determine the derivative using each corresponding rule:
[tex]\frac{dP}{dx}=48-6x[/tex]Now we set the result to zero:
[tex]48-6x=0[/tex]Now we solve for "x" first by subtracting 48 from both sides:
[tex]-6x=-48[/tex]Now we divide both sides by -6:
[tex]x=-\frac{48}{-6}=8[/tex]Now, since the original function is a parabola that opens downwards, this point must be a maximum. To verify that we can determine the second derivative and we get:
[tex]\frac{d^2P}{dx^2}=\frac{d}{dx}(48-6x)=-6[/tex]Since the second derivative is smaller than zero, the point is a maximum as hypothesized. Therefore, the maximum value of "x" is 8.