rewrite function to rewrite expression in terms of other functions.
Rewrites expression containing applications of functions of one kind in terms of functions of different kind. For example you can rewrite trigonometric functions as complex exponentials or combinatorial functions as gamma function.
This function can do something like following:
In : atan(x).rewrite(asin) Out: (-asin(1/sqrt(x**2 + 1)) + pi/2)*sqrt(x**2)/x In : atan(x).rewrite(asec) Out: sqrt(x**2)*asec(sqrt(x**2 + 1))/x
For trigonometric function, here is a related question: How to express trigonometric equation in terms of of given trigonometric function?
P.S.: Sympy actually writing these rewrite rules into the definition of the function.