Searching for an expression inside a bigger expression

I'm writing a function for Chebyshev Quadrature. The only thing I don't know is how to do the following:
there are 2 different types of Chebyshev quadrature depending on whether (1-x)^(1/2) is in the numerator or in the denominator. Let's say my input is following function in symbols:
f = ((1-x^2)/(1+x^2))*sqrt(1-x^2);
How can I write a function which detects whether sqrt(-x^2) is in the numerator or in the denominator?
Thanks in advance

Answers (0)

Categories

Asked:

on 28 Apr 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!