Given P, TC, MC, the profit is given by
[tex]\pi=Pq-TC-MC[/tex]Now, to find the q that maximizes the profit, consider the first and the second derivative of the last function.
[tex]\frac{d}{dq}\pi=P+q\frac{d}{dq}P-\frac{d}{dq}(TC)-\frac{d}{dq}(MC)=100-0.5q+q(-0.5)-(2q+10)-2[/tex]after solving this part we get that
[tex]88-3q=0\text{ will give us the critical points for the profit function.}[/tex]So,
[tex]q=\frac{88}{3};[/tex]Finally, the second derivative of the profit function gives us
[tex]\frac{d^2}{dq^2}\pi=\frac{d}{dq}(88-3q)=-3<0[/tex]It means that the profit function has a maximum local point at q=88/3.