Sample Command | Result |
---|---|
evalf(expression,n) | Evaluate floating point to n places. n is optional. |
with(stats); fit[leastsquare[[x,y]]]([[x_{1},...,x_{n}],[x_{y},...,x_{n}]]); | Linear regression |
with(stats); fit[leastsquare[[x,y],y=a*x^{2}+b*x+c]]([[x_{1},...,x_{n}],[x_{y},...,x_{n}]]); | Quadratic regression |
diff(f(x),x); | Calculate f'(x) |
integrate(f(x),x); | Calculate the indefinite integral of f(x) with respect to x |
integrate(f(x),x=a..b); | Calculate the definite integral of f(x) with respect to x from a to b |
plot(f(x),x); | Plot the curve y=f(x) |
plot(f(x),x=a..b); | Plot the curve y=f(x) for x between a and b |
plot(f(x),x=a..b,y=c..d); | Plot the portion of the curve y=f(x) for x between a and b for which y is between c and d |
plot([f(t),g(t),t=t_{1}..t_{2}]); | Plot the parametric curve x=f(t), y=g(t) for t between t_{1} and t_{2} |
plot([f(t),g(t),t=t_{1}..t_{2}],a..b); | Plot the portion of the parametric curve x=f(t), y=g(t) for t between t_{1} and t_{2} for which x is between a and b |
plot([f(t),g(t),t=t_{1}..t_{2}],a..b,c..d); | Plot the portion of the parametric curve x=f(t), y=g(t) for t between t_{1} and t_{2} for which x is between a and b and y is between c and d |
plot(f(t),t=t_{1}..t_{2},coords=polar); | Plot the polar curve r=f(theta) for theta between t_{1} and t_{2} |
plot3d(f(x,y),x=a..b,y=c..d); | Plot the curve z=f(x,y) |
plot3d([f(u,v),g(u,v),h(u,v)], u=a..b, v=c..d); | Plot the parametric surface x=f(u,v), y=g(u,v), z=h(u,v) |
with(plots); spacecurve([f(t), g(t), h(t)], t=a..b); | Plot the parametric curve x=f(t), y=g(t), z=h(t) |