Integral(v,t).doit() differs from integrate(v,t)

45 views
Skip to first unread message

hercidav

unread,
Feb 8, 2016, 11:38:37 AM2/8/16
to sympy
Hi,

I want to lambdify an integral including vector (sympy.Matrix) and I am expecting to get a vector as well. I used the doit() function on Integral, however the results are somewhat strange. Below is a simple example in the sympy online shell (I hope it works just like that).
Basically, having a vector v = (a*t,b,c), I do integrate(v,t), which gives me (a*t**2/2, b*t,c*t), an expected result. Doing Integral(v,t).doit() gives a*t**4/3+b*t**2/2+c*t... Any suggestions? Do I have some wrong assumptions?
Thanks a lot in advance,

David

http://live.sympy.org/?evaluate=a%2Cb%2Cc%3Dsymbols%28%27a%20b%20c%27%29%0A%23--%0Av%3DMatrix%28[a%2Cb%2Cc]%29%0A%23--%0Avt%3DMatrix%28[a*t%2Cb%2Cc]%29%0A%23--%0Aintegrate%28vt%2Ct%29%0A%23--%0AIntegral%28vt%2Ct%29.doit%28%29%0A%23--%0A

Aaron Meurer

unread,
Feb 9, 2016, 2:57:27 PM2/9/16
to sy...@googlegroups.com
That's definitely a bug. The two should always give the same answer. Can you open an issue for it?

Aaron Meurer

--
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+un...@googlegroups.com.
To post to this group, send email to sy...@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/43e7ee85-ba53-49e3-80f9-730469ca77ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

hercidav

unread,
Feb 11, 2016, 4:47:04 AM2/11/16
to sympy
Hi Aaron,

thanks a lot for your answer. I have opened the issue:
https://github.com/sympy/sympy/issues/10567

David Hercik
Reply all
Reply to author
Forward
0 new messages