Question: Has Select Quaestion

I trying to simplify expressions for lines so no higher order terms. factor and op seperate out what I need but how do I select the one with the variables in this case x,y. I cant depent on this always been the last one returned from the op command.

restart

 

vars=[x,y]

vars = [x, y]

(1)

k:=17

17

(2)

expr:=-2*sqrt(118)*(((-4*x + y + 51/32)*sqrt(k) + (k*x)/4 - (51*y)/4 + 153/32)*sqrt(-4012 + 1003*sqrt(k)) + ((x + 4*y)*sqrt(k) - (85*x)/4 - (17*y)/4)*sqrt(4012 + 1003*sqrt(k)))*k^(1/4)/(17051*(-1 + sqrt(k)))

-2*118^(1/2)*(((-4*x+y+51/32)*17^(1/2)+(17/4)*x-(51/4)*y+153/32)*(-4012+1003*17^(1/2))^(1/2)+((x+4*y)*17^(1/2)-(85/4)*x-(17/4)*y)*(4012+1003*17^(1/2))^(1/2))*17^(1/4)/(-17051+17051*17^(1/2))

(3)

indets(expr)

{x, y}

(4)

factor(expr)

(1/64192)*(-4012+1003*17^(1/2))^(1/2)*118^(1/2)*17^(1/4)*(17^(1/2)+5)*(40*x-24*y-3)

(5)

op(factor(expr))

1/64192, (-4012+1003*17^(1/2))^(1/2), 118^(1/2), 17^(1/4), 17^(1/2)+5, 40*x-24*y-3

(6)

select(has,vars, factor(expr))

select(has,vars, op(factor(expr)))

Error, invalid input: has expects 2 arguments, but received 7

 
 

 

Download 2024-09-11_Has_Select_Question.mw

Please Wait...