Status: Accepted
Owner: ----
CC: [email protected],  [email protected]
Labels: Type-Defect Priority-Medium Integration

New issue 3154 by [email protected]: Integration of (sqrt(1-x)+sqrt(1+x))**2/x says Gammas partially over the strip.
http://code.google.com/p/sympy/issues/detail?id=3154

The integration of (sqrt(1-x)+sqrt(1+x))**2/x raises
NotImplementedError: Gammas partially over the strip.

This is the trace:

---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
/home/raoul/src/ipython/<ipython-input-14-458418e838a1> in <module>()
----> 1 integrate(i, x)
      2 # Raises NotImplementedError: Gammas partially over the strip.

/home/raoul/python/sympy/utilities/decorator.pyc in threaded_func(expr, *args, **kwargs) 23 func(expr.rhs, *args, **kwargs))
     24             else:
---> 25                 return func(expr, *args, **kwargs)
     26
     27     return threaded_func

/home/raoul/python/sympy/integrals/integrals.pyc in integrate(*args, **kwargs)
   1096
   1097     if isinstance(integral, Integral):
-> 1098 return integral.doit(deep = False, meijerg = meijerg, conds = conds)
   1099     else:
   1100         return integral

/home/raoul/python/sympy/integrals/integrals.pyc in doit(self, **hints)
    507                 antideriv = None
    508             else:
--> 509 antideriv = self._eval_integral(function, xab[0], meijerg1)
    510                 if antideriv is None and meijerg1 is True:
    511                     ret = try_meijerg(function, xab)

/home/raoul/python/sympy/integrals/integrals.pyc in _eval_integral(self, f, x, meijerg)
    796                 f = f.expand(mul=True, deep=False)
    797                 if f.is_Add:
--> 798                     return self._eval_integral(f, x, meijerg)
    799
    800

/home/raoul/python/sympy/integrals/integrals.pyc in _eval_integral(self, f, x, meijerg)
    777             if meijerg is not False and h is None:
    778                 # rewrite using G functions
--> 779                 h = meijerint_indefinite(g, x)
    780                 if h is not None:
    781                     parts.append(coeff * h)

/home/raoul/python/sympy/integrals/meijerint.pyc in meijerint_indefinite(f, x)
   1490     results = []
   1491     for a in list(_find_splitting_points(f, x)) + [S(0)]:
-> 1492         res = _meijerint_indefinite_1(f.subs(x, x + a), x)
   1493         if res is None:
   1494             continue

/home/raoul/python/sympy/integrals/meijerint.pyc in _meijerint_indefinite_1(f, x) 1504 _debug('Trying to compute the indefinite integral of', f, 'wrt', x)
   1505
-> 1506     gs = _rewrite1(f, x)
   1507     if gs is None:
1508 # Note: the code that calls us will do expand() and try again

/home/raoul/python/sympy/integrals/meijerint.pyc in _rewrite1(f, x, recursive)
   1446     """
   1447     fac, po, g = _split_mul(f, x)
-> 1448     g = _rewrite_single(g, x, recursive)
   1449     if g:
   1450         return fac, po, g[0], g[1]

/home/raoul/python/sympy/core/cache.pyc in wrapper(*args, **kw_args)
     89         except KeyError:
     90             pass
---> 91         func_cache_it_cache[k] = r = func(*args, **kw_args)
     92         return r
     93     return wrapper

/home/raoul/python/sympy/integrals/meijerint.pyc in _rewrite_single(f, x, recursive) 1417 integrator=my_integrator, 1418 needeval=True, simplify=False)
-> 1419                 g = my_imt(F, s, x, strip).subs(a, 1)
   1420             except IntegralTransformError:
   1421                 g = None

/home/raoul/python/sympy/integrals/meijerint.pyc in my_imt(F, s, x, strip)
   1385         try:
   1386             return inverse_mellin_transform(F, s, x, strip,
-> 1387 as_meijerg=True, needeval=True)
   1388         except MellinTransformStripError:
1389 return inverse_mellin_transform(simplify(cancel(expand(F))), s, x, strip,

/home/raoul/python/sympy/integrals/transforms.pyc in inverse_mellin_transform(F, s, x, strip, **hints)
    822     mellin_transform
    823     """
--> 824 return InverseMellinTransform(F, s, x, strip[0], strip[1]).doit(**hints)
    825
    826

/home/raoul/python/sympy/integrals/transforms.pyc in doit(self, **hints)
    110             try:
    111                 return self._compute_transform(self.function,
--> 112 self.function_variable, self.transform_variable, **hints)
    113             except IntegralTransformError:
    114                 pass

/home/raoul/python/sympy/integrals/transforms.pyc in _compute_transform(self, F, s, x, **hints) 768 'Component %s not recognised.' % f)
    769         strip = self.fundamental_strip
--> 770         return _inverse_mellin_transform(F, s, x, strip, **hints)
    771
    772     def _as_integral(self, F, s, x):

/home/raoul/python/sympy/integrals/transforms.pyc in wrapper(*args, **kwargs)
    184         def wrapper(*args, **kwargs):
    185             noconds = kwargs.pop('noconds', default)
--> 186             res = func(*args, **kwargs)
    187             if noconds:
    188                 return res[0]

/home/raoul/python/sympy/integrals/transforms.pyc in _inverse_mellin_transform(F, s, x_, strip, as_meijerg) 686 ress = [_inverse_mellin_transform(G, s, x, strip, as_meijerg,
    687                                               noconds=False) \
--> 688                     for G in g.args]
    689             conds = [p[1] for p in ress]
    690             ress = [p[0] for p in ress]

/home/raoul/python/sympy/integrals/transforms.pyc in wrapper(*args, **kwargs)
    184         def wrapper(*args, **kwargs):
    185             noconds = kwargs.pop('noconds', default)
--> 186             res = func(*args, **kwargs)
    187             if noconds:
    188                 return res[0]

/home/raoul/python/sympy/integrals/transforms.pyc in _inverse_mellin_transform(F, s, x_, strip, as_meijerg)
    695
    696         try:
--> 697 a, b, C, e, fac = _rewrite_gamma(g, s, strip[0], strip[1])
    698         except IntegralTransformError:
    699             continue

/home/raoul/python/sympy/integrals/transforms.pyc in _rewrite_gamma(f, s, a, b)
    599                 if (a > 0 and (left(-b/a, is_numer) is False)) or \
    600                    (a < 0 and (left(-b/a, is_numer) is True)):
--> 601 raise NotImplementedError('Gammas partially over the strip.')
    602             ugammas += [(a, b)]
    603         elif isinstance(fact, sin):

NotImplementedError: Gammas partially over the strip.


--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to