update CubicInterp notebook
remove additional scipy features; will be in different PR
@@ -85,52 +85,3 @@ plt.show()
# difference
# between
# interpolating and extrapolating for the new ** CubicHermiteInterp **.The difference comes from having to calculate the extrapolation "by hand", since `HARK` uses linear decay extrapolation, whereas for interpolation it returns `scipy`'s result directly.
-
-# %% [markdown]
-# ### Additional features from `scipy`
-#
-# Since we are using `scipy`'s **CubicHermiteSpline** already, we can add a few new features to `HARK.interpolation`'s new **CubicHermiteInterp** without much effort. These include:
-#
-# 1. `der_interp(self[, nu])` Construct a new piecewise polynomial representing the derivative.
-# 2. `antider_interp(self[, nu])` Construct a new piecewise polynomial representing the antiderivative.
-# 3. `integrate(self, a, b[, extrapolate])` Compute a definite integral over a piecewise polynomial.
-# 4. `roots(self[, discontinuity, extrapolate])` Find real roots of the the piecewise polynomial.
-# 5. `solve(self[, y, discontinuity, extrapolate])` Find real solutions of the the equation pp(x) == y.
-
-# %%
-integral_1 = f3.integrate(a=0, b=10)
-integral_2 = f3.integrate(a=2, b=8)
-antiderivative = f3.antider_interp()
-integral_11 = antiderivative(10) - antiderivative(0)
-integral_21 = antiderivative(8) - antiderivative(2)
-
-# %% [markdown]
-# First, we evaluate integration and the antiderivative. Below, we see the numerical integral between 0 and 10 using `integrate` or the `antiderivative` directly. The actual solution is `~1.43325`.
-
-# %%
-integral_1, integral_11
-
-# %% [markdown]
-# The value of the integral between 2 and 8 is `~0.302871`.
-
-# %%
-integral_2, integral_21
-
-# %% [markdown]
-# ### `roots` and `solve`
-#
-# We evaluate these graphically, by finding zeros, and by finding where the function equals `0.5`.
-
-# %%
-roots = f3.roots(extrapolate=False)
-intercept = f3.solve(y=0.5, extrapolate=False)
-
-plt.plot(roots, np.zeros(roots.size), "o")
-plt.plot(intercept, np.repeat(0.5, intercept.size), "o")
-plt.plot(xnew, f3(xnew), "-.")
-plt.legend(["roots", "intercept", "cubic"], loc="best")
-plt.plot(xnew, np.zeros(xnew.size), ".")
-plt.plot(xnew, np.ones(xnew.size) * 0.5, ".")
-plt.show()
-
-# %%
