Question: Change of variable in expression

I have some difficulties in my little example:

K:=(Itr*sin(a+b)2-Itrsin(a-b)2)/(Itr*sin(a+b)2+Itrsin(a-b)2)+2*Iex

... after few transformations ...

K:=sin(2a)sin(2b)/(sin(a)2cos(b)2+cos(a)2sin(b)2+Iex/Itr)

also we have:

r:=Iex/Itr

d:=1+2*r

How can I convert Iex/Itr to r? (and than 1+2*r to d)

subs generate something wierd, algsubs gives error:

>algsubs(Iex/Itr=r,K)

Error, (in algsubs) no variables appearing rationally in pattern

and other cool functions don't give any result.

Why? Why? Give me good advice, please

Please Wait...