Hi Python users,
First of all, Marry coming Cristmas!!! ALL THE BEST TO YOU AND YOUR FAMILY
I need solution of integration under trapz() rule:
There are following functions:
def F1 (const1, x):
"""several calculations depending on bessel functions(mathematical functions) jn(), yv() exists in Python"""
def F2(const1 ,const2, D) :
"""Several calculation process"""
x = D / const2
[a , b] = F1 ( const1, x) # Where x - the same as in F1() function
S= a*b # This is (a*b) just an example for simply explanation
def F3(D, R):
"""Here I also calculated some process. So:"""
return arg1**arg3 # Just for example
def Integrate_all(const1, const2, min1, step1, max1):
R=arange(min1, max1, step1) # This is for function "F3"
D = arange ( 0.1, 7.0, 0.0001)
M = zeros ( size(R) )
for i in range(0,size(R)):
M [ i ] = integrate. trapz ( ( F2 ( const1, const2, D ) * F3 ( D ,R)) , x=D)
const1=complex number, const2= float,
The aim of the calculation is to use Integrate_all function for integration function above!!!!!!!
When I use those functions directly like one by one separately from python shell it works very accurately, BUT when I do it as shown above :
ERROR OCCURS: C:\calculation.py:194: RuntimeWarning: invalid value encountered in divide!!!!!! (I think this is occuring in F1()) --> bessel functions >>> jn(n,x) and yv(n,x)
HERE IS THE PROBLEM!!!!! I HAVE BEEN TRYING FOR MORE THAN 1.5 MONTHS, UNFORTUNATELY I AM LOOSING MY INTEREST, and TIME.
PLEEEEEAAAASEEEEEE HELP ME MY FRIENDS!!!!!!!!!