1 | initial version |
The problem is that diff(a_V_ra,t)
is giving you a column vector and vector([0,0,-g])
is giving you a row vector. Further, Sage sees the first as a matrix and the second as a vector. You can fix this using .column()
as you did earlier in your code.
a_a_ra = diff(a_V_ra,t)+vector([0,0,-g]).column()
gives:
[ cos(psi)*D[0](v)(t)]
[-sin(psi)*D[0](v)(t)]
[ -g]
My full code is:
var('psi t g')
v = function('v',t)
R_ra=matrix([[cos(psi),sin(psi),0],[-sin(psi),cos(psi),0],[0,0,1]])
r_V_ra = vector([v,0,0])
a_V_ra = R_ra*r_V_ra.column()
a_a_ra = diff(a_V_ra,t)+vector([0,0,-g]).column()