| 1 | initial version |
You should do f12.partial_fraction() as opposed to f12(x).partial_fraction()
sage: x, k=var('x','k'); f1=1; f2=k^2 - x^2; f12=f1/f2
sage: f12
1/(k^2 - x^2)
sage: f12.partial_fraction()
-1/2/((k + x)*x) + 1/2/((k - x)*x)
This raises an error:
sage: f12(x)
Traceback (most recent call last):
...
ValueError: power::eval(): division by zero
Note that this works too (maybe this is what you intended?):
sage: f12(x,k)
-1/(k^2 - x^2)
sage: f12(x,k).partial_fraction()
1/2/((k + x)*x) - 1/2/((k - x)*x)
| 2 | No.2 Revision |
You should do f12.partial_fraction() as opposed to f12(x).partial_fraction()
sage: x, k=var('x','k'); f1=1; f2=k^2 - x^2; f12=f1/f2
sage: f12
1/(k^2 - x^2)
sage: f12.partial_fraction()
-1/2/((k + x)*x) + 1/2/((k - x)*x)
This raises an error:the error you mention:
sage: f12(x)
Traceback (most recent call last):
...
ValueError: power::eval(): division by zero
Note that this works too (maybe this is what you intended?):
sage: f12(x,k)
-1/(k^2 - x^2)
sage: f12(x,k).partial_fraction()
1/2/((k + x)*x) - 1/2/((k - x)*x)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.