Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

2D integrate fails.

Hi Guys: I have a function as bellow: sage: h_1_1_1 0.500000000000000e^(-1/2p1^2 - 1/2p2^2)/((abs(p1 + p2 + 1)^3 + 1)pi) I need to performa an integrate as bellow: h_1_1_1.integrate((p1, -20, 20)).integrate((p2, -20, 20)) Got followings: 0.159154943092integrate(integrate(e^(-1/2p1^2 - 1/2*p2^2)/(abs(p1 + p2 + 1)^3 + 1), p1, -20, 20), p2, -20, 20) Then i need to know the value, using following N(_) Then got errors: . 199 # We only return the result. --> 200 return numerical_integral(f, a, b)[0] 201 202 def _tderivative_(self, f, x, a, b, diff_param=None):

/Volumes/sage-5.9-OSX-64bit-10.7-x86_64-Darwin/Sage-5.9-OSX-64bit-10.7.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/gsl/integration.so in sage.gsl.integration.numerical_integral (sage/gsl/integration.c:1802)()

ValueError: Integrand has wrong number of parameters

click to hide/show revision 2
No.2 Revision

2D integrate fails.

Hi Guys: I have a function as bellow: bellow:

sage: h_1_1_1
0.500000000000000e^(-1/2p1^2 0.500000000000000*e^(-1/2*p1^2 - 1/2p2^2)/((abs(p1 1/2*p2^2)/((abs(p1 + p2 + 1)^3 + 1)pi)
   1)*pi)

I need to performa an integrate as bellow: bellow:

h_1_1_1.integrate((p1, -20, 20)).integrate((p2, -20, 20))
 

Got followings: 0.159154943092integrate(integrate(e^(-1/2p1^2 followings:

0.159154943092*integrate(integrate(e^(-1/2*p1^2 - 1/2*p2^2)/(abs(p1 + p2 + 1)^3 + 1), p1, -20, 20), p2, -20, 20)
 

Then i need to know the value, using following

N(_)
 

Then got errors: . .

    199         # We only return the result.
--> 200         return numerical_integral(f, a, b)[0]
    201 
    202     def _tderivative_(self, f, x, a, b, diff_param=None):

diff_param=None):

/Volumes/sage-5.9-OSX-64bit-10.7-x86_64-Darwin/Sage-5.9-OSX-64bit-10.7.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/gsl/integration.so in sage.gsl.integration.numerical_integral (sage/gsl/integration.c:1802)()

(sage/gsl/integration.c:1802)()

ValueError: Integrand has wrong number of parameters

parameters
click to hide/show revision 3
retagged

2D integrate fails.

Hi Guys: I have a function as bellow:

sage: h_1_1_1
0.500000000000000*e^(-1/2*p1^2 - 1/2*p2^2)/((abs(p1 + p2 + 1)^3 + 1)*pi)

I need to performa an integrate as bellow:

h_1_1_1.integrate((p1, -20, 20)).integrate((p2, -20, 20))

Got followings:

0.159154943092*integrate(integrate(e^(-1/2*p1^2 - 1/2*p2^2)/(abs(p1 + p2 + 1)^3 + 1), p1, -20, 20), p2, -20, 20)

Then i need to know the value, using following

N(_)

Then got errors: .

    199         # We only return the result.
--> 200         return numerical_integral(f, a, b)[0]
    201 
    202     def _tderivative_(self, f, x, a, b, diff_param=None):

/Volumes/sage-5.9-OSX-64bit-10.7-x86_64-Darwin/Sage-5.9-OSX-64bit-10.7.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/gsl/integration.so in sage.gsl.integration.numerical_integral (sage/gsl/integration.c:1802)()

ValueError: Integrand has wrong number of parameters