Multivariable Calculus extends differential and integral calculus concepts to functions in two or more variables. The topics include vectors, dot products, cross products, equations of lines and planes, surfaces, vector-valued functions, derivatives and integrals of vector-valued functions, space curves, partial and directional derivatives, extrema, double and triple integrals, etc. The curriculum may include concepts such as vector fields, line integrals, applications from the natural sciences or content from abstract mathematics topics.
# Section 11.4 | Problem 57
t = var('t')
P = sphere((0,2,1), 0.2, color='red')
Q = sphere((0,1,2), 0.2, color='purple')
line1 = parametric_plot3d((2*t,1-t,2+t),(t,-3,3))
v = vector([2,-1,1])
u = vector([0,1,-1])
proj = ((u.dot_product(v))/(norm(v)*norm(v)))*v
norml = u - proj
line2 = parametric_plot3d((0 +norml[0]*t,2+norml[1]*t,1+norml[2]*t),(t,-3,3))
P + Q + line1 + line2
# SageMath start
# To declare Point objects
A=(1,2,3)
B=(1,-2,5)
C=(3,1,5)
# To draw a vector as a geometric shape
arrow(A,B)
# To draw more than 1 vector (triangle rule)
arrow(A,B) + arrow(B,C) + arrow (A,C)
# To form a vector from points
AB = vector(B[0]-A[0], B[1]-A[1], B[2]-A[2])
BC = vector(C[0]-B[0], C[1]-B[1], C[2]-B[2])
# To print the vector:
AB
print("BC: ", BC)
# To plot vectors
plot(AC, start=A) + plot(AB, start=A) + plot(BC, start=B)
# To check if two vectors are equal
AB == BC
# SageMath end
# Geogebra start (save the document if you want to keep your work)
#declare Point objects
A=Point({1,1,1})
B=Point({-1,2,3})
C=Point({2,2,-1})
# form vectors from points
AB = Vector(A,B)
BC = Vector(B,C)
# Geogebra end