{
    "nbformat": 4,
    "nbformat_minor": 5,
    "metadata": {
        "kernelspec": {
            "display_name": "Python",
            "language": "python",
            "name": "python"
        },
        "language_info": {
            "name": "python"
        }
    },
    "cells": [
        {
            "id": "6d9185ea",
            "cell_type": "markdown",
            "source": "<div class='alert alert-warning'>\n\nSciPy's interactive examples with Jupyterlite are experimental and may not always work as expected. Execution of cells containing imports may result in large downloads (up to 60MB of content for the first import from SciPy). Load times when importing from SciPy may take roughly 10-20 seconds. If you notice any problems, feel free to open an [issue](https://github.com/scipy/scipy/issues/new/choose).\n\n</div>",
            "metadata": {}
        },
        {
            "id": "830b1146",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "from scipy.interpolate import BPoly\nBPoly.from_derivatives([0, 1], [[1, 2], [3, 4]])",
            "outputs": []
        },
        {
            "id": "2ff1dabf",
            "cell_type": "markdown",
            "source": "Creates a polynomial `f(x)` of degree 3, defined on ``[0, 1]``\nsuch that `f(0) = 1, df/dx(0) = 2, f(1) = 3, df/dx(1) = 4`\n",
            "metadata": {}
        },
        {
            "id": "bfd94ef4",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "BPoly.from_derivatives([0, 1, 2], [[0, 1], [0], [2]])",
            "outputs": []
        },
        {
            "id": "75bd137b",
            "cell_type": "markdown",
            "source": "Creates a piecewise polynomial `f(x)`, such that\n`f(0) = f(1) = 0`, `f(2) = 2`, and `df/dx(0) = 1`.\nBased on the number of derivatives provided, the order of the\nlocal polynomials is 2 on ``[0, 1]`` and 1 on ``[1, 2]``.\nNotice that no restriction is imposed on the derivatives at\n``x = 1`` and ``x = 2``.\n\nIndeed, the explicit form of the polynomial is\n```\n\nf(x) = | x * (1 - x),  0 <= x < 1\n| 2 * (x - 1),  1 <= x <= 2\n\n```\nSo that f'(1-0) = -1 and f'(1+0) = 2",
            "metadata": {}
        }
    ]
}