## Maximizing Profit

Hey guys i am taking college calc now and i absolutely suck at math. Ive been trying so hard to keep up, but the more i understand the more we learn in class and the more behind i fall once more. Anyways this is a question from one of my homeworks which i have attempted numerous times, and cannot seem to find out how to solve this prob, any help or advice would be great.

So basically this is the problem

A producer finds that demand for his commodity obeys a linear demand equation , where is in dollars and in thousands of units. If the cost equation is , what price should be charged to maximize the profit?

So i have re-wrote the price equation to p=50-4x
So profit is revenue - cost, and i must find revenue first (px)
SO my revenue function is r=50x-4x^2

Now i used my ti89 calculator to subtract the revenue function i found and the cost function given in the problem above and got -7.2x^2+10x-2. So this is my profit equation.

Now i thought i had to differentiate this equation and set it to zero, long story short i calculated the derivative using my calculator and solved for zeros the same way, i got the x-value .694444, apparently this is the wrong answer -_-.

Any help guys?