# Revision history [back]

### derivative of symbolic product

Consider the product rule $\frac d{dt}[A(t)B(t)]=\dot{A}(t)B(t)+A(t)\dot{B}(t)$ with $A$ and $B$ not commuting, e.g, matrix valued. I'd like to replicate this in sage, however, I don't see how I can specify that $A$ and $B$ do not commute. So far I have

var('t')
A=function('A')(t)
B=function('B')(t)
diff(A*B,t)


which yields B(t)*diff(A(t), t) + A(t)*diff(B(t), t). But here sage has assumed that the operators and their derivatives do commute. Not what I want.

I did look into sage.symbolic.function_factory.function and the like, but could not find anything about products. Am I overlooking something or is this currently not possible?

### derivative of symbolic product

Consider the product rule $\frac d{dt}[A(t)B(t)]=\dot{A}(t)B(t)+A(t)\dot{B}(t)$ with $A$ and $B$ not commuting, e.g, matrix valued. I'd like to replicate this in sage, however, I don't see how I can specify that $A$ and $B$ do not commute. So far I have

var('t')
A=function('A')(t)
B=function('B')(t)
diff(A*B,t)


which yields B(t)*diff(A(t), t) + A(t)*diff(B(t), t). But here sage has assumed that the operators and their derivatives do commute. Not what I want.

I did look into sage.symbolic.function_factory.function and the like, but could not find anything about products. Am I overlooking something or is this currently not possible?