changed if function to Max function to return the output
changed if function to Max function to return the output

used Max function instead of if function because it requires less line of code also it is easier to read and test the code
kaushik94/sympy,kaushik94/sympy,kaushik94/sympy