Thanks for trying --- this function needs some polishing, I'll try to
have a look at it if you don't manage to fix it yourself.
ONdrej
Right. Do you have some ideas how to fix it so that it works with
"term1 + term2"?
Ondrej
Very cool! Thanks a lot for sharing it. Let's implement it in sympy.
Ondrej
That's a good question. You need to know the argument of tan(x). If
it's just x, then:
I would use:
e.subs(tan(x), sin(x)/cos(x))
I think we should maybe enhance our .match() or introduce .find() so
that one can do e.find(tan(Wild("a"))) and it would return tan(x**2)
or whatever is in the expression. Then you can use .subs() to
substitute it.
Ondrej
Awesome, thanks for the work. If you had time to get it into a shape
and posted a patch, that'd help me a lot.
Thanks,
Ondrej