# Vector Calculus#

The area of calculus we are concerned with is the time derivatives of vectors which result in velocities and accelerations.

In the case of vector, it is critical to consider the reference frame when computing derivatives. This is not the case for scalars.

Caution

Computing the time derivative from frame \(A\) of any arbitrary vector \(\vec{x}\), we must express the vector in unit vectors attached.

If the component form of \(\vec{x}\) is given in the frame \(A\) by:

then

## Door-wall example#

**Notation**:

\(\frac{{}^{A}d{\bf e}}{dt}\) is the time derivative of the vector \({\bf e}\) when observed from the reference frame A. So, \({\bf e}= -h\hat{\bf b}_y = -h\hat{\bf a}_y\).

Therefore,

So, how can we compute the derivative of a vector using `SymPy`

?

**Another example**:

\(O\), \(C\), \(D\) and \(P\) are points as shown in the figure. \(l\) and \(h\) are the length and height of the door. \(\theta\) is time-varying. You are asked to find (i.e., compute symbolic expressions) for the following:

and

Additionally, you are instructed that all final answers must be expressed in unit vectors attached to the \(A\)-frame.

Solution

The above example demonstrated the difference between taking time derivatives of the same vector from two frames.

## Properties of Vector Derivatives#

The following four properties are useful in computing derivatives of vectors.

**Property 1**: If \(\bf a\) and \(\bf b\) are two vectors expressed in a reference frame \(D\), then the time derivative of their vector sum, taken from the frame \(D\) is:

**Property 2**: If \(\bf a\) is a vector expressed in a reference frame \(C\) and \(\lambda\) is some arbitrary scalar (not necessarily a constant), then the time derivative of their product is:

**Property 3**: If \(\bf a\) and \(\bf b\) are two vectors expressed in a reference frame \(E\), then the derivative of their dot product with respect to some scalar parameter \(\alpha\) is:

**Property 4**: If \(\bf a\) and \(\bf b\) are two vectors expressed in some reference frame \(A\), then the derivative of their cross product taken with respect to some scalar parameter \(\gamma\) from the frame \(A\) is: