# Differential operator

Assuming:

```
f(x) = 3*x
g(x) = 4*x
m = matrix([[f],[g]])
```

Is it possible to define L as:

```
L M
[d/dx] * m = [3]
[4]
```

?

Differential operator

Assuming:

```
f(x) = 3*x
g(x) = 4*x
m = matrix([[f],[g]])
```

Is it possible to define L as:

```
L M
[d/dx] * m = [3]
[4]
```

?

add a comment

2

You can do :

```
sage: m.derivative(x)
[x |--> 3]
[x |--> 4]
```

If you do not like the mapping you can first "evaluate" to get a symbolic expression instead of a symbolic function:

```
sage: m(x).derivative(x)
[3]
[4]
```

Compare

```
sage: m
[x |--> 3*x]
[x |--> 4*x]
```

with :

```
sage: m(x)
[3*x]
[4*x]
```

Please start posting anonymously - your entry will be published after you log in or create a new account.

Asked: ** 2021-04-19 12:00:41 +0200 **

Seen: **174 times**

Last updated: **Apr 19 '21**

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.