Evaluation float('inf') times symbolic variable with Python
Question: I need integrate `exp(-c1*r)`, with respect to `'r'` that goes from 0 to
infinity, where `'c1'` and `'r'` are symbols.

The problem seems to occur when evaluate `inf*c1` not equal to `inf`

    
    
    import sympy
    from sympy import *
    
    # Defining the variable 
    c1 = Symbol('c1', positive=True)
    r =  Symbol('r')
    
    print float('inf')*2
    print float('inf')*c1
    print integrate(exp(-c1*r),(r,0,10000))
    print integrate(exp(-c1*r),(r,0,float('inf')))
    

How to make that `-inf*c1 = -inf`?


Answer: You probably want to use `sympy.oo`, which is Sympy's symbol for infinity.
Try:

    
    
    from IPython.display import display
    import sympy as sy
    
    
    sy.init_printing()  # LaTeX like pretty printing for IPython
    
    r = sy.Symbol('r', real=True)
    c1 = sy.Symbol('c_1', positive=True)
    
    f = sy.exp(-c1*r)
    F = sy.integrate(f, (r, 0, sy.oo))
    display(F)
    

