Question: substitute into function

 

Hello,

 

 I have a function that on two variables y1,y2. I know that the different variables, y2,y3 are orthogonal, i.e. y2*y3=0, hence I want to substitute this information into the function, but it does only work if only numbers apear in the expression.

#A minimal example with numbers as coefficients and parameters as coefficents

v(y2,y3):=y2^(2)+ y2*2*y3+y3^(2);  # numbers
u(y2,y3):=y2^(2)+ y2*h*y3+y3^(2);  # parameters

simplify(subs({y2*y3 = 0}, v(y2, y3)));  # here I obtain a simplified result

simplify(subs({y2*y3 = 0}, u(y2, y3)));  # here not!

 

I need to simplify a "big" term and I know that the products of different variables will vanish. I would like to apply this substitution in an expression containing parameters.

What could I do?

Thanks,

Daniel

Please Wait...