Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

convert .solve output to function

I have a function of two variables and would like to solve for one of the variables and make that a function, eg

t=var('t',domain='real')
z,w=var('z,w')
p(z,w)=5*z^2*w + 3*z*w +2*z
solns=p(e^(I*t),w).solve(w)
solns

and then somehow have the output of that:

[w == -2/(5*e^(I*t) + 3)]

become a function

f(t)=-2/(5*e^(I*t)+3)

Does anyone know a good way to do this? The main issue I'm having is the w== part.