ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 06 Dec 2021 00:36:56 +0100Manipulate dummy variable after solving trighttps://ask.sagemath.org/question/60108/manipulate-dummy-variable-after-solving-trig/Hi!
This might be somewhat basic, but is there a way to directly reference the dummy variable that pops up, when solving trigonometric functions?
sy(t)=sin(t)/2+7*sin(t/3)/2
sols=solve(sy(t)==0,t, to_poly_solve='force')
sols[0]
returns:
t == 3*pi + 6*pi*z27541
This dummy variable obviously changes every time the command is run, so there is no way of directly referencing it without changing the reference every time. Obviously this doesn't work:
sols[0](z=0)
The closest I have come, is just blindly referencing the variable which works if there are no other variables in the right hand side, like this:
sols[0].rhs()(0)
but this gives the obnoxious error message, that "*Substitution using function-call syntax and unnamed arguments is deprecated (...)*"
Is there a way to cleanly tell sage to evaluate an expression, when all z variables are 0 or 1 etc?jakuplMon, 06 Dec 2021 00:36:56 +0100https://ask.sagemath.org/question/60108/