Repository: sympy/sympy
File: sympy/simplify/hyperexpand_doc.py (Python)

Code before:

        # Error functions
        'erf': ':func:`~sympy.functions.special.error_functions.erf`',
        'expint': ':func:`~sympy.functions.special.error_functions.expint`',
        'Ei': ':func:`~sympy.functions.special.error_functions.Ei`',
        'Ci': ':func:`~sympy.functions.special.error_functions.Ci`',
        'Si': ':func:`~sympy.functions.special.error_functions.Si`',
        'Shi': ':func:`~sympy.functions.special.error_functions.Shi`',
        'Chi': ':func:`~sympy.functions.special.error_functions.Chi`',
        'fresnels': ':func:`~sympy.functions.special.error_functions.fresnels`',
        'fresnelc': ':func:`~sympy.functions.special.error_functions.fresnelc`',

        # Elliptic integrals
        'elliptic_k': ':func:`~sympy.functions.special.elliptic_integrals.elliptic_k`',
        'elliptic_e': ':func:`~sympy.functions.special.elliptic_integrals.elliptic_e`',

        # Elementary functions 
        # exponential
        'exp': ':func:`~sympy.functions.elementary.exponential.exp`',
        'log': ':func:`~sympy.functions.elementary.exponential.log`',

        # miscellaneous
        'sqrt': ':func:`~sympy.functions.elementary.miscellaneous.sqrt`',
        'root': ':func:`~sympy.functions.elementary.miscellaneous.root`',

        # trignometric 
        'cos': ':func:`~sympy.functions.elementary.trigonometric.cos`',
        'sin': ':func:`~sympy.functions.elementary.trigonometric.sin`',

        # hyperbolic
        'cosh': ':func:`~sympy.functions.elementary.hyperbolic.cosh`',
        'sinh': ':func:`~sympy.functions.elementary.hyperbolic.sinh`',

        # Combinatorial functions
        'rf': ':func:`~sympy.functions.combinatorial.factorials.RisingFactorial`',
        'factorial': ':func:`~sympy.functions.combinatorial.factorials.factorial`',

        # Other special functions
        'lerchphi': ':func:`~sympy.functions.special.zeta_functions.lerchphi`',

    }

    def get_special_functions_used(expr):
        '''Extract special function names from an expression'''
        func_names = set()
        for atom in expr.atoms(Function):
            if not isinstance(atom, AppliedUndef):
                func_name = atom.func.__name__
                if func_name in FUNCTION_LINKS:
                    func_names.add(func_name)
        return sorted(func_names)

Review comment (suggestion):
The comment has a spelling error: "trignometric" should be "trigonometric".
```suggestion
        # trigonometric 
```

Code after:
        'erf': ':func:`~sympy.functions.special.error_functions.erf`',
        'expint': ':func:`~sympy.functions.special.error_functions.expint`',
        'Ei': ':func:`~sympy.functions.special.error_functions.Ei`',
        'Ci': ':func:`~sympy.functions.special.error_functions.Ci`',
        'Si': ':func:`~sympy.functions.special.error_functions.Si`',
        'Shi': ':func:`~sympy.functions.special.error_functions.Shi`',
        'Chi': ':func:`~sympy.functions.special.error_functions.Chi`',
        'fresnels': ':func:`~sympy.functions.special.error_functions.fresnels`',
        'fresnelc': ':func:`~sympy.functions.special.error_functions.fresnelc`',

        # Elliptic integrals
        'elliptic_k': ':func:`~sympy.functions.special.elliptic_integrals.elliptic_k`',
        'elliptic_e': ':func:`~sympy.functions.special.elliptic_integrals.elliptic_e`',

        # Elementary functions - exponential
        'exp': ':func:`~sympy.functions.elementary.exponential.exp`',
        'log': ':func:`~sympy.functions.elementary.exponential.log`',

        # miscellaneous
        'sqrt': ':func:`~sympy.functions.elementary.miscellaneous.sqrt`',
        'root': ':func:`~sympy.functions.elementary.miscellaneous.root`',

        # trigonometric
        'cos': ':func:`~sympy.functions.elementary.trigonometric.cos`',
        'sin': ':func:`~sympy.functions.elementary.trigonometric.sin`',

        # hyperbolic
        'cosh': ':func:`~sympy.functions.elementary.hyperbolic.cosh`',
        'sinh': ':func:`~sympy.functions.elementary.hyperbolic.sinh`',

        # Combinatorial functions
        'RisingFactorial': ':func:`~sympy.functions.combinatorial.factorials.RisingFactorial`',
        'factorial': ':func:`~sympy.functions.combinatorial.factorials.factorial`',

        # Other special functions
        'lerchphi': ':func:`~sympy.functions.special.zeta_functions.lerchphi`',

    }

    def get_special_functions_used(expr):
        """Extract special function names from an expression."""
        func_names = set()
        for atom in expr.atoms(Function):
            if not isinstance(atom, AppliedUndef):
                func_name = atom.func.__name__
                if func_name in FUNCTION_LINKS:
                    func_names.add(func_name)
        return sorted(func_names)

    c = FormulaCollection()