{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"### Leibniz notation\n",
"\n",
"This exercise will clarify the meaning of Leibniz notation by exploring the original insights of [Leibniz](https://en.wikipedia.org/wiki/Gottfried_Wilhelm_Leibniz) using modern computing tools. \n",
"\n",
"\n",
"![alt](https://upload.wikimedia.org/wikipedia/commons/c/ce/Gottfried_Wilhelm_Leibniz%2C_Bernhard_Christoph_Francke.jpg)\n",
"\n",
"\n",
"As a beginning, let's summarize Leibniz's understanding of his operators $d$ and $\\int$. This information is taken from _A History of Mathematics: An Introduction_ by Katz, 3rd ed, from Section 16.2, titled \"Gottfried Wilhelm Leibniz\".\n",
"\n",
"The basic idea out of which the calculus of Leibniz developed was the observation that if $A,B,C,D,E$ was an increasing sequence of numbers and $L,M,N,P$ was the sequence of differences, then $E-A = L+M+N+P$. This is a crude form of the fundamental theorem of calculus. \n",
"\n",
"To clarify, let's do an example. Suppose we have an increasing sequence `x = [1,3,5,7,9]`. Then the corresponding sequence of differences is `dx = [2,2,2,2]`. This is because $3-1 = 2$, $5-3 = 2$, $7-5=2$ and $9-7=2$. The sequence of differences is formed by taking the difference between each two subsequent entries in the list `x`. Note that there is one less difference than there are numbers in the original list. \n",
"\n",
"_Exercise_: Given `x=[1,4,7,10,19]`, compute the associated list of differences `dx`.\n",
"\n",
"_Solution_: `dx = [3,3,3,9]`.\n",
"\n",
"The difference operation (which Leibniz denoted eventually as $d\\,$) occurs as a primitive in many scientific programming libraries. In this assignment the library we will be concerned with is called _numpy_ which is short for Numerical Python. \n",
"\n",
"This is how you compute differences using numpy:\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"import numpy as np\n",
"x = [1,3,5,7,9]\n",
"dx = np.diff(x)\n",
"print(dx)"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"x = [1,4,7,10,19]\n",
"dx = np.diff(x)\n",
"print(dx)"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"As we proceed through the exercises please change the values in the cells and run them on your own. Be aware that you can immediately receive help on any command by executing it in a cell, with a '?' character at the end.\n",
"\n",
"For example, the following command will show you the documentation for `np.diff`:\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"np.diff? #execute me!"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"In Leibniz's conception of the calculus the distinction between a variable and a sequence of numbers is somewhat blurry. He eventually considers `dx` to be a small increment when he presents his ideas on the difference quotient. But his original ideas on differences are motivated by the [Harmonic Triangle](https://nrich.maths.org/4781), from which it is clear that sequences of differences and partial sums were much on his mind. It is often fruitful to think of both `dx` and `∫ x` as sequences rather than numbers. Without this understanding, some of Leibniz's formulations (e.g. `d ∫ x = x`) are difficult to comprehend. Leibniz's ideas evolved over time and our modern notation is slightly different even from his refined ideas. [Here](https://sites.math.rutgers.edu/courses/436/436-s00/Papers2000/brumbau.html) is an accessible summary and links to further resources.\n",
"\n",
"For us every variable will denote a sequence.\n",
"\n",
"For example the letter `x` will represent some sequence of numbers, such as `x=[1,2,3,4]`. Similarly `dx = [1,1,1]` will also be a sequence. If we write $y = x^2$ then we mean `y` to be the sequence of squares of elements of `x`. Here is an illustration:\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"x = np.array([1,2,3,4])\n",
"y = x**2\n",
"y"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"#### Vectorization\n",
"\n",
"\n",
"In the above cell we wrote `y=x**2`, which is what we might write to express the dependence of a single number `y` on a single number `x`. But in reality this line of code stands for a computation on _lists_. What it says is that each element of the list `y` comes from squaring the corresponding element of the list `x`. \n",
"\n",
"We usually call this style of programming [vectorized code](http://www.cs.cornell.edu/courses/cs1112/2015sp/Exams/exam2/vectorizedCode.pdf) or sometimes [array programming](https://en.wikipedia.org/wiki/Array_programming). \n",
"\n",
"We now give a sequence of examples to show how vectorization works in numpy."
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"#Vectorization example\n",
"\n",
"x = np.array([0,1,2,3])\n",
"y = np.array([3,4,5,6])\n",
"print(\"x = {}\".format(x))\n",
"print(\"y = {}\".format(y))\n",
"print(\"x + y = {}\".format(x+y))\n",
"print(\"x*y = {}\".format(x*y))\n",
"print(\"x/y = {}\".format(x/y))\n",
"c = 7\n",
"print(\"if c = {} then c*y = {}\".format(c,c*y))"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"Vectorized programming not only makes for cleaner expressions, it is also efficient. This is because backend libraries are highly optimized to use hardware parallelism and other numerical tricks to make vectorized operations execute quickly. \n",
"\n",
"Vectorized notation is also highly compatible with Leibniz notation. In a way you can think of Leibniz's original notation as being itself a kind of vectorized code."
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"---\n",
"#### Higher order differences \n",
"\n",
"In the notes above we took the \"differences\" of a list `y` which depended on a list `x` in a functional way.\n",
"\n",
"Can we go one step further and compute the \"differences of the differences\"?\n",
"\n",
"Yes!\n",
"\n",
"We can also talk about the differences in `y` just as we did with respect to `x`. In the above example, we had\n",
"\n",
"`y = [1,4,9,16]`.\n",
"\n",
"It is easy to see that\n",
"\n",
"`dy = [3,5,7]`.\n",
"\n",
"We use the worksheet to automatically compute `dy` using numpy."
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"y = [1,4,9,16]\n",
"dy = np.diff(y)\n",
"dy"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"Now we \"go to town\" and compute differences of differences of differences in the following cell.\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"#Iterated differences...\n",
"\n",
"x = np.array([1,2,3,4,5,6,7,8,9,10])\n",
"y = x**3 - 2*x**2 + 1\n",
"\n",
"print(\"y = {}\".format(y))\n",
"dy = np.diff(y)\n",
"print(\"dy = {}\".format(dy))\n",
"ddy = np.diff(dy)\n",
"print(\"ddy = {}\".format(ddy))\n",
"dddy = np.diff(ddy)\n",
"print(\"dddy = {}\".format(dddy))"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"We will later see that these \"differences\" are very similar to derivatives. The fact that `dddy` (or $d^3y$) is constantly 6 is essentially saying that the 3rd derivative of the cubic polynomial $y=x^3-2x^2+1$ is a line of slope 6.\n",
"\n",
"---\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"#### Abscissae and Ordinates\n",
"\n",
"Leibniz referred to the sequence of inputs `x` as \"abscissae\" and the sequence `y` which functionally depends on `x` as the \"ordinates\". Nowdays these terms are rarely used. We might instead say that `x` is the independent variable, and `y` is the dependent variable. But for fun I will continue to say _abscissae_ and _ordinates_ here, especially since it means less writing.\n",
"\n",
"#### arange and linspace\n",
"\n",
"Sometimes we want to have a lot of numbers in our ordinate. There are two functions built into numpy which make this easy to create. They are _arange()_ and _linspace()_. \n",
"\n",
"The _arange()_ command takes three inputs: a starting point $a$, and ending point $b$, and the step size $\\Delta x$. What is returned is a list of $\\frac{b-a}{\\Delta x}$ numbers, which begin at $a$ and increase in increments of $\\Delta x$. Here is an example:"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"x = np.arange(1,10,0.5)\n",
"x"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"You can see that the abscissa `x` consists of $\\frac{10-1}{0.5} = 18$ numbers. The list begins at $a=1$ and proceeds by steps of size $\\Delta x = 0.5$. \n",
"\n",
"The _linspace_ operator is similar to _arange_, but instead of taking a step size $\\Delta x$ as an argument, it instead takes the desired number $n$ of points. \n",
"\n",
"Let's do an example:"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"x = np.linspace(1,10,18, endpoint=False)\n",
"x"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"The output of the above example is the same as the one before: 18 evenly spaced numbers beginning at 1 and increasing by increments of $\\Delta x = 0.5$. The `endpoint=False` argument tells the function that I do not want the endpoint `10` to be included in the abscissa list. (Try deleting that part and rerunning the command.)\n",
"\n",
"Whether we use `linspace` or `arange` is mostly a matter of preference. In this document I will tend to use `arange`.\n",
"\n",
"#### Plotting\n",
"\n",
"You should be familiar with plotting pairs of abscissae and ordinates to make a visual description of an equation (aka a _graph_). Below you can see how to use the matplotlib library to turn the lists `x` and `y` into a familiar graph."
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"\n",
"x = np.arange(0,10,0.1)\n",
"y = x**3\n",
"\n",
"plt.plot(x,y)\n",
"plt.title(r\"The graph $y=x^3$\")\n",
"plt.show()\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"#### Back to Leibniz... The first insight.\n",
"\n",
"Now that we have a little familiarity with numpy and vectorization, let's revisit Leibniz's central insight, which we mentioned in the first cell.\n",
"\n",
"Here it is as expressed in Katz:\n",
"\n",
"> Leibniz considered a curve defined over an interval divided into subintervals and erected ordinates $y_i$ over each point $x_i$ in the division. If one forms the sequence $\\{dy_i\\}$ of differences of these ordinates, its sum $\\sum_i dy_i$, is equal to the difference $y_n-y_0$ of the final and initial ordinates.\n",
"\n",
"That's a bit of a mouthfull. The first sentence just says that we have some list `x` of abscissae and some set `y` of ordinates and there is a functional relationship, such as `y=x**2`. The second sentence says that if we sum the elements of the list `dy` then we just get the difference between the first and last elements of the list `y`.\n",
"\n",
"Let's see if that's actually true..."
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"x = np.arange(0,10,0.1)\n",
"y = x**2\n",
"dy = np.diff(y)\n",
"sum(dy) == y[-1]-y[0], sum(dy)"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"The above cell describes a case in which we partition the interval $[0,10]$ into $100 = \\frac{10-0}{1/10}$ subintervals, and let the list `x` represent the left endpoint of each respective subinterval. We then \"erect the ordinates `y`\" where $y=x^2$ (understood as a vectorized expression). We then compute the differences for the list `y` as `dy` and sum those up. \n",
"\n",
"Using the notation `y[-1]` to describe the last element of `y` and `y[0]` to describe the first, we see from the output (True) that Leibniz's rule holds in this case. We also see that the sum of the differences happens to be 98.01.\n",
"\n",
"If you experiment (which you should) by changing the increment $\\Delta x = 0.1$ to other values, you will see that the equation continues to hold. In particular it holds as $\\Delta x \\rightarrow 0^+$, or in other words as the size of the partition goes to infinity. \n",
"\n",
"To see that $\\Delta x$ doesn't matter to the truth of the equation, you have to observe that the sum \"telescopes\", meaning most of the summands cancel out. \n",
"\n",
"We'll walk through that argument now.\n",
"\n",
"First notice that we can express the list `x` as \n",
"\n",
"`x = `$[0,\\Delta x, 2\\Delta x, 3\\Delta x,\\ldots, (n-1)\\Delta x]$. \n",
"\n",
"Hopefully this way of thinking is familiar from your calculus class. Because $y=x^2$, we must have\n",
"\n",
"`y = `$[0,\\Delta x^2, (2\\Delta x)^2, (3\\Delta x)^2,\\ldots, ((n-1)\\Delta x)^2]$. \n",
"\n",
"\n",
"Finally it must be true that\n",
"\n",
"`sum(dy)`$ = \\Delta x^2 - 0 + (2\\Delta x)^2 - \\Delta x^2 + (3\\Delta x)^2 - (2\\Delta x)^2 + \\cdots + ((n-1)\\Delta x)^2 - ((n-2)\\Delta x)^2$.\n",
"\n",
"Now we will argue that this sum \"telescopes\", meaning most of the things that are written cancel out.\n",
"\n",
"Note that in the sum each term appears exactly once positively and once negatively except for $a=0$ and $((n-1)\\Delta x)^2$, which each appear only once. Therefore everything except these terms cancels out (and $a=0$ so it can go as well).\n",
"\n",
"`sum(dy)`$=((n-1)\\Delta x)^2.$\n",
"\n",
"\n",
"Because $n = \\frac{b-a}{\\Delta x}$, we have that $(n-1)\\Delta x$ is simply $b-\\Delta x$.\n",
"\n",
"In the above example, $b-\\Delta x= 10-0.1 = 9.9$ and \n",
"\n",
"`sum(dy)`$ = 9.9^2 = 98.01$, as indicated. \n",
"\n",
"\n",
"In general, `sum(dy)`$ = (b-\\Delta x)^2$. And as $\\Delta x \\rightarrow 0^+$ this becomes $b^2$.\n",
"\n",
"If $a$ had not happened to be zero then we would have had \n",
"\n",
"`sum(dy)`$ = (b-\\Delta x)^2-a^2.$\n",
"\n",
"Because $f(x)=x^2$ is continuous, the limit as $\\Delta x \\rightarrow 0^+$ is $b^2-a^2$.\n",
"\n",
"By making $\\Delta x \\rightarrow 0^+$, we have, in a way, turned `dy` from a finite list of differences into an infinite list of very tiny differences.\n",
"\n",
"What we just showed, a little bit rigorously, is that Leibniz's sum rule can be true _even if_ the list of differences `dy` is infinite. The basic idea is very similar to the Fundamental Theorem of Calculus. \n",
"\n",
"\n",
"\n",
"\n",
""
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"---\n",
"\n",
"##### The Second Insight\n",
"\n",
"The second of Leibniz's insights about calculus can be described like this (Katz again):\n",
"\n",
"> Similarly, if one forms the sequence $\\{d \\sum y_i\\}$, where $\\sum y_i = y_0+y_1 +\\cdots+y_i$, the difference sequence $\\{d\\sum y_i\\}$ is equal to the original sequence of the ordinates. \n",
"\n",
"As usual, thinking of `y` as a list of numbers, we will use $\\int y$ to denote the new sequence of partial sums of the entries of `y`. To illustrate, we use the corresponding operator in numpy, which is `cumsum` (cumulative sum).\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"x = np.array([1,2,3,4,5])\n",
"y = x**3\n",
"print(\"Here is x = {}\".format(x))\n",
"print(\"Here is y = {}\".format(y))\n",
"print(\"Here is ∫ y = {}\".format(np.cumsum(y)))\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"You can see that `∫ y` is a sequence of the same length as `y`. Each element $\\sum y_i$ (Katz notation) in `∫ y` is the sum of the elements in `y` of index at most $i$. \n",
"\n",
"Leibniz's second insight is the observation that ∫ and d are inverse operators. \n",
"\n",
"That is, `d ∫ y = ∫ dy = y`. \n",
"\n",
"Let's try it out in numpy, using `np.diff` for `d` and `np.cumsum` for `∫`. "
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"x = np.array([1,2,3,4,5])\n",
"y = x**3\n",
"print(\"Here is x = {}\".format(x))\n",
"print(\"Here is y = {}\".format(y))\n",
"print(\"Here is ∫ y = {}\".format(np.cumsum(y)))\n",
"print(\"Here is d ∫ y = {}\".format(np.diff(np.cumsum(y))))\n",
"print(\"Here is ∫ dy = {}\".format(np.cumsum(np.diff(y))))\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"There has been an annoying technical snafu here: Each element in the sequence `∫ dy` is off by one.\n",
"\n",
"That is because Leibniz assumes that all ordinate sequences begin with zero.\n",
"\n",
"\n",
"Let's fix that and try again. "
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"x = np.array([0,1,2,3,4,5])\n",
"y = x**3\n",
"print(\"Here is x = {}\".format(x))\n",
"print(\"Here is y = {}\".format(y))\n",
"print(\"Here is ∫ y = {}\".format(np.cumsum(y)))\n",
"print(\"Here is d ∫ y = {}\".format(np.diff(np.cumsum(y))))\n",
"print(\"Here is ∫ dy = {}\".format(np.cumsum(np.diff(y))))\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"This time we were successful. \n",
"\n",
"Note that something is still a little strange. The sequence for `y` begins with a 0, but this has been left out of the last two expressions. It was inevitable that something be omitted for the simple reason that the difference operator results in a list which is one shorter than the initial list. \n",
"\n",
"With this one caveat, it is not hard to see why Leibniz's 2nd insight is true. Analyzing `d ∫ y` we see that that (in Katz's notation) the $i$th element of the sequence `d ∫ y` is the $i$th element of the sequence `y`:\n",
"\n",
"$$\\sum y_i - \\sum y_{i-1} = y_i.$$\n",
"\n",
"Note, however, that $y_0$ cannot be computed in this way, and so the initial element of the sequence `y` is forgotten. \n",
"\n",
"Going the other way, we consider the $i$th element of the sequence `∫ dy` = $\\{\\sum dy_i\\}$ in Katz's notation. Using Leibniz's first insight, we see that $\\sum dy_i = y_i - y_0$. If $y_0=0$, as Leibniz always assumes, then we again arrive at $y_i$. \n",
"\n",
"This proves the statement (in Leibniz's terms) `d ∫ y = ∫ dy = y`. \n",
"Technically we should make a note to omit the first element of `y` on the right hand side of these equations.\n",
"\n",
"---\n",
"\n",
"To make things work out numerically, we will often have to remove the first element of our ordinate sequences in numpy. The \n",
"syntax for doing this is the following."
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"y = np.array([1,2,3,4,5,6,7])\n",
"print(\"y[1:] = {}\".format(y[1:]))"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"This kind of array manipulation is called _array slicing_. More sophisticated slices are possible, even when `y` is multidimensional, but we will not use them here."
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"dx = np.diff(x)\n",
"fig,axes = plt.subplots(1,2)\n",
"axes[0].plot(x[1:],dy/dx)\n",
"axes[0].plot(x[1:],dy)\n",
"axes[1].plot(x,3*x**2)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"# We see that ∫ dy/dx dx = y\n",
"f = np.cumsum(dy/dx*dx)\n",
"fig,axes = plt.subplots(1,2)\n",
"axes[0].plot(x[1:],f)\n",
"axes[1].plot(x,y)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"#Inverse relationship of ∫ and d\n",
"\n",
"dx = 0.5\n",
"x = np.arange(0,5,dx)\n",
"y = x**2\n",
"\n",
"# We see that ∫ dy = d∫ y = y\n",
"\n",
"print(np.cumsum(np.diff(y))==np.diff(np.cumsum(y)))\n",
"\n",
"print(np.cumsum(np.diff(y)) == y[1:])\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"#Calculus of differentials"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"#Sum rule\n",
"\n",
"dx = 0.1\n",
"x = np.arange(0,10,dx)\n",
"y = np.sin(x)\n",
"z = x**2\n",
"fig,axes = plt.subplots(1,2)\n",
"axes[0].plot(x,d(y+z))\n",
"axes[1].plot(x,d(y)+d(z))\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"#Leibniz Rule\n",
"\n",
"def d(Y):\n",
" return np.hstack((np.array([0.000001]),np.diff(Y)))\n",
"\n",
"fig,axes = plt.subplots(1,2,figsize=(13,5))\n",
"\n",
"axes[0].plot(x,d(y*z),label=\"d(yz)\")\n",
"axes[0].plot(x,d(y)*z+y*d(z),label=\"dy*z+y*dz\")\n",
"axes[0].legend()\n",
"\n",
"\n",
"axes[1].plot(x,(d(y*z)/dx),label=\"d(yz)/dx\")\n",
"axes[1].plot(x,(d(y)/dx)*z+y*(d(z)/dx),label=r\"$\\frac{dy}{dx}z+y\\frac{dz}{dx}$\")\n",
"axes[1].legend()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (Anaconda 5)",
"language": "python",
"name": "anaconda5"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
},
"name": "",
"signature": "sha256:1e2f22863132525760fa8f253e86e758ecb3529db12465b2cddc1287236c21bf"
},
"nbformat": 4,
"nbformat_minor": 0
}