Skip to content

Instantly share code, notes, and snippets.

View oleksandr-danylchenko's full-sized avatar

Oleksandr Danylchenko oleksandr-danylchenko

  • Binary Studio
  • Ukraine, Kyiv
  • 16:25 (UTC +03:00)
View GitHub Profile
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import odeint
# Визначаємо функцію рівняння із умови
def func(y, x):
return (np.sin(2 * x) / (2 - np.sin(x) ** 2) - 2 * y) / 2
# Реалізація методу Ейлера-Коші де крок ітерації визначено як:
# x[i+1] = x[i] + h