Oh I didn't realize you had LaTeX strings in your Symbol names. It would be more useful to use srepr() then, so that it can just be copy-pasted.
Aaron Meurer On Thu, Jul 16, 2015 at 12:33 PM, G.B. <[email protected]> wrote: > Will do. If I print the expression using str(), I get: > > > 'I_{R_2}(s) == -C_{T}*s*(-R_{1}*V_{in}(s)/(R_{1} + 1/(1/(1/(C_{T}*s + > 1/(L_{R}*s + R_{2} + 1/(C_{R}*s))) + 1/(C_{L}*s)) + 1/(L_{L}*s))) + > V_{in}(s) - (-R_{1}*V_{in}(s)/(R_{1} + 1/(1/(1/(C_{T}*s + 1/(L_{R}*s + > R_{2} + 1/(C_{R}*s))) + 1/(C_{L}*s)) + 1/(L_{L}*s))) + > V_{in}(s))/(C_{L}*s*(1/(C_{T}*s + 1/(C_{R} + L_{R} + R_{2})) + > 1/(C_{L}*s)))) - (-R_{1}*V_{in}(s)/(R_{1} + 1/(1/(1/(C_{T}*s + 1/(L_{R}*s + > R_{2} + 1/(C_{R}*s))) + 1/(C_{L}*s)) + 1/(L_{L}*s))) + > V_{in}(s))/(1/(C_{T}*s + 1/(C_{R} + L_{R} + R_{2})) + 1/(C_{L}*s))’ > > Is that usable or do I need to provide another means? Is that IPython doc > preferable (or the same in straight Python form)? > > Thanks— > Greg > > > > On Jul 14, 2015, at 18:05 , Aaron Meurer <[email protected]> wrote: > > I think there is a bug. If you take the two expressions, subtract them, > and call simplify(), you get a result that isn't 0. equals() also says they > are different. > > simplify() returning False is also a bug. > > Can you open two issues for these things? Just put some minimal code to > create the expressions in the issue (i.e., just print the expressions using > str()). > > Aaron Meurer > > On Tue, Jul 14, 2015 at 12:51 PM, G.B. <[email protected]> wrote: > >> Hey Aaron— >> >> Maybe the best way to capture an example is an IPython notebook? >> >> Let me know if this doesn’t work properly… >> >> Cheers— >> >> -- >> 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. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/sympy/456E1996-FF9C-4339-8C44-5D207523E66B%40gmail.com >> . >> For more options, visit https://groups.google.com/d/optout. >> >> >> > On Jul 13, 2015, at 10:25 , Aaron Meurer <[email protected]> wrote: >> > >> > On Sun, Jul 12, 2015 at 7:46 PM, G B <[email protected]> wrote: >> >> What would case Eq.simplify() to return False? There isn't a lot of >> >> computation time before the result. >> > >> > Can you show an example of what is doing this? >> > >> >> >> >> Also why would using together() before substituting an expression lead >> to a >> >> numerically different result? >> > >> > How different? It's possible you are changing the numerical stability >> > of the expression. Or it's possible there is a bug in together. >> > >> > Aaron Meurer >> > >> >> >> >> I have a series of equations that I've been substituting in to each >> other >> >> building up a final symbolic result. My first pass at this gave a >> result >> >> that looks reasonable (though I haven't proven it correct) when I >> convert it >> >> to a numpy function after using >> >> Eq.subs(dictionary of values for symbols).simplify().n() >> >> and plot it. >> >> >> >> When I took the last symbolic equation to be substituted and use >> >> Eq.together() on it before substituting to get a simpler result, the >> >> Eq.subs().simplify() returns False. When I manipulate it differently >> to get >> >> it to successfully lambdify, the resulting plot is different (and >> appears >> >> wrong). >> >> >> >> Thanks-- >> >> >> >> -- >> >> 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. >> >> To view this discussion on the web visit >> >> >> https://groups.google.com/d/msgid/sympy/1c324cfc-6bb3-4951-8cd7-22394a8c4bcd%40googlegroups.com >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > >> > -- >> > You received this message because you are subscribed to a topic in the >> Google Groups "sympy" group. >> > To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/sympy/niic3OG_vhs/unsubscribe. >> > To unsubscribe from this group and all its topics, 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. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/sympy/CAKgW%3D6JwOrGG84jxWe%3D0%3DsaKRmg8s%2BFE7WpRN5mSO%3D2PP-QZLg%40mail.gmail.com >> . >> > For more options, visit https://groups.google.com/d/optout. >> >> -- >> 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. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/sympy/456E1996-FF9C-4339-8C44-5D207523E66B%40gmail.com >> . >> For more options, visit https://groups.google.com/d/optout. >> >> > > -- > You received this message because you are subscribed to a topic in the > Google Groups "sympy" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/sympy/niic3OG_vhs/unsubscribe. > To unsubscribe from this group and all its topics, 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2Bg%3D9x-O9BobcD6R6Wxxb%2BBQ_OW2paF0zOxntQ8VMVqpQ%40mail.gmail.com > <https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2Bg%3D9x-O9BobcD6R6Wxxb%2BBQ_OW2paF0zOxntQ8VMVqpQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > > -- > 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/3F3344AF-661D-4612-9263-0AE306D109D4%40gmail.com > <https://groups.google.com/d/msgid/sympy/3F3344AF-661D-4612-9263-0AE306D109D4%40gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6L12ZBYTzyap4SY0GbxuxYU4DDUWP2o3P%2BJ71a8gJ%3DKmg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
