This is a simple question but somehow after trying Delete
, and Drop
I still cannot get what I want. Given the following equation,
eq = (-0.818158 +
0.725806 Log[0.683526 λ[1., 2.]] λ[1., 2.] +
0.774194 Log[0.744189 λ[2., 1.]] λ[2., 1.] +
0.774194 Log[0.744189 λ[2., 3.]] λ[2.,
3.])/(0.951613 - 0.725806 (0.0444444 + λ[1., 2.]) -
0.774194 (0.0208333 + λ[2., 1.] + λ[2., 3.]));
I want to drop from this equation all the terms that involve Lambda
. (A term
is an element between two arithmetic signs like +
and -
.) because the Lambda
is equal to zero and taking Log[0]
is infinite. So, I like to get rid of Infinity
and have a real number as a solution.
Generally speaking, given a list of very large equations, I like to drop Lambda terms with zero
from all the equations.
I think it is easier to drop all the terms that generate infinity.
eq/.s_Plus:>Select[s,FreeQ[λ]]
? $\endgroup$-0.905818
is the result I obtain from the equation by manually dropping the infinity terms. Lukas's result is-0.859759
. $\endgroup$