yacas
yacas copied to clipboard
Integrate an expression with a parameter?
Why does this not work:
In> Integrate(x) 1/(x^2+a^2)
CommandLine(1) : "Gcd: argument is not an exact number"
Out> False
Do I need to declare a
? Derivation for such an expression does work:
In> D(x) 1/(x^2+a^2)
Out> (-2*x)/(x^2+a^2)^2
Hi,
1/(x^2 + a^2) is a very simple rational function, which integrates to 1/a * arctan(x/a) + c for non-zero, real a. The problem is that it's treated as a general rational function, where presence of parameter(s) makes things quite difficult. The error you get is from the general algorithm for integrating rational functions. I'll try to add some code to integrate well known special cases like this before the general method is attempted.