Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Thanks much. However, I have found a better way as follows: a=matrix([[x3+t,2,(x3)],[t^2,5,x3],[t,x3,x3^2]])

ac=copy(a)

b=derivative(ac,t);b

c=derivative(ac,x3);c

var('dx3')

d=b+dx3*c;d

[ dx3 + 1, 0 , dx3]

[ 2*t, 0, dx3]

[ 1, dx3, 2dx3x3]

click to hide/show revision 2
formatted and polished code

Thanks much. However, I have found a better way as follows: a=matrix([[x3+t,2,(x3)],[t^2,5,x3],[t,x3,x3^2]])follows:

ac=copy(a)

b=derivative(ac,t);b

c=derivative(ac,x3);c

var('dx3')

d=b+dx3*c;d

sage: t, x3, dx3 = var('t x3 dx3')
sage: a = matrix([[x3+t,2,x3],[t^2,5,x3],[t,x3,x3^2]])
sage: b = derivative(a,t); b
[  1   0   0]
[2*t   0   0]
[  1   0   0]
sage: c = derivative(a,x3); c
[   1    0    1]
[   0    0    1]
[   0    1 2*x3]
sage: d = b+dx3*c; d
[ dx3 + 1, 0 ,     dx3]

[ 2*t, 1 0, 0 dx3]

dx3] [ 2*t 0 dx3] [ 1, 1 dx3, 2dx3x3]

dx3 2*dx3*x3]