juandesant,
@juandesant@astrodon.social avatar

Para calcular la integral definida usando esa función, tenemos que definir algo parecido a linspace:

def linspace(start,stop,count):  
 return [x*(stop-start)/(count-1)+start for x in range(0,count)]

from math import pi, sin  
x = linspace(0,pi,7)  
y = [sin(y) for y in x]  
print(simp_int(x,y))  

El resultado es 2.0008631896735363, un 0.04% más que el valor real.

#integracion #ReglaDeSimpson #calculo #Julia #Python

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • GTA5RPClips
  • JUstTest
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • provamag3
  • Leos
  • cisconetworking
  • megavids
  • lostlight
  • All magazines