It would be much nicer if you could just paste the str() of the expression. That way we can easily copy and paste if and play around with it ourselves.
Aaron Meurer On Aug 15, 2013, at 6:16 AM, Boris Kheyfets <[email protected]> wrote: Images were working when I posted. Any way the latex code shown instead of images is correct. Here I attach a MathML html file with the original post anyway. On Wednesday, August 14, 2013 4:40:29 PM UTC+4, Boris Kheyfets wrote: > > Hello SymPy users and devs, > > I have a large expressions with > > - [image: $\log^2(\frac{R}{R_1})$] split into [image: $\log^2(R) - 2 > \log(R) \log(R_1) + \log^2 (R_1)$], and > - [image: $\log^3(\frac{R}{R_1})$] split into [image: $\left [ \log(R) > - \log(R_1)\right ]^3 = \ldots$] > > I want to combine logs (so to make it more readable). > > I think I need to factor the thing first, but factor fails and powsimpmakes > it even worse. > > Here's an image of the of the expression: > [image: $$\Gamma_{R}^{2} R^{4} R_{1}^{2} + 4 \Gamma_{R}^{2} R^{2} > R_{1}^{4} \log^{3}{\left (R \right )} - 12 \Gamma_{R}^{2} R^{2} R_{1}^{4} > \log^{2}{\left (R \right )} \log{\left (R_{1} \right )} - 8 \Gamma_{R}^{2} > R^{2} R_{1}^{4} \log^{2}{\left (R \right )} + 12 \Gamma_{R}^{2} R^{2} > R_{1}^{4} \log{\left (R \right )} \log^{2}{\left (R_{1} \right )} + 16 > \Gamma_{R}^{2} R^{2} R_{1}^{4} \log{\left (R \right )} \log{\left (R_{1} > \right )} + 2 \Gamma_{R}^{2} R^{2} R_{1}^{4} \log{\left (R \right )} - 4 > \Gamma_{R}^{2} R^{2} R_{1}^{4} \log^{3}{\left (R_{1} \right )} - 8 > \Gamma_{R}^{2} R^{2} R_{1}^{4} \log^{2}{\left (R_{1} \right )} - 2 > \Gamma_{R}^{2} R^{2} R_{1}^{4} \log{\left (R_{1} \right )} - \Gamma_{R}^{2} > R^{2} R_{1}^{4} - 2 \Gamma_{R}^{2} R_{1}^{6} \log^{2}{\left (R \right )} + > 4 \Gamma_{R}^{2} R_{1}^{6} \log{\left (R \right )} \log{\left (R_{1} \right > )} - 2 \Gamma_{R}^{2} R_{1}^{6} \log^{2}{\left (R_{1} \right )} + 4 > \Gamma_{R} P R^{4} R_{1}^{2} \log{\left (R \right )} - 4 \Gamma_{R} P R^{4} > R_{1}^{2} \log{\left (R_{1} \right )} + 2 \Gamma_{R} P R^{4} R_{1}^{2} - 8 > \Gamma_{R} P R^{2} R_{1}^{4} \log^{3}{\left (R \right )} + 24 \Gamma_{R} P > R^{2} R_{1}^{4} \log^{2}{\left (R \right )} \log{\left (R_{1} \right )} - 8 > \Gamma_{R} P R^{2} R_{1}^{4} \log^{2}{\left (R \right )} - 24 \Gamma_{R} P > R^{2} R_{1}^{4} \log{\left (R \right )} \log^{2}{\left (R_{1} \right )} + > 16 \Gamma_{R} P R^{2} R_{1}^{4} \log{\left (R \right )} \log{\left (R_{1} > \right )} + 8 \Gamma_{R} P R^{2} R_{1}^{4} \log^{3}{\left (R_{1} \right )} > - 8 \Gamma_{R} P R^{2} R_{1}^{4} \log^{2}{\left (R_{1} \right )} - 2 > \Gamma_{R} P R^{2} R_{1}^{4} + 4 \Gamma_{R} P R^{2} R_{1}^{2} > \log^{2}{\left (R \right )} - 8 \Gamma_{R} P R^{2} R_{1}^{2} \log{\left (R > \right )} \log{\left (R_{1} \right )} - 4 \Gamma_{R} P R^{2} R_{1}^{2} > \log{\left (R \right )} + 4 \Gamma_{R} P R^{2} R_{1}^{2} \log^{2}{\left > (R_{1} \right )} + 4 \Gamma_{R} P R^{2} R_{1}^{2} \log{\left (R_{1} \right > )} - 4 \Gamma_{R} P R_{1}^{4} \log{\left (R \right )} + 4 \Gamma_{R} P > R_{1}^{4} \log{\left (R_{1} \right )} + 8 P^{2} R^{4} R_{1}^{2} > \log^{2}{\left (R \right )} - 16 P^{2} R^{4} R_{1}^{2} \log{\left (R \right > )} \log{\left (R_{1} \right )} + 8 P^{2} R^{4} R_{1}^{2} \log^{2}{\left > (R_{1} \right )} + 2 P^{2} R^{4} R_{1}^{2} - 2 P^{2} R^{2} R_{1}^{4} - 8 > P^{2} R^{2} R_{1}^{2} \log^{2}{\left (R \right )} + 16 P^{2} R^{2} > R_{1}^{2} \log{\left (R \right )} \log{\left (R_{1} \right )} - 8 P^{2} > R^{2} R_{1}^{2} \log{\left (R \right )} - 8 P^{2} R^{2} R_{1}^{2} > \log^{2}{\left (R_{1} \right )} + 8 P^{2} R^{2} R_{1}^{2} \log{\left (R_{1} > \right )} + 2 P^{2} R^{2} - 2 P^{2} R_{1}^{2}$$] > > My question: is there a way to combine logs in this case? > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out. <inlined.html> -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.
