Guest User

Untitled

a guest
Nov 18th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3. import scipy.integrate as integrate
  4. from scipy.integrate import quad
  5. import pandas as pd
  6. def test(x,a,y):
  7. return (2*a*x**2*y*(2*a**2-4*x**4+a*x**2*y)+(a**2-
  8. 4*x**4)**2*np.log(abs(2*x**2+a*y)))/a**3
  9. def integrand(x,a):
  10. return 0.25*(test(x,a,1)-test(x,a,-1))/(np.cosh((x-5)/2))**2
  11. def test_int(a):
  12. return integrate.quad(integrand,-10,20,args=a)[0]
  13. y=np.arange(0,200,0.1)
  14. plt.plot(y,test_int(y))
Add Comment
Please, Sign In to add comment