Question: Optimization Problem- Difficulty

I'm inputting an optimization problem into Maple, and somewhere along the way my code stops working.  (Code is at the bottom.)

I need to find the second derviative for my Profit statement [(p-c)d]. I know the first derivative, deriving for p is, is d. d=ap-b, so deriving that statement for p should equal −abp−b−1 . For some reason, Maple is showing my second derivative as equal to zero.

Can anybody help me? TIA!

restart;

Profit := (p-c)*d;

d;=ap-b;

print(Solution); 

dProfit1 := diff(Profit, p); 

dProfit2 := diff(dProfit1, p); 

ddProfit2 := diff(Profit, p, p); 

pOpt := solve(diff(Profit, p));

                           Profit:=(p-c)ap-b

                          d:=ap-b

                            Solution

                          dProfit1:=ap-b

                             dProfit2:=0

                           ddProfit2:=0

                         pOpt:={ap=0, b=b)

 

 

Please Wait...