THE LOGISTIC CURVE
Monotonicity, concavity and inflection point.
| Commands used below | |
| diff(x^3 + 3*x, x) | differentiate x^3 + 3*x with respect to x |
| diff(x^3 + 3*x, x,x) | differentiate x^3 + 3*x with respect to x with respect to x (second derivative) |
| `y"` | y" is an illegal variable name, but may be used anyway if it is set in backquotes |
| `Logistic curve:` | another illegal variable name which will print as apparent text since it has not been assigned a value. |
> restart;with(student):
> `Logistic curve:`;` Assumptions a > 0, b >0, M > 0, y0 > 0, y0 < M (implies K > 0)`;eq1:=y=M/(1+K*exp(-a*t));
> eq2:=`y'`=diff(rhs(eq1),t);
> `All factors of y' are positive and hence the logistic equation is increasing for all t`;
> eq3:=`y"` = diff(rhs(eq2),t);
> eq4:=`y"` = simplify(rhs(eq3));
> `Clearly all factors of y" are positive except`;K*exp(-a*t)-1;
> solve(K*exp(-a*t)-1>0,t);
Error, (in RealRange_fromineq) cannot handle intervals, use solve over name sets
> `Since Maple 5 cannot solve that inequality by itself, we must help`;`Ineq0 := y" > 0`;Ineq1:=K*exp(-a*t)-1>0;
> Ineq2:=lhs(Ineq1)+1<rhs(Ineq1)+1;
> Ineq3:=lhs(Ineq2)/K<rhs(Ineq2)/K;
> Ineq4:=ln(lhs(Ineq3))<ln(rhs(Ineq3));
> Ineq5:=-ln(K)<-a*t;
> Ineq6:=lhs(Ineq5)/(-a)>rhs(Ineq5)/(-a);
> `Thus the second devivative is positive for `;t<ln(K)/a;`Hence this is where the curve is concave up.`; `It has an inflection point at this point`; `and is concave down for`;t>ln(K)/a;
> `The y value of the inflection point is`;simplify(subs(t=ln(K)/a,eq1));
Note: Granted it would have been easier just to solve the inequality by hand rather than use Maple. However the steps used to solve it using Maple are instructive.
MY OPINION: MAPLE (and other symbolic manipulation software such as MATHEMATICA) is an extremely valuable tool for doing mathematics. It will do just about anything from algebra to calculus to linear algebra. Though not required in this course, I believe you would benefit by learning as much as you can about it.
Maple cannot plot eq1 with literal parameters, a, M, y0, K. But if we assign the parameters values, it can plot the resulting equation (actually plot takes type expression and so we plot the rhs of eq1).
> a:=.05;M:=2000;Y[0]:=400;K:=(M-Y[0])/Y[0];inflection_pt:=evalf(ln(K)/a,4);
> plot({rhs(eq1),2000,1000,0},t=0..130);
>