| 1 | initial version |
Try using assume (type assume? at the console or look through the Sage documentation):
sage: var('K1, T1, T2, p, omega')
(K1, T1, T2, p, omega)
sage: assume(K1, 'real')
sage: assume(T1, 'real')
sage: assume(T2, 'real')
sage: W = K1 * p / ((T1 * p - 1) * (T2 * p - 1))
sage: Wa = W(p = I * omega)
sage: Re = Wa.real_part().full_simplify()
sage: Im = Wa.imag_part().full_simplify()
sage:
sage: print(Re)
-(K1*T1*omega^2 + K1*T2*omega^2)/(T1^2*omega^2 + (T1^2*omega^4 + omega^2)*T2^2 + 1)
| 2 | No.2 Revision |
Try using assume (type assume? at the console or look through the Sage documentation):
sage: var('K1, T1, T2, p, omega')
(K1, T1, T2, p, omega)
sage: assume(K1, 'real')
sage: assume(T1, 'real')
sage: assume(T2, 'real')
You can also try simplifying your expression, even without the assumptions on K1, T1, and T2:
sage: W = K1 * p / ((T1 * p - 1) * (T2 * p - 1))
sage: Wa = W(p = I * omega)
sage: Re = Wa.real_part().full_simplify()
sage: Im = Wa.imag_part().full_simplify()
sage:
sage: print(Re)
-(K1*T1*omega^2 + K1*T2*omega^2)/(T1^2*omega^2 + (T1^2*omega^4 + omega^2)*T2^2 + 1)
| 3 | No.3 Revision |
Try using assume (type assume? at the console or look through the Sage documentation):
sage: var('K1, T1, T2, p, omega')
(K1, T1, T2, p, omega)
sage: assume(K1, 'real')
sage: assume(T1, 'real')
sage: assume(T2, 'real')
You can also try simplifying your expression, even without the assumptions on K1, T1, and T2:
sage: W = K1 * p / ((T1 * p - 1) * (T2 * p - 1))
sage: Wa = W(p = I * omega)
sage: Re = Wa.real_part().full_simplify()
sage: Im = Wa.imag_part().full_simplify()
sage:
sage: print(Re)
-(K1*T1*omega^2 + K1*T2*omega^2)/(T1^2*omega^2 + (T1^2*omega^4 + omega^2)*T2^2 + 1)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.