Chapter 10 Vector Functions
1. Calculus on vector functions of single variable
To define a vector function, you can use a simple syntax as follows.
Example 1. Define a vector function v (t) .
| > | v:=[t^2,sqrt(t-1),sqrt(5-t)]; |
You can directly work on it. For example you want to get 2 *v (t):
| > | 2*v; |
To extract a component of v (t):
| > | v[2]; |
Example 2. Evaluate v (2).
| > | eval(v,t=2); |
To evaluate only the second component at t=2:
| > | eval(v[2],t=2); |
Limit, derivative and integral of a vector function.
You have to get them on each component.
Example 3. Find the limit of v (t) at t=2.
| > | limv=[limit(v[1],t=2),limit(v[2],t=2),limit(v[3],t=2)]; |
Example 4. Find v' (t).
| > | dv=[diff(v[1],t),diff(v[2],t),diff(v[3],t)]; |
However, for derivative the following works.
| > | dv=diff(v,t); |
Example 5. Find the integral of v (t) from t=1 to 4.
| > | iv=[int(v[1],t=1..4),int(v[2],t=1..4),int(v[3],t=1..4)]; |
Use " map " can save the repeated commands and arguments. For example, to get the limit or integral shown in Example 3 and Example 5, you can do the following.
| > | map(limit,v,t=2); |
| > | map(int,v,t=1..4); |
2. Draw parametric curves.
Example 6. Draw the curve of [2*cos(t),sin(t),t] for t from 0 to 4pi.
| > | plots[spacecurve]([2*cos(t),sin(t),t],t=0..4*Pi,title='Helex',axes=normal); |
Example 7. Draw the curve of [cos(t),sin(t),sin(5t)] for t=0 to 2pi.
| > | plots[spacecurve]([cos(t),sin(t),sin(5*t)],t=0..2*Pi,axes=normal); |
Example 8. Draw the graph of the intersection of z=sqrt(x^2+y^2) and z=1+y.
Let x be the parameter, find y and z as its function.
| > | solve({z^2=x^2+y^2,z=1+y},{y,z}); |
| > | plots[spacecurve]([x,x^2/2-1/2,x^2+1/2],x=-5..5,axes=normal); |
Example 10. Draw the intersection of x^2+y^2=4 and z=xy.
First, you have to find its parametric equation: x=2cos(t),y=2sin(t),z=4cos(t)sin(t).
| > | plots[spacecurve]([2*cos(t),2*sin(t),4*sin(t)*cos(t)],t=0..2*Pi,axes=normal); |
3. Arc length and curvature
See the arc legnth formula on Page 716, curvature formula on Page 718 and Page 719.
Example 11. Find the length of arc with r (t)=cos(t) i +sin(t) j +t k from point (1,0,0) to (1,0,2pi).
| > | with(linalg): |
| > | r:=[cos(t),sin(t),t]; |
| > | dirr:=diff(r,t); |
| > | lengthr=int(norm(dirr,2),t=0..2*Pi); |
Example 12. Find the curvature of r (t)=t i +t^2 j +t ^ 3 k at a general point and at (0,0,0).
| > | nr:=[t,t^2,t^3]; |
| > | dnr:=diff(nr,t); |
| > | ddnr:=diff(nr,t,t); |
The curvature is
| > | curvr:=norm(crossprod(dnr,ddnr),2)/norm(dnr,2)^3; |
The curvature at 0 is
| > | curvrat0=eval(curvr,t=0); |
To find the curvature of a plane curve using formula on Page 720.
Example 13. Find the curvature of f(x)=sqrt(x) at a general point and at x=4.
| > | f:=sqrt(x); |
The curvature is
| > | curvf:=simplify(abs(diff(f,x,x))/(1+diff(f,x)^2)^(3/2)); |
The curvature at x=4 is
| > | cfat4=eval(curvf,x=4); |
4. Tangent, normal, and binormal vectors.
See the formulas on Page 722.
Example 14. Find the unit tangent vector, unit normal vector, and unit binormal vector of r (t)=<sin(4t), 3t, cos(4t)>.
Note: In Calculus, it is better to use the formula for the vector norm | r|= sqrt((r1)^2+(r2)^2+(r3)^2) than to call norm( r ,2).
| > | r:=[sin(4*t),3*t,cos(4*t)]; |
| > | dr:=diff(r,t); |
| > | ndr:=sqrt(dr[1]^2+dr[2]^2+dr[3]^2); |
| > | ndr:=simplify(ndr); |
The unit tangent vector is
| > | utv:=dr/ndr; |
| > | nv:=diff(utv,t); |
| > | normnv:=simplify(sqrt(nv[1]^2+nv[2]^2+nv[3]^2)); |
The unit normal vector is
| > | unvc:=nv/normnv; |
The unit binormal vector is
| > | ubnv=simplify(crossprod(utv,unvc)); |
Example 15. Find the unit tangent vector, unit normal vector, and unit binormal vector of r (t)=<t^2, 2/3t^3t, t> at (1,2/3,1).
| > | assume(t>0); |
| > | r:=[t^2,2/3*t^3,t]; |
| > | dr:=diff(r,t); |
| > | UnitTangent:=dr/sqrt(dr[1]^2+dr[2]^2+dr[3]^2); |
| > | UtAt1:=eval(UnitTangent,t=1); |
| > | Nr:=diff(UnitTangent,t); |
| > | NrAt1:=eval(Nr,t=1); |
| > | unAt1:=NrAt1/norm(NrAt1,2); |
| > | ubAt1=crossprod(UtAt1,unAt1); |
Example 16. Find equations of the normal plane and osculationg plane of r (x)=<t,t^2,t^3> at (1,1,1).
| > | t:='t': |
| > | r:=[t,t^2,t^3]; |
| > | dr:=diff(r,t); |
| > | drat1:=eval(dr,t=1); |
| > | NormalPlane:=(x-1)+2*(y-1)+3*(z-1)=0; |
| > | ut:=dr/sqrt(dr[1]^2+dr[2]^2+dr[3]^2); |
| > |
| > | nor:=diff(ut,t); |
| > | norat1:=eval(nor,t=1); |
| > | binor:=crossprod(drat1,norat1); |
| > | OsculatingPlane:=3*(x-1)-3*(y-1)+(z-1)=0;; |
5. Motion in Sapace
Main Formulas : v (t)= r '(t), v=| v (t) |, a (t)= v '(t)= r ''(t). v (t)= v (t0)+int( a (u),u=t0..t1), r (t)= r (t0)+int( v (u),u=t0..t1).
Tangential and Normal Components of Acceleration: a =v' T+ kv^2 N. We call v' the tangential component and kv^2 normal component.
Example 17. Find the velocity, acceleration, and speed for r (t)=sin(t) i +t j +cos(t) k, t=0.
| > | r:=[sin(t),t,cos(t)]; |
The velocity is
| > | v:=diff(r,t); |
The acceleration is
| > | a:=diff(v,t); |
The velocity at t=0 is
| > | vat0:=eval(v,t=0); |
The acceleration at t=0 is
| > | aat0=eval(a,t=0); |
The speed at t=0 is
| > | speed=norm(vat0,2); |
Example 18. The acceleration a (t)=-10 k , v (0)= i + j - k, r (0)=2 i +3 j . Find the velacity and position vectors.
| > | a:=[0,0,10]; |
| > | v:=map(int,a,s=0..t)+[1,1,-1]; |
| > | r:=map(int,v,t=0..T)+[2,3,0]; |
Example 19. Find the tangential and normal components of the acceleration vector of r (t)=t i +4sin(t) j +4cos(t)k .
aT=v'(t), aN=kv^2.
| > | r:=[t,4*sin(t),4*cos(t)]; |
| > | dr:=diff(r,t); |
| > | sp:=simplify(sqrt(dr[1]^2+dr[2]^2+dr[3]^2)); |
| > | aT:=diff(sp,t); |
| > | ddr:=diff(dr,t); |
| > | tk:=simplify(crossprod(dr,ddr)); |
| > | topk:=simplify(sqrt(tk[1]^2+tk[2]^2+tk[3]^2)); |
| > | aN:=topk/sp; |
6. Graph of parametric surfaces
Example 20.
| > | u:='u':v:='v': |
| > | plot3d([(cos(u))^3*(cos(v))^3,(sin(u))^3*(cos(v))^3,(sin(v))^3],u=-Pi..Pi,v=-Pi..Pi,axes=boxed); |
Example 21. Graph the surface 3x^2+2y^2+z^2=1
| > | x:'x': y:='y': z:='z': |
| > | x:=1/sqrt(3)*cos(theta)*sin(phi); y:=1/sqrt(2)*sin(theta)*sin(phi); z:=cos(phi); |
| > | plot3d([x,y,z],theta=-Pi..Pi, phi=0..Pi,axes=boxed); |
| > |