Given Eq(L, R) where L and R are the left and right hand sides of the 
equation, try: `Eq(*list(reversed((L - R).expand().as_indepedent(foo, 
as_Add=True))))` where foo is the variable of interest to get the new 
equation.

On Tuesday, April 25, 2017 at 2:35:10 PM UTC-5, Jonathan Essen wrote:
>
> I am attempting to use sympy to generate an implicit scheme for the heat 
> equation. With the Crank-Nicolson time discretization I have equation 1 
> (attached).
>
> Is there any way to isolate all occurrences of $\rho^{n+1}$ (along with 
> its derivatves) to the lefthand side, as in equation 2 (attached).
>
> I would be very interested to know! Apparently it has something to do with 
> the collect function.
>
> Best,
> Jonathan
>

-- 
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 https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/213539f4-5e94-44c2-8033-5554160c3b19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to