So in my ever growing quest to work with sympy, I have expressions like:

y = 2*(x*sin(x) - sin(x) + cos(x))/cos(x)**2

with x values like pi/6

How do I substitute x into y without having evaluate automatically happen.

i.e. I would like to be able to do something like:

y.xreplace({x: pi/6}) 
>>> 2*((pi/6)*sin(pi/6) - sin(pi/6) + cos(pi/6))/cos(pi/6)**2


It doesn't need to be with xreplace, that's just what I've used here for 
explaining my goal. 

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to