Yep: >>> (sinh(x)).replace(sinh, lambda arg: exp(arg)/2)exp(x)/2
On Thursday, October 31, 2013 6:14:59 PM UTC+4, Aaron Meurer wrote: > > Use replace to replace functions. > > Aaron Meurer > > On Oct 31, 2013, at 6:48 AM, Boris Kheyfets <kheyf...@gmail.com<javascript:>> > wrote: > > I have a large argument, so I'd rather neglect exp(-x) in the definition > of sinh. How do I substitute sinh by 1/2*exp ? > > I tried .subs({sinh: 0.5*exp}) and .subs({2 * sinh: exp}) but it doesn't > work: TypeError: unsupported operand type(s) for *: 'int' and > 'FunctionClass'. > > -- > 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 sympy+un...@googlegroups.com <javascript:>. > To post to this group, send email to sy...@googlegroups.com <javascript:>. > Visit this group at http://groups.google.com/group/sympy. > For more options, visit https://groups.google.com/groups/opt_out. > > -- 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 sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.