[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: use of symbolic toolbox for the inverse of a matrix

**From**: |
Jordi Gutiérrez Hermoso |

**Subject**: |
Re: use of symbolic toolbox for the inverse of a matrix |

**Date**: |
Thu, 29 Sep 2011 13:04:01 -0500 |

On 29 September 2011 11:47, george brida <address@hidden> wrote:
>* Dear Octavers,*
>* I have the following matrix A:*
>* A(1,1)=T ; A(1,2)=T*(T+1)/2 ;*
>* A(2,1)=T*(T+1)/2 ; A(2,2)= T*(T+1)*(2*T+1)/6*
>
>* I would like to find the inverse of this matrix in this general form.*
The symbolic packge doesn't have symbolic matrices implemented yet.
This is how to do it in Sage instead:
sage: t = var('t')
sage: X = matrix([ [t, t*(t+1)/2], [t*(t+1)/2, t*(t+1)*(2*t+1)/6]])
sage: X
[ t 1/2*(t + 1)*t]
[ 1/2*(t + 1)*t 1/6*(t + 1)*(2*t + 1)*t]
sage: X.inverse()
[-3*(t + 1)^2/(3*(t + 1)^2*t - 2*(t + 1)*(2*t + 1)*t) + 1/t
6*(t + 1)/(3*(t + 1)^2*t - 2*(t + 1)*(2*t + 1)*t)]
[6*(t + 1)/(3*(t + 1)^2*t - 2*(t + 1)*(2*t + 1)*t)
-12/(3*(t + 1)^2*t - 2*(t + 1)*(2*t + 1)*t)]
HTH,
- Jordi G. H.