Ask Your Question

kartheek's profile - activity

2018-12-03 17:47:39 +0200 received badge  Student (source)
2018-12-03 17:47:09 +0200 received badge  Famous Question (source)
2017-09-04 21:43:35 +0200 received badge  Notable Question (source)
2017-09-04 21:43:35 +0200 received badge  Popular Question (source)
2015-02-19 13:38:49 +0200 commented answer full_simplify produces unexpected result

But is there any way to expand polynomials correctly with decimal coefficients?

2015-02-18 17:12:25 +0200 asked a question full_simplify produces unexpected result

I applied full_simplify to an expression obtained by substituting a quotient of two polynomials in a polynomial expression, as illustrated below.

The highest degree in the result was expected to be 8, but I get an output where the highest degree is 20.

Can anyone help me find what is the mistake i have done?

Code:

var('s,z')
g1 = 12108.8236080100*s^4 + 3016.35528790190*s^3 + 10600.0709715245*s^2 + 1937.60970085071*s + 409.016662847740/s + 472.343751699259/s^2 + 28.3730874809756/s^3 + 24.0436698653890/s^4 + 3397.06167138687  
g2 = g1.subs(s=(z-1)/(z+1))
g2.full_simplify()

Output:

(31993.69841156735*z^20 - 158174.2276629893*z^19 + 216392.4500464178*z^18 + 280148.4057432631*z^17 - 1211263.434674058*z^16 + 1037191.771384268*z^15 + 1264180.797481716*z^14 - 3364714.4688927*z^13 + 1723475.12974153*z^12 + 2648901.578200325*z^11 - 4385755.889381289*z^10 + 1244061.427447394*z^9 + 2634639.643830222*z^8 - 2874359.710320266*z^7 + 417712.5402619956*z^6 + 1209501.453649961*z^5 - 917808.742510938*z^4 + 93647.83955663575*z^3 + 205222.817859467*z^2 - 116204.0691059264*z + 21210.98893340469)/(z^20 - 10.0*z^18 + 45.0*z^16 - 120.0*z^14 + 210.0*z^12 - 252.0*z^10 + 210.0*z^8 - 120.0*z^6 + 45.0*z^4 - 10.0*z^2 + 1.0)
2015-02-14 20:17:47 +0200 received badge  Editor (source)
2015-02-14 20:16:35 +0200 asked a question complete expansion of polynomial substitution

In the following code, I have substituted a polynomial in other polynomial and the result even after using the command ".expand" shows no complete expansion,Is there any other way to get complete expansion of polynomial substitution?

g1=1+ (s^2) ; 
g2=g1.subs(s= 1/(z-1) ) ; 
g2.expand()

Result: 1+ 1/((z-1)^2) is shown, but not expansion (z^2-z+2)/z^2-z+1.