Question: How do I preform a particular substitution?


I am trying to do a substitution as shown in the attached document. I know variants of this question have been asked before but dont quiet get what to do. It is problem with algsubs and how it handles denominators I think. Can get substiturion to work for simple fractions but more complicated ones fail. Would appreciate any guidance here.

restart 

``

``

CR := proc (a, b, c, d) options operator, arrow; (a-c)*(b-d)/((a-d)*(b-c)) end proc

proc (a, b, c, d) options operator, arrow; (a-c)*(b-d)/((a-d)*(b-c)) end proc

(1)

eqns := CR(a, b, c, d)

(a-c)*(b-d)/((a-d)*(b-c))

(2)

e1 := CR(b, a, c, d)

(b-c)*(a-d)/((b-d)*(a-c))

(3)

simplify(e1, {(a-c)*(b-d)/((a-d)*(b-c)) = lambda})

(a*b-a*c-b*d+c*d)/(a*b-a*d-b*c+c*d)

(4)

e1

(b-c)*(a-d)/((b-d)*(a-c))

(5)

``

lambda

lambda

(6)

applyrule((a-c)*(b-d)/((a-d)*(b-c)) = lambda, e1)

(b-c)*(a-d)/((b-d)*(a-c))

(7)

alias(lambda = (a-c)*(b-d)/((a-d)*(b-c)))

lambda

(8)

e1

(b-c)*(a-d)/((b-d)*(a-c))

(9)

``

NULL

``

f := a/b

a/b

(10)

``

f := algsubs(a/b = alpha, f)

alpha

(11)

f

alpha

(12)

algsubs((a-c)*(b-d)/((a-d)*(b-c)) = lambda, e1)

Error, (in algsubs) cannot compute degree of pattern in a

 

``

 

Download UHG5_substitution.mw

Please Wait...