why ratsimp is not working for bigger expressions? how can I simplify 
further

On Monday, March 31, 2014 11:25:10 PM UTC+5:30, Rekha Penmetsa wrote:
>
> Hi,
> I am using Sage-Maxima for my project. I need to use "Differential 
> Transformation" method to solve my differential equation.After applying 
> this method,I will get univariate polynomial equation.I need to find roots 
> of polynomial. 
>
> My polynomial equation is becoming very big. I need to simplify it before 
> finding roots. 
>
> I used few simplification methods as shown in code. I could not simplify 
> expression. Trying to do this many times but could not solve.
> please anybody help me. I am new to sage.
>
> In the code below array range is (0,10). n = 10 . I need to solve for n = 
> 50. Equation will become very big. Here my problem is simplification. I 
> need to simplify where ever possible in the code.
>
> Code:
>
> from sage.all import *
>
> a,c1,c2 = var( 'a c1 c2')
> Y = [ 0,0,c1,c2 ]
>
> mu = 2.00*(10**(-9))
> Ev = 1.06*(10**12)
> d = 1.00*(10**(-9))
> L = 20*d
> Pi = 3.141592654
> Iv = Pi*((d**4)/64)
> kw = (300*(Ev*Iv/(L**4)))
> musq = (mu/L)**2
>
> for i in range(0,10):
>   
>  
> Y.append(maxima.expand(((((-a)+musq*kw*(L**4)/(Ev*Iv))*(i+1)*(i+2)*Y[i+2])-(kw*(L**4)/(Ev*Iv))*Y[i])/((1-(a*musq))*(i+1)*(i+2)*(i+3)*(i+4))))
> e1 =  maxima.expand(sum(Y))
> print 'e1'
> print e1
>
> z = []
> for j in range(0,10):
>    z.append(maxima.ratexpand(j*Y[j])) 
> e2 = maxima.expand(sum(z))
> print 'e2'
> print e2
>
> a11 = maxima.ratsimp(maxima.combine(maxima.expand(e1.coeff(c1))))
> print 'a11'
> print a11
>
> a12 = maxima.ratsimp(maxima.combine(maxima.expand(e1.coeff(c2))))
> print 'a12'
> print a12
>
> a21 = maxima.ratsimp(maxima.combine(maxima.expand(e2.coeff(c1))))
> print 'a21'
> print a21
>
> a22 = maxima.ratsimp(maxima.combine(maxima.expand(e2.coeff(c2))))
> print 'a22'
> print a22
>
> M = maxima.matrix([a11,a12],[a21,a22])
> #print 'M'
> #print M
>
> maxima.ratmx = True
> maxima.sparse = True
>
> det = maxima.num(maxima.combine(maxima.ratexpand(M.determinant())))
> print 'det'
> print det
>
> R = maxima.allroots(det)
> print R
>
>  
>  
>  
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to