Sympy Vector binomial formula

36 Views Asked by At

I have this snippet of code which should be a binomial formula:

    Z = ((p-q)**2-l**2)

In this formula p is a vector defined in the following way:

p = x*N.i + y*N.j + z*N.k

and q is also vector:

q = (r*((p.dot(N.i)*N.i)*sp.cos(w*t)+(p.dot(N.j)*N.j)*sp.sin(w*t))+o*(p.dot(N.k)*N.k))

How do I now calculate the binomial formula, because the result of Z is of the

<class 'sympy.core.add.Add'>

Class. How do I get the result to be of the

<class 'sympy.vector.vector.VectorAdd'>

Class?

0

There are 0 best solutions below