Question: Factor (expr,subexpr)

I have a big expression with multiple terms. The expression is kind of :

expr = a*ln(u) + b*ln(u) + a*ln(v)+b*ln(v)

I want to factor ln(u) and ln(v) to get (a+b)*ln(u) + (a+b)*ln(v)

I tried factor(expr,ln(u)) but I get the error :
Error, (in factor) 2nd argument, ln(2*da+(4*da^2+4*d^2-4*da*Sigma[a]+Sigma[a]^2+Delta[b]^2)^(1/2)-Sigma[a]), is not a valid algebraic extension.

I tried without Delta[b] and Sigma[a] : deltab and sigmaa but it didn't work either.

Do you have an idea how to factor the many ln ?


Please Wait...