We have, P(x)=41+24x−18x2 ⇒dxdP(x)=24−36x and dx2d2P(x)=−36
For maximum or minimum, we must have ⇒dxdP(x)=0 ⇒24−36x=0 ⇒x=32
Also, (dx2d2P(x))x=32=−36<0.
So, profit is maximum when x=32.
Maximum profit = (Value of P(x) at x=32) =41+24×(32)−18(32)2 =49