# Taking the inverse Laplace Transform as a vector operation

I am solving a system of first-order equations using matrix operations and the Laplace Transform. I begin with the matrix equation that represents the solution to my system, like this:

$$\underline{\underline{\mathbf{m}}} \mathcal{L} { \mathbf{N}(t) } = \mathbf{N_0}$$

Bold symbols are vectors (functions) and double-underlined symbols are matrix. $$\mathcal{L}$$ is the Laplace Transform.

To make this computation I first write and invert the matrix $$\underline{\underline{m}}$$.

m[s_, l1_, l2_] := {{s + l1, 0}, {-l1, s + l2}}
invm[s_, l1_, l2_] := Inverse[m[s, l1, l2]]


Then I can input the initial conditions:

Subscript[N, 0] = {1, 0}


Then I use the inverse to get the Laplace transform of the (vector) solution:

R0[s_, l1_, l2_] := invm[s, l1, l2] . Subscript[N, 0]


Then, the final solution is simply an inverse Laplace Transform of this resulting vector, so I attempt:

N[t_, l1_, l2_] := Simplify[InverseLaplaceTransform[R0[s, l1, l2], s, t]]


But this command results in the error:

Can I get the inverse Laplace Transform to work on a vector in order to simplify my notation going forward?

• Subscript[N, 0] = {1, 0} Do not use N as variable name, this is a function name in Mathematica. gives the numerical value of expr. Try with another lower case letter and see if this fixes the issue you are having. Also, I would avoid using Subscript in Mathematica myself. The less fancy letters you use, the less problems you will have. You can use indexed variables instead if you must. May 28, 2023 at 4:12
• And the actual error is coming from your call N[t_, l1_, l2_] . Again N is builtin function. Try n[t_, l1_, l2_] and also remove the use of the other N you had before. May 28, 2023 at 4:25

I do not understand your use of Subscript[N, 0] = {1, 0} actually and what it is for? So I might be overlooking something here. But why not just

ClearAll["Global*"]
m[s_Symbol,l1_,l2_]:={{s+l1,0},{-l1,s+l2}}
invm[s_Symbol,l1_,l2_]:=Inverse[m[s,l1,l2]]
R0[s_Symbol,l1_,l2_]:=invm[s,l1,l2].{1,0}
n[t_Symbol,l1_,l2_,s_Symbol]:=Simplify[InverseLaplaceTransform[R0[s,l1,l2],s,t]]
n[t,2,3,s]


I would pass all the symbols involved, this includes $$t$$ and also $$s$$. Avoid using global symbols as they could be assigned to some values in your notebook.

• Well the Subscript[N,0] = {1,0} was just because the notation made sense, no particular reason. I didn't know N[]` was protected, so that is the answer. May 28, 2023 at 19:10