Status: New
Owner: ----
Labels: Type-Defect Priority-Medium IPython

New issue 3824 by stephan....@googlemail.com: substitution with a term containing a sqrt, sin and cos fails
http://code.google.com/p/sympy/issues/detail?id=3824

Hello,

for the following term the substitution is correct:

test = 2* sp.sqrt(2)*sp.cos(sp.symbols("a"))*sp.sin(sp.symbols("a"))

test = test.subs({2*sp.sin(sp.symbols("a"))*sp.cos(sp.symbols("a")): sp.sin(2*sp.symbols("a"))})

in my IPython notebook I get for test:
sqrt(2)*sin(2a)
___________________________________________________________________

the subs method has problems in the following case:

test2 = -2* sp.sqrt(2)*sp.cos(sp.symbols("a"))*sp.sin(sp.symbols("a"))
test2 = test2.subs({2*sp.sin(sp.symbols("a"))*sp.cos(sp.symbols("a")): sp.sin(2*sp.symbols("a"))})

in my IPython Notebook I get for test2:

test2 = -sin(2a)

The question is: where is the sp.sqrt(2)
___________________________________________________________________

I tested this in python 2.7 and in my Ipython notebook. Both running sympy 0.7.2




--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy-issues+unsubscr...@googlegroups.com.
To post to this group, send email to sympy-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to