def _is_function_class_equation(func_class, f, symbol):
    ' Tests whether the equation is an equation of the given function class.\n\n    The given equation belongs to the given function class if it is\n    comprised of functions of the function class which are multiplied by\n    or added to expressions independent of the symbol. In addition, the\n    arguments of all such functions must be linear in the symbol as well.\n\n    Examples\n    ========\n\n    >>> from sympy.solvers.solveset import _is_function_class_equation\n    >>> from sympy import tan, sin, tanh, sinh, exp\n    >>> from sympy.abc import x\n    >>> from sympy.functions.elementary.trigonometric import (TrigonometricFunction,\n    ... HyperbolicFunction)\n    >>> _is_function_class_equation(TrigonometricFunction, exp(x) + tan(x), x)\n    False\n    >>> _is_function_class_equation(TrigonometricFunction, tan(x) + sin(x), x)\n    True\n    >>> _is_function_class_equation(TrigonometricFunction, tan(x**2), x)\n    False\n    >>> _is_function_class_equation(TrigonometricFunction, tan(x + 2), x)\n    True\n    >>> _is_function_class_equation(HyperbolicFunction, tanh(x) + sinh(x), x)\n    True\n    '
    if (f.is_Mul or f.is_Add):
        return all((_is_function_class_equation(func_class, arg, symbol) for arg in f.args))
    if f.is_Pow:
        if (not f.exp.has(symbol)):
            return _is_function_class_equation(func_class, f.base, symbol)
        else:
            return False
    if (not f.has(symbol)):
        return True
    if isinstance(f, func_class):
        try:
            g = Poly(f.args[0], symbol)
            return (g.degree() <= 1)
        except PolynomialError:
            return False
    else:
        return False
Tests whether the equation is an equation of the given function class.

The given equation belongs to the given function class if it is
comprised of functions of the function class which are multiplied by
or added to expressions independent of the symbol. In addition, the
arguments of all such functions must be linear in the symbol as well.

Examples
========

>>> from sympy.solvers.solveset import _is_function_class_equation
>>> from sympy import tan, sin, tanh, sinh, exp
>>> from sympy.abc import x
>>> from sympy.functions.elementary.trigonometric import (TrigonometricFunction,
... HyperbolicFunction)
>>> _is_function_class_equation(TrigonometricFunction, exp(x) + tan(x), x)
False
>>> _is_function_class_equation(TrigonometricFunction, tan(x) + sin(x), x)
True
>>> _is_function_class_equation(TrigonometricFunction, tan(x**2), x)
False
>>> _is_function_class_equation(TrigonometricFunction, tan(x + 2), x)
True
>>> _is_function_class_equation(HyperbolicFunction, tanh(x) + sinh(x), x)
True
def _is_function_class_equation(func_class, f, symbol):
    ' Tests whether the equation is an equation of the given function class.\n\n    The given equation belongs to the given function class if it is\n    comprised of functions of the function class which are multiplied by\n    or added to expressions independent of the symbol. In addition, the\n    arguments of all such functions must be linear in the symbol as well.\n\n    Examples\n    ========\n\n    >>> from sympy.solvers.solveset import _is_function_class_equation\n    >>> from sympy import tan, sin, tanh, sinh, exp\n    >>> from sympy.abc import x\n    >>> from sympy.functions.elementary.trigonometric import (TrigonometricFunction,\n    ... HyperbolicFunction)\n    >>> _is_function_class_equation(TrigonometricFunction, exp(x) + tan(x), x)\n    False\n    >>> _is_function_class_equation(TrigonometricFunction, tan(x) + sin(x), x)\n    True\n    >>> _is_function_class_equation(TrigonometricFunction, tan(x**2), x)\n    False\n    >>> _is_function_class_equation(TrigonometricFunction, tan(x + 2), x)\n    True\n    >>> _is_function_class_equation(HyperbolicFunction, tanh(x) + sinh(x), x)\n    True\n    '
    if (f.is_Mul or f.is_Add):
        return all((_is_function_class_equation(func_class, arg, symbol) for arg in f.args))
    if f.is_Pow:
        if (not f.exp.has(symbol)):
            return _is_function_class_equation(func_class, f.base, symbol)
        else:
            return False
    if (not f.has(symbol)):
        return True
    if isinstance(f, func_class):
        try:
            g = Poly(f.args[0], symbol)
            return (g.degree() <= 1)
        except PolynomialError:
            return False
    else:
        return False