How to force the substitution since subs is not working?
I have an expression containing alpha_1
, beta_1
, gamma_1
.
They are normalized by the constraint alpha_1^2 + beta_1^2 + gamma_1^2 = 1
.
That would simplify the expression. Somehow subs
doesn't work.
After defining dkkr1
as
dkkr1 = 2*I*pi*sqrt(-c^2*gamma_1^2 - (alpha_1^2 + beta_1^2)*c^2 + v2^2)*sqrt((alpha_1^2 + beta_1^2 + gamma_1^2)*v1^2 + c^2)*beta_1/(c^2*gamma_1^2 + (alpha_1^2 + beta_1^2)*c^2 - v2^2) - 2*(-I*pi*sqrt(-c^2*gamma_1^2 - (alpha_1^2 + beta_1^2)*c^2 + v2^2)*sqrt((alpha_1^2 + beta_1^2 + gamma_1^2)*v1^2 + c^2)*alpha_1^2*c^4 - I*pi*sqrt(-c^2*gamma_1^2 - (alpha_1^2 + beta_1^2)*c^2 + v2^2)*sqrt((alpha_1^2 + beta_1^2 + gamma_1^2)*v1^2 + c^2)*c^4*gamma_1^2 + (I*pi*sqrt(-c^2*gamma_1^2 - (alpha_1^2 + beta_1^2)*c^2 + v2^2)*sqrt((alpha_1^2 + beta_1^2 + gamma_1^2)*v1^2 + c^2)*beta_1^2*v1^2 + I*pi*sqrt(-c^2*gamma_1^2 - (alpha_1^2 + beta_1^2)*c^2 + v2^2)*sqrt((alpha_1^2 + beta_1^2 + gamma_1^2)*v1^2 + c^2)*c^2)*v2^2)*Delta/(c^6*gamma_1^4 + 2*(alpha_1^2 + beta_1^2)*c^6*gamma_1^2 + (alpha_1^4 + 2*alpha_1^2*beta_1^2 + beta_1^4)*c^6 + ((alpha_1^2 + beta_1^2 + gamma_1^2)*v1^2 + c^2)*v2^4 + (c^4*gamma_1^6 + 3*(alpha_1^2 + beta_1^2)*c^4*gamma_1^4 + 3*(alpha_1^4 + 2*alpha_1^2*beta_1^2 + beta_1^4)*c^4*gamma_1^2 + (alpha_1^6 + 3*alpha_1^4*beta_1^2 + 3*alpha_1^2*beta_1^4 + beta_1^6)*c^4)*v1^2 - 2*(c^4*gamma_1^2 + (alpha_1^2 + beta_1^2)*c^4 + (c^2*gamma_1^4 + 2*(alpha_1^2 + beta_1^2)*c^2*gamma_1^2 + (alpha_1^4 + 2*alpha_1^2*beta_1^2 + beta_1^4)*c^2)*v1^2)*v2^2)
I try to substitute
dkkr1= dkkr1.subs(sqrt(1- alpha_1^2 - beta_1^2) == gamma_1)
show(dkkr1)
I am new to SageMath and would love to learn how to make this work.