1 | initial version |
In Sage, you can specify the domains of the variables when you declare them. Your example becomes then
sage: x, y, t = var('x y t', domain='real')
sage: nu = var('nu', domain='complex')
sage: assumptions()
[x is real, y is real, t is real, nu is complex]
sage: s = exp(-(x+I*y)*sinh(t/(1-t)) - nu * t/(1-t)) * 1/(1-t)
sage: s.real_part()
-cos(-y*sinh(-t/(t - 1)) + t*imag_part(nu)/(t - 1))*e^(-x*sinh(-t/(t - 1)) + t*real_part(nu)/(t - 1))/(t - 1)
sage: s.imag_part()
-e^(-x*sinh(-t/(t - 1)) + t*real_part(nu)/(t - 1))*sin(-y*sinh(-t/(t - 1)) + t*imag_part(nu)/(t - 1))/(t - 1)