(e)
return bottom_up(e, f)
Replace all trig functions with hyperbolic functions using
    the Osborne rule.

    References
    ==========

    http://en.wikipedia.org/wiki/Hyperbolic_function
Replace all trig functions with hyperbolic functions using
    the Osborne rule.
Replace all trig functions with hyperbolic functions using the Osborne rule .
def _osbornei(e):
    """Replace all trig functions with hyperbolic functions using
    the Osborne rule.

    References
    ==========

    http://en.wikipedia.org/wiki/Hyperbolic_function
    """

    def f(rv):
        if not isinstance(rv, C.TrigonometricFunction):
            return rv
        if rv.func is sin:
            return sinh(rv.args[0])/I
        elif rv.func is cos:
            return cosh(rv.args[0])
        elif rv.func is tan:
            return tanh(rv.args[0])/I
        elif rv.func is cot:
            return coth(rv.args[0])*I
        elif rv.func is sec:
            return 1/cosh(rv.args[0])
        elif rv.func is csc:
            return I/sinh(rv.args[0])
        else:
            raise NotImplementedError('unhandled %s' % rv.func)

    return bottom_up(e, f)
def _osbornei ( e ) : def f ( rv ) : if not isinstance ( rv , C . TrigonometricFunction ) : return rv if rv . func is sin : return sinh ( rv . args [ 0 ] ) / I elif rv . func is cos : return cosh ( rv . args [ 0 ] ) elif rv . func is tan : return tanh ( rv . args [ 0 ] ) / I elif rv . func is cot : return coth ( rv . args [ 0 ] ) * I elif rv . func is sec : return 1 / cosh ( rv . args [ 0 ] ) elif rv . func is csc : return I / sinh ( rv . args [ 0 ] ) else : raise NotImplementedError ( 'unhandled %s' % rv . func ) return bottom_up ( e , f )