<jupyter_start><jupyter_text>Geometric view point on differential equations<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
from scipy import integrate
#inspired by http://systems-sciences.uni-graz.at/etextbook/sw3/multivariate.html
def dydx(x,y):
    return y/x

# define dimensions for grid
u = np.linspace(-10, 10,25)
v = np.linspace(-10, 10, 25)
# create grid
x, y  = np.meshgrid(u, v)
print(x.shape)

dy=dydx(x,y)


dx=x

soln=integrate.odeint(dydx,y0=[10],t=u)

plt.figure(figsize=(10, 10))
plt.quiver(x,y,dx,dy)
plt.plot(u,soln.flatten())
#inspired by http://systems-sciences.uni-graz.at/etextbook/sw3/multivariate.html
def dydx(x,y):
    return x-y**2

# define dimensions for grid
u = np.linspace(-10, 10,25)
v = np.linspace(-10, 10, 25)
# create grid
x, y  = np.meshgrid(u, v)
print(x.shape)

dy=dydx(x,y)


dx=x

soln=integrate.odeint(dydx,y0=[1],t=u)

plt.figure(figsize=(10, 10))
plt.quiver(x,y,dx,dy)
#plt.plot(u,soln.flatten())
#inspired by http://systems-sciences.uni-graz.at/etextbook/sw3/multivariate.html
def dydx(x,y):
    return y-x**2

# define dimensions for grid
u = np.linspace(-10, 10,25)
v = np.linspace(-10, 10, 25)
# create grid
x, y  = np.meshgrid(u, v)
print(x.shape)

dy=dydx(x,y)


dx=x

soln=integrate.odeint(dydx,y0=[1],t=u)

plt.figure(figsize=(10, 10))
plt.quiver(x,y,dx,dy)<jupyter_output>(25, 25)
{'fraction_non_alphanumeric': 0.17838638045891933, 'fraction_numerical': 0.047372316802368614, 'mean_word_length': 4.982300884955753, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '69771', 'license': 'MIT', 'n_tokens_mistral': 683, 'n_tokens_neox': 613, 'n_words': 113, 'path': 'MITDiffEq/QuiverPlots.ipynb', 'repo_name': 'mariakesa/ComputationalCalculus', 'size': '1351'}