Sympy - Comparing expressions
<p>Is there a way to check if two expressions are mathematically equal? I expected
<code>tg(x)cos(x) == sin(x)</code> to output <code>True</code>, but it outputs <code>False</code>. Is there a way to make such comparisons with sympy? Another example is 
<code>(a+b)**2 == a**2 + 2*a*b + b**2</code> which surprisingly also outputs <code>False</code>.</p>

<p>I found some similar questions, but none covered this exact problem.</p>