Skip to content

Instantly share code, notes, and snippets.

@MiguelAngelHFlores
Created March 10, 2019 15:58
Show Gist options
  • Save MiguelAngelHFlores/3010db7a2808fd0db2f20d756378f138 to your computer and use it in GitHub Desktop.
Save MiguelAngelHFlores/3010db7a2808fd0db2f20d756378f138 to your computer and use it in GitHub Desktop.
# Importamos la librería Sympy
import sympy
# Importamos el módulo de latex
sympy.init_printing(use_latex='mathjax')
# Damos de alta la variable simbólica x, y la función Y
x = sympy.Symbol('x')
y = sympy.Function('y')
#Expresamos la ecuacion
sympy.Eq(3*x*y(x).diff(x)-(x**2-9)*y(x)+1/x)
# Resolviendo la ecuación
sympy.dsolve(3*x*y(x).diff(x)-(x**2-9)*y(x)+1/x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment