Question: How to simplify factors that are square roots into one single variable?

In a calculation, I obtained the following expression from Maple.

expr1:=A*sqrt(-m*(-V__0 + E))/sqrt(m*E)

A*(-m*(-V__0+E))^(1/2)/(m*E)^(1/2)

(1)

The first question I have is why the "m's don't cancel."

Next, consider the expression

expr2:=exp(sqrt(2)*sqrt(m)*sqrt(-V__0 + E)*l*I/`ℏ`)

exp(I*2^(1/2)*m^(1/2)*(-V__0+E)^(1/2)*l/`ℏ`)

(2)

simplify(expr2,[E-V__0=y])

exp(I*2^(1/2)*m^(1/2)*y^(1/2)*l/`ℏ`)

(3)

simplify(expr2,[2*m=y])

exp(I*y^(1/2)*(-V__0+E)^(1/2)*l/`ℏ`)

(4)

Why doesn't the simplification below work?

simplify(expr2,[2*m*(E-V__0)=y])

exp(I*2^(1/2)*m^(1/2)*(-V__0+E)^(1/2)*l/`ℏ`)

(5)

I also tried with other commands

eval(expr2,2*m=y)

exp(I*2^(1/2)*m^(1/2)*(-V__0+E)^(1/2)*l/`ℏ`)

(6)

eval(expr2,E-V__0=y)

exp(I*2^(1/2)*m^(1/2)*y^(1/2)*l/`ℏ`)

(7)

eval(expr2,2*m*(E-V__0)=y)

exp(I*2^(1/2)*m^(1/2)*(-V__0+E)^(1/2)*l/`ℏ`)

(8)

algsubs(2*m=y,expr2)

exp(I*y^(1/2)*(-V__0+E)^(1/2)*l/`ℏ`)

(9)

algsubs(E-V__0=y,expr2)

exp(I*2^(1/2)*m^(1/2)*y^(1/2)*l/`ℏ`)

(10)

algsubs(2*m*(E-V__0)=y,expr2)

exp(I*2^(1/2)*m^(1/2)*(-V__0+E)^(1/2)*l/`ℏ`)

(11)
 

NULL

In reality, I would like to the entirety of sqrt(2m(E-V__0)/hbar) a variable by the name of s.

Download simplify_roots.mw

Please Wait...