Oscar,

That does seem to do what I want ... I think.
What's the difference between this and Chris Smith's answer?   I think I 
made a symbolic equation between symbols.  Didn't you make a *pythonic*  
assignment?   Then python did the right thing when using the multiplication 
operation '*' (by overloading?)       

I took things a little farther:

q,r,s = symbols('q r s')
q = x+y
r = x*y
print(q*r)
q*r
s = q*r + 1
s
s.subs(x,3)

Everything worked.     Is it the case that I made things overly complicated 
from the beginning?  I'm confused.  I don't know how Sympy works, and would 
appreciate a better description than the tutorial.

Thanks.

On Saturday, July 13, 2019 at 7:00:32 AM UTC-4, Oscar wrote:
>
> Hi Gary, 
>
> I wonder if we are overcomplicating things here. Does this do what you 
> want? 
>
> x, y = symbols('x, y') 
> a = x + y 
> b = x * y 
> print(a * b) 
>
> -- 
> Oscar 
>
> On Tue, 9 Jul 2019 at 03:11, Gary Pajer <gary...@gmail.com <javascript:>> 
> wrote: 
> > 
> > I'm sure I'm not the first person having trouble getting started.  If 
> there is a good tutorial, more detailed than the sympy docs tutorial, 
> please point me to it! 
> > 
> > I want to display the product of two expressions.  Suppose I have 
> > 
> > a, b, x, y = symbols('a b x y') 
> > ex1 = Eq(a, x + y) 
> > ex2 = Eq(b, x * y) 
> > 
> > How do I display a * b in terms of x and y? 
> > 
> > Thainks. 
> > 
> > -- 
> > 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 sy...@googlegroups.com <javascript:>. 
> > To post to this group, send email to sy...@googlegroups.com 
> <javascript:>. 
> > 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/2a6226b4-0928-4753-a691-a659a9035072%40googlegroups.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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
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/8de86548-0ff4-4848-bd8b-7de3bb5ba5ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to