def test_collect_4():
 (a, b, c, x) = symbols('a,b,c,x')
 assert (collect(((a * (x ** c)) + (b * (x ** c))), (x ** c)) == ((x ** c) * (a + b)))
 assert (collect(((a * (x ** (2 * c))) + (b * (x ** (2 * c)))), (x ** c)) == ((x ** (2 * c)) * (a + b)))

def test_collect_4 ( ) : ( a , b , c , x ) = symbols ( 'a,b,c,x' ) assert ( collect ( ( ( a * ( x ** c ) ) + ( b * ( x ** c ) ) ) , ( x ** c ) ) == ( ( x ** c ) * ( a + b ) ) ) assert ( collect ( ( ( a * ( x ** ( 2 * c ) ) ) + ( b * ( x ** ( 2 * c ) ) ) ) , ( x ** c ) ) == ( ( x ** ( 2 * c ) ) * ( a + b ) ) )
collect with respect to a power .