[Python] Incorrect PieceWise result of integration in Sympy

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

  1. Stack

    Stack Membro Participativo

    Result of integrating a function

    x,z = symbols('x z', real=True); x,z
    px,pz = symbols('p_x p_z'); px,pz
    xxe = exp( pz*z + px*x ); xxe
    xxe.integrate(z)


    in second case of PieceWise doesn't include the multiplier ( exp(px*x) )

    [​IMG]

    In the first case, PieceWise contains it; in the second, it does not. Why?

    Continue reading...

Compartilhe esta Página