-3

[Integration using python][1]

$\int_0^{\infinity}\frac{sin^{-1}\left(2x\right)}{1+x^2}dx$

integration of (arcsin(2x))/(1+x^2) dx [infinity, 0]

I can't seem to solve this problem using python. Can anyone help me with the solution?

Knight
  • 1
  • 1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jul 20 '22 at 17:51
  • What have you already tried? You tagged `sympy`. Do you have a `sympy` attempt? – Tim Roberts Jul 20 '22 at 17:53
  • Yes, I tried to do it. But it isn't working. Here's what I tried. x = smp.symbols("x") f = smp.asin(2*x)/(1+x**2) smp.integrate(f,(x,0,smp.oo))' – Knight Jul 20 '22 at 17:57

1 Answers1

0

In a nutshell, SymPy does exactly what it is supposed to do: it reduces a given integral as far as possible which is a number when the integral is well-defined and analytic. However, the integral in question is not analytic. In turn, SymPy returns the symbolic representation of it as it cannot be further simplified.

from sympy import *

x = Symbol('x', positive=True)
f = asin(x)/(1 + x*x)
d = integrate(f, (x, 0, oo))
>d

enter image description here

Checking out WolframAlpha indicates how challenging this integral is; which is why only an approximation is provided.

In turn, a numerical integration scheme to approximate the value should be considered, e.g. methods from scipy.integrate.

7shoe
  • 1,438
  • 1
  • 8
  • 12