so basically if we encounter a trigonometric extension i'll create a new variable and perform required functions on the same or should i store "f "and finally replace "f" with stored variable ?