1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Comparing expressions in SymPy

Discussão em 'Python' iniciado por Stack, Setembro 13, 2025.

  1. Stack

    Stack Membro Participativo

    Is there a way to check if two expressions are mathematically equal?

    I expected tg(x)cos(x) == sin(x) to output True, but it outputs False. Is there a way to make such comparisons with SymPy?

    Another example is (a+b)**2 == a**2 + 2*a*b + b**2, which surprisingly also outputs False.

    I found some similar questions, but none covered this exact problem.

    Continue reading...

Compartilhe esta Página