ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 22 May 2017 14:36:46 +0200Abstract symbolic matrix exponentialhttps://ask.sagemath.org/question/26036/abstract-symbolic-matrix-exponential/I'm new to Sage. I was told Sage can do something way better than Mathematica. I tried and didn't see the magic. So I was wondering if I did wrong.
**My goal**: to compute matrix exponential of 2x2 matrix whose elements are a function of time.
A(t)=[[-a(t), a(t)],[b(t), -b(t)]]
B(s)=integrate of A(t) from 0 to s
exp(B(s)) ===> I was told this can be done in one step like treating B as a constant matrix exp(B*t)
Is this possible? My approach is to solve a system of differential equations.
Thanks.
Wed, 04 Mar 2015 21:31:21 +0100https://ask.sagemath.org/question/26036/abstract-symbolic-matrix-exponential/Comment by tmonteil for <p>I'm new to Sage. I was told Sage can do something way better than Mathematica. I tried and didn't see the magic. So I was wondering if I did wrong.</p>
<p><strong>My goal</strong>: to compute matrix exponential of 2x2 matrix whose elements are a function of time.</p>
<p>A(t)=[[-a(t), a(t)],[b(t), -b(t)]]</p>
<p>B(s)=integrate of A(t) from 0 to s</p>
<p>exp(B(s)) ===> I was told this can be done in one step like treating B as a constant matrix exp(B*t)</p>
<p>Is this possible? My approach is to solve a system of differential equations.</p>
<p>Thanks.</p>
https://ask.sagemath.org/question/26036/abstract-symbolic-matrix-exponential/?comment=26037#post-id-26037Are a(t) an b(t) known ? Of which form ? Could you please give more details and a concrete example ?Wed, 04 Mar 2015 21:57:11 +0100https://ask.sagemath.org/question/26036/abstract-symbolic-matrix-exponential/?comment=26037#post-id-26037Answer by ayansengupta17 for <p>I'm new to Sage. I was told Sage can do something way better than Mathematica. I tried and didn't see the magic. So I was wondering if I did wrong.</p>
<p><strong>My goal</strong>: to compute matrix exponential of 2x2 matrix whose elements are a function of time.</p>
<p>A(t)=[[-a(t), a(t)],[b(t), -b(t)]]</p>
<p>B(s)=integrate of A(t) from 0 to s</p>
<p>exp(B(s)) ===> I was told this can be done in one step like treating B as a constant matrix exp(B*t)</p>
<p>Is this possible? My approach is to solve a system of differential equations.</p>
<p>Thanks.</p>
https://ask.sagemath.org/question/26036/abstract-symbolic-matrix-exponential/?answer=37666#post-id-37666 t, s = var(' t s ')
A = matrix([[3*t,t^2],[-2*t, t]])
B = A.apply_map(lambda e: integrate(e,t,0,s))
B.exp()
I
Think this is what you are looking for. Note that simple 'integrate' function won't integrate the matrix. Mon, 22 May 2017 14:36:46 +0200https://ask.sagemath.org/question/26036/abstract-symbolic-matrix-exponential/?answer=37666#post-id-37666