Ask Your Question

integration of matrix-valued function

asked 2015-11-26 06:34:42 -0600

jan gravatar image

updated 2015-11-26 06:39:34 -0600

vdelecroix gravatar image

Hi, I want to compute the (in)definite integral of matrix valued function, for example

f =matrix([[x,1],[x^2,2]]);

The command


doesn't work. I expect matrix as a result - integrated by elements

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-11-26 06:41:24 -0600

vdelecroix gravatar image

This is not supported but you can use

sage: f.apply_map(lambda e: integrate(e,x,0,1))
[1/2   1]
[1/3   2]

The method apply_map simply applies a function entrywise.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2015-11-26 06:34:42 -0600

Seen: 560 times

Last updated: Nov 26 '15