Ask Your Question

Revision history [back]

Problem with partial fraction's decomposition

I’m trying to do a partial fraction decomposition using respectively x, and k as variable and parameter. Running on sagemath there’s a problem. The code is x, k=var('x','k'); f1=1; f2=k^2 - x^2; f12=f1/f2; f=f12(x).partial_fraction(); fi = integral(f12,x); print (latex(f)); print (latex(fi)); and the message: ValueError: power::eval(): division by zero. Probably I have to assume that f2 not equal to 0, but how. Any help?

click to hide/show revision 2
None

Problem with partial fraction's decomposition

I’m trying to do a partial fraction decomposition using respectively x, and k as variable and parameter. Running on sagemath there’s a problem. The code is

x, k=var('x','k');
f1=1;
f2=k^2 - x^2;
f12=f1/f2;
f=f12(x).partial_fraction();
fi = integral(f12,x);
print (latex(f));
print (latex(fi)); (latex(fi));

and the message: message:

ValueError: power::eval(): division by zero.

Probably I have to assume that f2 not equal to 0, but how. Any help?