(rv, max=4, pow=False)
return bottom_up(rv, f)
Convert sin(x)*-2 to 1 + cot(x)**2.

    See _TR56 docstring for advanced use of ``max`` and ``pow``.

    Examples
    ========

    >>> from sympy.simplify.fu import TR15
    >>> from sympy.abc import x
    >>> from sympy import cos, sin
    >>> TR15(1 - 1/sin(x)**2)
    -cot(x)**2
Convert sin(x)*-2 to 1 + cot(x)**2.
Convert sin ( x ) * - 2 to 1 + cot ( x ) ** 2 .
def TR15(rv, max=4, pow=False):
    """Convert sin(x)*-2 to 1 + cot(x)**2.

    See _TR56 docstring for advanced use of ``max`` and ``pow``.

    Examples
    ========

    >>> from sympy.simplify.fu import TR15
    >>> from sympy.abc import x
    >>> from sympy import cos, sin
    >>> TR15(1 - 1/sin(x)**2)
    -cot(x)**2

    """

    def f(rv):
        if not (isinstance(rv, Pow) and rv.base.func is sin):
            return rv

        ia = 1/rv
        a = _TR56(ia, sin, cot, lambda x: 1 + x, max=max, pow=pow)
        if a != ia:
            rv = a
        return rv

    return bottom_up(rv, f)
def TR15 ( rv , max = 4 , pow = False ) : def f ( rv ) : if not ( isinstance ( rv , Pow ) and rv . base . func is sin ) : return rv ia = 1 / rv a = _TR56 ( ia , sin , cot , lambda x : 1 + x , max = max , pow = pow ) if a != ia : rv = a return rv return bottom_up ( rv , f )