Section 13.3: We need vector package.

load(vect);

Example 1, 2 and 6: (a) Calculate the arc length of the curve [cos(t), sin(t), t] from t=0 to t.
Here we assume that the arc length Arc starts from t=0 to t > 0. (b) Reparametrize the curve with arc length. (c) Find the unit normal and the binormal vector

assume(t > 0);

rr: [cos(t), sin(t), t];

drr: diff(rr, t);

Arc: s = integrate(sqrt(drr.drr), t, 0, t);

ArcInverse: solve(Arc, t);

uu: rr, ArcInverse;

define(U(s),uu);

draw3d(xlabel="X", ylabel="Y", line_width=2,
    color=1, parametric(U(s)[1],U(s)[2],U(s)[3],s,0,10),
    point_type=7, points(makelist(U(s)[1],s,0,10),
        makelist(U(s)[2],s,0,10),
        makelist(U(s)[3],s,0,10)));

TT: trigsimp(drr/sqrt(drr.drr));

dTT: diff(TT,t);

NN: trigsimp(dTT/sqrt(dTT.dTT));

BB: trigsimp(express(TT~NN));

a: %pi/2;

draw3d(xlabel="X", ylabel="Y", line_width=2, head_length=0.02,
    xrange=[-2,2], yrange=[-2,2], zrange=[0,2.5],
    color=1, parametric(rr[1],rr[2],rr[3],t,-%pi,a),
    color=2, parametric(rr[1],rr[2],rr[3],t,a,%pi),
    color=3, vector(at(rr,t=a),at(TT,t=a)),
    color=4, vector(at(rr,t=a),at(NN,t=a)),
    color=5, vector(at(rr,t=a),at(BB,t=a)));

Consider the reparametrized curve uu.

duu: diff(uu, s);

dduu: diff(uu, s, 2);

nn: trigsimp(dduu/sqrt(dduu.dduu));

trigsimp(express(duu~nn));

Example 4: Find the curvature for the curve [t,t^2,t^3].

rr: [t,t^2,t^3];

drr: diff(rr, t);

ddrr: diff(drr, t);

cross: express(drr~ddrr);

kappa: sqrt(cross.cross)/(drr.drr)^(3/2);

k: kappa, t=0;

Find the center of osculating circle at t=0, and visualize it.

TT: drr/sqrt(drr.drr);

dTT: diff(TT,t);

NN: dTT/sqrt(dTT.dTT), t=0;

TT, t=0;

draw3d(xlabel="X", ylabel="Y", line_width=2,
    color=1, parametric(rr[1],rr[2],rr[3],t,-2,0),
    color=2, parametric(rr[1],rr[2],rr[3],t,0,2),
    color=3, line_width=1, parametric(NN[1]/k+(1/k)*cos(t),NN[2]/k+(1/k)*sin(t),NN[3],t,0,2*%pi));

*Exercise 14: Reparametrize the curve [exp(2*t)*cos(2*t), 2, exp(2*t)*sin(2*t)] to arc length.

Note that the vector function rr is the reparametrization of the original problem.
Here we assume that the arc length Arc starts from t=0 to t > 0.

assume(t > 0);

rr: [exp(t)*cos(t), 2, exp(t)*sin(t)];

drr: diff(rr, t);

Arc: s = integrate(sqrt(drr.drr), t, 0, t);

ArcInverse: solve(Arc, t);

rr, ArcInverse;

*Exercise 18: Find the unit tangent and unit normal vectors, and find the curvature for the curve
[t^2, sin(t)-t*cos(t), cos(t)+t*sin(t)].

rr: [t^2, sin(t)-t*cos(t), cos(t)+t*sin(t)];

drr: diff(rr, t);

Maxima does not simplify trigonometric function automatically.
To do so, you need to specify it with trigsimp().

sqrt(drr.drr);

trigsimp(sqrt(drr.drr));

Furthermore, we now assume t > 0.

assume(t > 0);

mag_drr: trigsimp(sqrt(drr.drr));

Compute the unit tangent T and normal vector N.
Maxima is case-sensitive; thus, t and T are different.

T: drr/mag_drr;

dT: diff(T, t);

mag_dT: trigsimp(sqrt(dT.dT));

N: dT/mag_dT;

Finally the curvature is obtained.

mag_dT/mag_drr;

*Exercise 22: Find the curvature for the curve [t,t,1+t^2].

rr: [t,t,1+t^2];

drr: diff(rr, t);

ddrr: diff(drr, t);

cross: express(drr~ddrr);

sqrt(cross.cross)/(drr.drr)^(3/2);

*Exercise 28: Find the curvature for y = cos(x).

y: cos(x);

k: diff(y,x,2)/(1 + diff(y,x)^2)^(3/2);

*Exercise 44: Find the vectors T, N, and B for [cos(t),sin(t),log(cos(t))] at t = 0.

Here we need to assume that cos(t) > 0 in order to define log(cos(t)).

assume(cos(t) > 0);

rr: [cos(t),sin(t),log(cos(t))];

drr: diff(rr,t);

T: trigsimp(drr/sqrt(drr.drr));

dT: diff(T,t);

N: trigsimp(dT/sqrt(dT.dT));

B: express(T~N);

T, t=0; N, t=0; B, t=0;

*Exercise 49: Find the point on the curve [t^3,3*t,t^4] where the normal plane is parallel
to 6x + 6y - 8z = 1.

rr: [t^3,3*t,t^4];

drr: diff(rr,t);

t > 0 was previously assumed, and it should be cleared. 

clear(t);

k was previously used, and it should be killed.

kill(k)

eqns: drr - c*[6,6,-8];

Solve a system of nonlinear equations in terms of t and k.

sol: solve(eqns,[t,c]);

rr, sol[1];