回答編集履歴
2
edit
answer
CHANGED
@@ -72,4 +72,13 @@
|
|
72
72
|
ax[2].scatter(ans0[::100, 0], ans0[::100, 1], s=0.5, color='blue')
|
73
73
|
ax[2].scatter(ans1[::100, 0], ans1[::100, 1], s=0.5, color='red')
|
74
74
|
plt.show()
|
75
|
-
```
|
75
|
+
```
|
76
|
+
|
77
|
+
---
|
78
|
+
|
79
|
+
Runge-Kuttaの式に関しては、
|
80
|
+
```python
|
81
|
+
k1=y0*dt
|
82
|
+
l1=u0*dt
|
83
|
+
```
|
84
|
+
が多分正しくない気がします。
|
1
edit
answer
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
デバッグに伴って、逆にわかりにくくなっているので、落ち着いて書き直したほうが早いかもしれません。
|
2
|
+
実装自体が目的と想定して、正しい値を出すであろうscipyの結果との比較を入れました。
|
3
|
+
|
1
4
|
```python
|
2
5
|
import numpy as np
|
3
6
|
import scipy.integrate
|