during the summer months mary makes and sells bracelets. last summer she sold the necklaces for $10 each and her sales averaged 20 per day. When she increased the price by $1, she found she lost 2 sales per day.

a) find the demand function, assuming that it is linear

b) if the material for each necklace cost mary $4, what should the selling price be to maximize her profit?

This is what I have so far for the answer. IS this right?

a) y= 10; x=20

m = 20 -18/10-11

m = -2/-1

m = 2

p(x) = -2x + 10

D(p) = -2(p) + 10 or 10 -2p

D'(p) = -2

b) R(p) = pD(p)

R(p) = p(10 - 2p)

=10p - 2p²

R'(p)= 10-4p

10-4p=0

-4p=-10

p=-10/-4 or 2.5

R''= -4 so it is maximum

2.5 + 4 = 6.5

should sell at $6.50