The apply_map method is a handy command for entrywise operations. For instance, let

```
A = matrix([[sin(x), cos(x)],[cos(x), -sin(x)]]); # define a matrix function of x
A
```

$$
\begin{pmatrix}
\sin\left(x\right) & \cos\left(x\right) \\
\cos\left(x\right) & -\sin\left(x\right)
\end{pmatrix}.
$$

Let's compute the entrywise derivative with `apply_map`

:

```
A.apply_map(lambda a : a.derivative(x))
```

$$
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr}
\cos\left(x\right) & -\sin\left(x\right) \\
-\sin\left(x\right) & -\cos\left(x\right)
\end{array}\right),
$$

and the Jordan canonical form

```
A.jordan_form()
```

$$
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{r|r}
-\sqrt{\cos\left(x\right)^{2} + \sin\left(x\right)^{2}} & 0 \\
\hline
0 & \sqrt{\cos\left(x\right)^{2} + \sin\left(x\right)^{2}}
\end{array}\right).
$$

Another small example, this time with symbolic functions:

```
var('x y')
m=2; n=4
# create a mxn matrix of symbolic functions in x and y
F = matrix([[function('f'+str(i)+str(j))(x, y) for j in [1..n]] for i in [1..m]]);
F
```

$$
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr}
f_{11}\left(x, y\right) & f_{12}\left(x, y\right) & f_{13}\left(x, y\right) & f_{14}\left(x, y\right) \\
f_{21}\left(x, y\right) & f_{22}\left(x, y\right) & f_{23}\left(x, y\right) & f_{24}\left(x, y\right)
\end{array}\right).
$$

Now, let's ask for the entrywise integral with respect to $y$ of the 2nd derivative with respect to $x$:

```
F.apply_map(lambda f : (f.derivative(x, 2)).integrate(y))
```

$$
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr}
\int \frac{\partial^{2}}{(\partial x)^{2}}f_{11}\left(x, y\right)\,{d y} & \int \frac{\partial^{2}}{(\partial x)^{2}}f_{12}\left(x, y\right)\,{d y} & \int \frac{\partial^{2}}{(\partial x)^{2}}f_{13}\left(x, y\right)\,{d y} & \int \frac{\partial^{2}}{(\partial x)^{2}}f_{14}\left(x, y\right)\,{d y} \\
\int \frac{\partial^{2}}{(\partial x)^{2}}f_{21}\left(x, y\right)\,{d y} & \int \frac{\partial^{2}}{(\partial x)^{2}}f_{22}\left(x, y\right)\,{d y} & \int \frac{\partial^{2}}{(\partial x)^{2}}f_{23}\left(x, y\right)\,{d y} & \int \frac{\partial^{2}}{(\partial x)^{2}}f_{24}\left(x, y\right)\,{d y}
\end{array}\right).
$$

yes, in pple all this can be done in Sage! of course in practice it'll depend on the complexity of your problem :) for entrywise differentiation, see my answer below for some hints. for point 3, it could be relevant to check this question. and let me add that you may get better answers in this site if you include some code with attempts / a concrete example.