help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: use of symbolic toolbox for the inverse of a matrix


From: george brida
Subject: Re: use of symbolic toolbox for the inverse of a matrix
Date: Fri, 30 Sep 2011 00:56:57 +0200

Dear friends,
thank you very much.

2011/9/29 Jordi Gutiérrez Hermoso <address@hidden>
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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]