Hey, I was trying to represent the following expression in more compact form:
expr = a*l**2 + 2*a*l + a + b*conjugate(l)**2 - 2*b*conjugate(l) + b
The above expr can be represented as:
expr = a*(l+1)**2 + b*(conjugate(l)-1)**2
Is there any SymPy function to perform such type of conversions? I am aware of combsimp but it is not able to do this conversion.
Thanks