How to numerically calculate the function 1/(x^2 - alpha^2) with GSL routines?

  • Thread starter Thread starter emilroz
  • Start date Start date
  • Tags Tags
    Integration
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 2K views
emilroz
Messages
3
Reaction score
0
Hi, already tried few routines from GSL and it seems it doesn't work.

Function: 1/(x^2 - alpha^2)

Can anyone tell how to calculate that numerically.
Tried to do it by "hand" as well but no good results.

Cheers.
 
on Phys.org
You don't need a numerical solution for this. I assume alpha is just an arbitrary constant. Note that the denominator can be written as a product of 2 functions.
 
Thanks for respond.

Actually the problem is bit more complicated. Integral is (-inf, inf) and whole function is equal to:

f(y,z) = int_(-inf,inf) dx [2y/(x^2-y^2) ] * [ 1/(exp{x-z} +1)]

What do u think about that.