1 | initial version |
There is no such function, because they're not equal. Perhaps the second expression should be x^2-2x+1+C
...
What have you tried? Here are two options:
sage: var('C')
sage: expand(((x-1)^2+C) - (x^2-2*x+1+C))
0
sage: bool(expand((x-1)^2+C) == expand(x^2-2*x+1+C))
True