Skip to content

Instantly share code, notes, and snippets.

@MiguelAngelHFlores
Created March 18, 2019 03:42
Show Gist options
  • Save MiguelAngelHFlores/2076d83af95f77852e7065e72b5b6051 to your computer and use it in GitHub Desktop.
Save MiguelAngelHFlores/2076d83af95f77852e7065e72b5b6051 to your computer and use it in GitHub Desktop.
# Importamos la librería SymPy, así como el módulo de LaTeX
from sympy import *
init_printing(use_latex='mathjax')
# importamos el módulo para hacer divisiones
from __future__ import division
# Damos de alta la variable simbólica X
x= symbols('x')
# Expresemos la función a integrar
y=exp(1)**-x/sqrt(x)
y
# Integramos con el comando "integrate", evaluando de 0 a infinito(doble "o")
I=integrate(y,(x,0,oo))
# Mostramos resultado de nuestra integral
I
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment