Python | sympy.logcombine() method Last Updated : 25 Jun, 2019 Comments Improve Suggest changes Like Article Like Report With the help of sympy.logcombine(), we can combine the log terms in the mathematical expression by using the following properties that are listed below. Properties : 1) log(x*y)=log(x)+log(y) 2) log(x**n)=nlog(x) Syntax : sympy.logcombine() Return : Return the simplified mathematical expression. Example #1 : In this example we can see that by using sympy.logcombine(), we are able to combine the log terms in mathematical expression. Python3 1=1 # import sympy from sympy import * x, y, z = symbols('x y z', positive = True) gfg_exp = log(x) + log(y) # Using sympy.logcombine() method gfg_exp = logcombine(gfg_exp) print(gfg_exp) Output : log(x*y) Example #2 : Python3 1=1 # import sympy from sympy import * x, y, z = symbols('x y z', positive = True) gfg_exp = 5 * log(x) # Using sympy.logcombine() method gfg_exp = logcombine(gfg_exp) print(gfg_exp) Output : log(x**5) Comment More infoAdvertise with us Next Article Python | sympy.logcombine() method J jitender_1998 Follow Improve Article Tags : Python SymPy Practice Tags : python Similar Reads Python | sympy.combsimp() method With the help of sympy.combsimp() method, we can simplify combinatorial expressions. Syntax: combsimp(expression) Parameter: expression - It is combinatorial expression which needs to be simplified. Returns: Returns a simplified mathematical expression corresponding to the input. Example #1: Python3 1 min read Python | sympy.compare() method With the help of sympy.compare() method, we can compare the variables and it will return 3 values i.e -1 for smaller, 0 for equal and 1 for greater by using sympy.compare() method. Syntax : sympy.compare() Return : Return the value of comparison i.e -1, 0, 1. Example #1 : In this example we can see 1 min read Python | sympy.count() method Using the count() method in the sympy module, we can count the number of variables used in the mathematical function. count() method returns the number of variables used in the mathematical function. Syntax : sympy.count(x) Return : the count of variables. Code #1: With the help of the below example 1 min read Python | sympy.find() method Using the find() method in sympy module, we can find the mathematical function's subexpression (if it exists). find() method returns the subexpression in the mathematical function. Syntax : sympy.find(x) Return : returns subexpression Code #1: With the help of the below examples, we can clearly unde 1 min read Python | sympy.collect() method With the help of sympy.collect() method, we are able to collect the mathematical expressions having same power. Syntax : sympy.collect() Return : Return mathematical expression having same powers. Example #1 : In this example, we can see that by using sympy.collect() method, all the same powers of v 1 min read Like