Ah! Thanks for catching that.
It turns out that Maxima can do this integral "by hand", but the result form
is ugly:
sqrt(x^2+4)/(x^2+1)$
gfactor(%);
=> sqrt(x^2+4)/((x-%i)*(x+%i))
partfrac(%,x);
=>%i*sqrt(x^2+4)/(2*(x+%i))-%i*sqrt(x^2+4)/(2*(x-%i))
integrate(%,x);
=>
%i*(sqrt(3)*asinh(%i*x/(2*abs(x+%i))-2/abs(x+%i))-%i*asinh(x/2)+sqrt(x^2+4))/2-%i*(-sqrt(3)*asinh(%i*x/(2*abs(x-%i))+2/abs(x-%i))+%i*asinh(x/2)+sqrt(x^2+4))/2
Not sure this result is useful. Also, the abs's in there are ugly -- are
they correct?
-s
On Fri, Feb 18, 2011 at 10:04, andre maute <andre.maute at gmx.de> wrote:
> On 02/18/2011 03:59 PM, Stavros Macrakis wrote:
>
>> Hmm. Mathematica
>> (integrals.wolfram.com<
>> http://integrals.wolfram.com/index.jsp?expr=+sqrt(x^2%2B4)/(x^2%2B1)>)
>>
>> gets
>> asin(x/2)+sqrt(3)*atan((sqrt(3)*x)/sqrt(4+x^2)), but that is not correct
>> according to Maxima:
>>
>> ex0: sqrt(x^2+4)/(x^2+1)$
>> ex1: asin(x/2)+sqrt(3)*atan(sqrt(3)*x/sqrt(4+x^2))$
>>
>> The difference d: diff(ex1,x)-ex0 is messy and hard to simplify to
>> something
>> simple.
>>
>> Plotting d shows that it is non-constant and taylor agrees that the
>> difference is non-constant:
>>
>> taylor(diff(ex1,x)-ex0,x,0,10);
>> => x^2/8+5*x^6/1024+63*x^10/262144
>>
>> Have I made some blunder, or is the Mathematica result incorrect?
>>
> I have
>
> (%i1) display2d : false;
>
> (%o1) false
> (%i2) diff(sqrt(p-1)*atan(sqrt(p-1)*x/sqrt(x^2+p)) + asinh(x/sqrt(p)),x);
>
> (%o2) sqrt(p-1)*(sqrt(p-1)/sqrt(x^2+p)-sqrt(p-1)*x^2/(x^2+p)^(3/2))
> /((p-1)*x^2/(x^2+p)+1)
> +1/(sqrt(p)*sqrt(x^2/p+1))
> (%i3) radcan(%);
>
> (%o3) sqrt(x^2+p)/(x^2+1)
>
> you have a typo asin should read asinh
>
> Andre
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>