real_part of an equation [closed]
Hi
how to get 'A^2 -B^2' in the last show() ?
a = var('a')
b = var('b')
A = var('A')
B = var('B')
assume(a,'real')
assume(b,'real')
assume(A,'real')
assume(A,'real')
equ=sqrt(a+b*I)==A + B*I
equ1=((equ.lhs()^2)==(equ.rhs()^2).expand())
show(equ1)
show(equ1.lhs().real_part().expand())
show(equ1.rhs().real_part().expand())
Sorry I made a mistake ! :Twice assume(A,'real') but no assume(B,'real') !!!