First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 14 years ago

avi9526 gravatar image

Additional conditions for expression

Hi (sorry for bad eng.), i have next code

reset()
var('K1, T1, T2')
var('p')
# Transient function W(p)
W = K1 * p / ((T1 * p - 1) * (T2 * p - 1))
# Amplitude-phase-frequency characteristic W(jw)
Wa(omega) = W(p = I * omega)

Re(omega) = Wa(omega).real()
Im(omega) = Wa(omega).imag()

print(Re)

but last string gives loooooong result, because sagemath don't knows that K1, T1, T2 and omega are real, how to "tell" that to sagemath

click to hide/show revision 2
No.2 Revision

Additional conditions for expression

Hi (sorry for bad eng.), i have next code

reset()
var('K1, T1, T2')
var('p')
# Transient function W(p)
W = K1 * p / ((T1 * p - 1) * (T2 * p - 1))
# Amplitude-phase-frequency characteristic W(jw)
Wa(omega) = W(p = I * omega)

Re(omega) = Wa(omega).real()
Im(omega) = Wa(omega).imag()

print(Re)

but last string gives loooooong result, because sagemath don't knows that K1, T1, T2 and omega are real, how to "tell" that to sagemathsagemath ?

click to hide/show revision 3
retagged

updated 13 years ago

Kelvin Li gravatar image

Additional conditions for expression

Hi (sorry for bad eng.), i have next code

reset()
var('K1, T1, T2')
var('p')
# Transient function W(p)
W = K1 * p / ((T1 * p - 1) * (T2 * p - 1))
# Amplitude-phase-frequency characteristic W(jw)
Wa(omega) = W(p = I * omega)

Re(omega) = Wa(omega).real()
Im(omega) = Wa(omega).imag()

print(Re)

but last string gives loooooong result, because sagemath don't knows that K1, T1, T2 and omega are real, how to "tell" that to sagemath ?