I have a partially t
-dependent matrix which I want to split into its t
-dependent and its t
-independent summand. My example for this matrix is
m = {{1 + Sin[t], 5}, {7 BesselJ[3, t], a + t + t^2 + t^3}}
which I want to split the following way:
In[1]:= Separate[m,t]
Out[1]:= {{{1, 5}, {0, a}}, {{Sin[t], 0}, {7 BesselJ[3, t], t + t^2 + t^3}}}
such that I get containing one constant and one completely non-constant matrix.
I don't want to use Integrate[]
for this (so Fourier decomposition is not an option), but D[]
is fine. I can use manual definitions like D[a, t]^=0
to tell Mathematica which parameters are constant.
The problem is that my actual functions are much more involved than what I presented here, and all solutions I could come up with are terrible workarounds which I'm afraid might fail occasionally without notice.
m /. _[t]->0
$\endgroup$t
-dependence (e.g.Exp[I(1-Sin[w t])]
). However, I will check whether it helps me find a solution. $\endgroup$