Guest User

Untitled

a guest
Feb 17th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. %matplotlib inline
  2.  
  3. import matplotlib.pyplot as plt
  4. import sympy
  5. import numpy as np
  6. from scipy import integrate
  7.  
  8. x = sympy.Symbol('x')
  9. y = sympy.Function('y')
  10.  
  11. a=-5
  12. b=-1
  13. c=4
  14. d=-1
  15.  
  16. def ODE(a,b,c,t):
  17.  
  18. f = a*x+b*y
  19. g = c*x+c*d
  20. init_printing(use_unicode=True)
  21. return f,g
  22.  
  23.  
  24.  
  25.  
  26. sympy.Eq(x(x).diff(t), f)
  27. sympy.Eq(y(x).diff(t), g)
Add Comment
Please, Sign In to add comment