On Tue, Jul 10, 2012 at 12:39 PM, Lewis <lewis...@gmail.com> wrote: > Hi I'm trying to integrate a function that is the derivative of > another function, but I get a long train of errors. The error is > really long but ends up with "raise CoercionFailed("expected Number > object, got %s" % a) > CoercionFailed: expected Number object, got +inf" > > My code: > > from sympy import symbols, Symbol, ln, diff, exp, integrate > > y = Symbol('y') > def prob(b_y,y1,y2,p1,p2): > v1=b_y*(y1-p1) > v2=b_y*(y2-p2) > return exp(v1)/((exp(v1)+exp(v2))) > > print integrate(-y*diff(prob(.05,80.,y,5,2),y),(y,80.,85))
I get >>> print integrate(-y*diff(prob(.05,80.,y,5,2),y),(y,80.,85)) Integral(1.92373330245161*y*exp(0.05*y)/(0.90483741803596*exp(0.05*y) + 42.52108 20000628)**2, (y, 80.0, 85)) (see http://tinyurl.com/7oqpu7v or google "sympy bleeding edge") /c -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.