20.mws

>    restart; problem #20

>    p:=x->40/sqrt(x);  #define our price in terms of x (demand function)
C:=x->.4*x+1000;
#define our cost in terms of x (cost function)

p := proc (x) options operator, arrow; 40/sqrt(x) end proc

C := proc (x) options operator, arrow; .4*x+1000 end proc

>    R:=x*p(x); #revenue = quantity * price
R:=unapply(R,x);
 #make this a function

R := 40*x^(1/2)

R := proc (x) options operator, arrow; 40*x^(1/2) end proc

>    P:=R(x) - C(x);  #profie = revenue - cost
P:=unapply(P,x);  #make this a function

P := 40*x^(1/2)-.4*x-1000

P := proc (x) options operator, arrow; 40*x^(1/2)-.4*x-1000 end proc

>    P1:=D(P); #find derivative
P2:=D(P1);
 #find second deriv

P1 := proc (x) options operator, arrow; 20/x^(1/2)-.4 end proc

P2 := proc (x) options operator, arrow; -10/x^(3/2) end proc

>    c:=solve(P1(x)=0,x);  #find critical point(s) for x (quantity)

c := 2500.

>    P2(c);  #test concavity at critical point

-.8000000000e-4

Conclusion:  we have a MAX at x = c

>    p(c); #find price correspoinding to this critical value of x.

.8000000000

Conclusion:  the price of $0.80 corresponds to maximal profit.

>    plot(P(x),x=0..2*c);

[Maple Plot]

>    P(c);

0.

Note that this company NEVER makes a positive profit.  At best, it breaks even when x = 2500.