{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 9 First order equations & Integrating factors. Second order equations, Newton's laws and equations of motion."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# import all python add-ons etc that will be needed later on\n",
"%matplotlib inline\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from sympy import *\n",
"init_printing() # allows printing of SymPy results in typeset maths format\n",
"plt.rcParams.update({'font.size': 14}) # set font size for plots"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 9.1 Homogeneous equations\n",
"\n",
"A homogeneous differential equation has the form\n",
"\n",
"$$\\displaystyle Mdx + Ndy = 0$$\n",
"\n",
"if $M$ and $N$ are functions of the _same degree_ in $x$ and $y$. This constraint means that $M/N$ is a function of $y/x$ and the homogeneous equation has the form\n",
"\n",
"$$\\displaystyle \\frac{dy}{dx} = f\\left(\\frac{y}{x}\\right)$$\n",
"\n",
"where $f$ is the function of $y/x$. To solve this equation the substitution $y = ux$ is used. The derivative is \n",
"\n",
"$$\\displaystyle \\frac{dy}{dx} = u + x\\frac{du}{dx}$$\n",
"\n",
"then $\\displaystyle u + x\\frac{du}{dx} = f(u)$ which can have its variables separated to produce\n",
"\n",
"$$\\displaystyle \\frac{du}{f(u)-u}=\\frac{dx}{x} \\qquad\\tag{11}$$\n",
"\n",
"which is integrated to find the solution. \n",
"\n",
"The equation \n",
"\n",
"$$\\displaystyle \\frac{dy}{dx}=\\frac{2x^2+3y^2}{xy} $$\n",
"\n",
"satisfies the condition $Mdx + Ndy = 0$ because the degree of $xy, \\; x^2$ and $y^2$ is the same, and is 2, on both on the top and bottom of $\\displaystyle \\frac{2x^2 + 3y^2}{xy}$. The function $f(u)$ then becomes \n",
"\n",
"$$\\displaystyle f(u) = \\frac{2x^2 + 3u^2x^2}{ux^2} = \\frac{2 + 3u^2}{u}$$\n",
"\n",
"and then the solution is found using equation (11) as \n",
"\n",
"$$\\displaystyle \\int\\frac{u}{2(1+u^2)}du=\\int\\frac{dx}{x}$$\n",
"\n",
"and which is, with $\\ln(c)$ as the integration constant,\n",
"\n",
"$$\\displaystyle \\frac{1}{4}\\ln(1 + u^2) = \\ln(x) + \\ln(c)$$\n",
"\n",
"and after substituting and rearranging, the general solution is \n",
"\n",
"$$\\displaystyle y = x\\sqrt{c^4x^4-1}$$\n",
"\n",
"Using SymPy produces the similar answer."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZ8AAAAfCAYAAAA4JcD4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAABJ0AAASdAHeZh94AAAJ20lEQVR4nO2dfdBUVR3HPw/YDASNTE4GWWRE0rsw1KATEA0CUkM8FsUME4qoTI1m5GBJkV9/MVKMkqRRo0P5oNn0As7jS06SjY3iC4MaKIqUZqVJoYPgS5IYT3+cs3KffXb33ru7d+++nM/MM/s8d8+ee/ae+3nOub9zzr1dfX19BAKBQCDQSI4q3mBm24HdwKvAFknrG12oQCAQCLQuZjYTWOD/HA/Ml7Q7mmZA4wOcCCyStD3T0gUCgUCgLZG0GdgMYGZ9wNDiNKUan0AbYmZzgJvzLkcnIKkr7zIEyhNcaByVXAiNT+dwJjBG0lN5FyQQyJngQhMwKO8CBLLHzIYAo4JsgU4nuNA8hManMzgFuCPvQgQCTUBwoUkIjU9nMBe4Ke9CBAJNQHChSQiNT5tjZoOACcCDeZclEMiT4EJzESYctD+TgK2SWmo1sZktB1YB6ySdl3d5Am1BcKGJCFc+7U83LRZmMLOTgCXAw3mXJdBWdBNcaBpC49P+TAP+mHMZEmNmRwM3AIuBF3IuTqC9mEZwoWnIPOxmZhuA2cB7JL1SxecnAg8A54Rb/aTDzMYBT0l6LUHa9+FO8pnAaGAEsB/YAdwI9Ej6T2aFPcI1wEZJd5qZ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akJ4uSLPevl6XJNwfG4xqQMzhyDo+JbJtX4bMFr2LrIYakvg1wDVrPt7xc8Puouw/BhcqkvfIpxH+3AT+NSbsJF48+HViXsCJ+j6uIfovrzK1g7gZuTTBfv2Wo5ZgUcT/wb+C7uJMhMdGYdT3wPe+RFd6/AxfOaWokXYJb4V8NHwFeAn5bYzGS+tbPNajt3MrDt2ZwAerrQ3ChMmkbn8LK41KTDPoh6TU/VXKVmU3wsepqK+J03GyeUrfOaFnqdXJKOmxmN+OOU9vdeqiVMLMRuJ7ympjIQBIS+VbKtRrPrYb7FlzoPBI3Pn7Qcw7uUa7b4tJ7rgC+jOuFzElfvDfuIrsc2CRpSzV5dAi9wHGSXs5yJ35BXuGOvoOA0T5csk/SP7Lcd4swBTdOELe2pCJV+Faza36/7eBbLw1wAYIPtVCx8TGz0cAC4L24nsSjwDeSZi7poJktBD5lZsNU3XNGjsc9VKmnis92Erfj4tJZ8zH6D0Kb/9mAi4l3NJJuIdmamwHU4ludXIP28K1RLkDwoWpKPVJhO+65DQeBu3Azbfbj4q1LJbXC6vBAoOUwsyUE3wJtgJnNwt9AFfgwML94PdP/ATPWioCJ1UvWAAAAAElFTkSuQmCC\n",
"text/latex": [
"$\\displaystyle \\left[ y{\\left(x \\right)} = - x \\sqrt{C_{1} x^{4} - 1}, \\ y{\\left(x \\right)} = x \\sqrt{C_{1} x^{4} - 1}\\right]$"
],
"text/plain": [
"⎡ ___________ ___________⎤\n",
"⎢ ╱ 4 ╱ 4 ⎥\n",
"⎣y(x) = -x⋅╲╱ C₁⋅x - 1 , y(x) = x⋅╲╱ C₁⋅x - 1 ⎦"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"x, y = symbols('x, y')\n",
"y = Function('y')\n",
"f01 = diff(y(x),x)-(2*x**2 + 3*y(x)**2)/(x*y(x) ) # define equation , y is function of x \n",
"ans = dsolve(f01) # solve then factor answer\n",
"factor(ans)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 9.2 Exact equations\n",
"\n",
"The exact equation also has the form $Mdx + Ndy = 0$ with the additional constraint that \n",
"\n",
"$$\\displaystyle \\frac{\\partial M}{\\partial y} = \\frac{\\partial N}{\\partial x}$$\n",
"\n",
"and this type of equation is frequently met in Thermodynamics, see Chapter 12.8. \n",
"\n",
"If a differential equation $\\displaystyle Mdx + Ndy = 0$ , is multiplied throughout by a suitable term it can become exact; i.e. the equation is now\n",
"\n",
"$$\\displaystyle (Mdx + Ndy)G(x, y) = 0$$\n",
"\n",
"The term $G(x, y)$ is called an _integrating factor_ which in general can be difficult to uncover except in the case of linear first-order equations that are described next.\n",
"\n",
"## 9.3 Linear first-order equations and Integrating Factors\n",
"\n",
"Linear first-order equations have the form,\n",
"\n",
"$$\\displaystyle \\frac{dy}{dx} +Py = Q $$\n",
"\n",
"where $P$ and $Q$ are functions of $x$ only. These equations can be integrated using integrating factors. First we consider the particular case when $Q = 0$ or\n",
"\n",
"$$\\displaystyle \\frac{dy}{dx} +Py = 0 \\qquad\\tag{12} $$\n",
"\n",
"Writing the equation as $\\displaystyle \\frac{1}{y}dy +Pdx=0$ and integrating gives \n",
"\n",
"$$\\displaystyle \\ln(y)+P\\int dx=\\ln(c)$$\n",
"\n",
"where the constant is $\\ln(c)$. Simplifying gives \n",
"\n",
"$$\\displaystyle ye^{\\large{\\int Pdx}} = c$$\n",
"\n",
"If this equation is differentiated, it produces $\\displaystyle \\frac{d}{dx}ye^{\\int Pdx} = 0$. From this result, it can be shown that\n",
"\n",
"$$\\displaystyle \\frac{d}{dx}ye^{\\large{\\int Pdx}}=e^{\\large{\\int Pdx}}\\left(\\frac{dy}{dx}+Py \\right) $$\n",
"\n",
"and the right-hand side is the starting equation (12), multiplied by the integrating factor \n",
"\n",
"$$\\displaystyle G(x) = e^{\\large{\\int Pdx}}$$\n",
"\n",
"It follows that the solution of the differential equation becomes the two integrals,\n",
"\n",
"$$\\displaystyle ye^{\\large{\\int Pdx}}=\\int Qe^{\\large{\\int Pdx}}dx +c\\qquad\\tag{12}$$\n",
"\n",
"### **(i) Example $\\displaystyle \\frac{dy}{dx} + \\frac{y}{x}= 3\\sin(x)$**\n",
"\n",
"In this equation $P = 1/x$ and $Q = 3\\sin(x)$. The integrating factor is simple in this case and is \n",
"\n",
"$$\\displaystyle \\int Pdx=\\ln(x)$$\n",
"\n",
"and as $\\displaystyle e^{\\ln(x)}=x$ then $\\displaystyle yx = 3\\int x\\sin(x)dx +c $.\n",
"\n",
"Integrating this by parts and rearranging, produces \n",
"\n",
"$$\\displaystyle y = \\frac{3\\sin(x)}{x} - 3\\cos(x) + c$$\n",
"\n",
"and the constant is determined once the initial conditions are specified.\n",
"\n",
"While this method is very useful, it does have its limitations particularly when $Q \\ne 0$; for instance the similar equation \n",
"\n",
"$$\\displaystyle \\frac{dy}{dx} + xy = 3\\sin(x)$$\n",
"\n",
"has the integrating factor \n",
"\n",
"$$\\displaystyle e^{\\large{\\int xdx}}=e^{x^2/2}$$\n",
"\n",
"The solution is,\n",
"\n",
"$$\\displaystyle ye^{{x^2/2}}=3\\int e^{{x^2/2}}\\sin(x)dx+c$$\n",
"\n",
"and the remaining integral is now a difficult one with the answer involving the error function.\n",
"\n",
"### **(ii) Coupled chemical kinetic equations**\n",
"One particularly useful application of this method is to solve coupled kinetic equations. If a molecule reacts in a scheme \n",
"\n",
"$$\\displaystyle A \\stackrel {k_1} \\longrightarrow B \\stackrel {k_2}\\longrightarrow C$$\n",
"\n",
"the rate equations are easily written down,\n",
"\n",
"$$\\displaystyle \\begin{align}\n",
"\\frac{dA}{dt} &=-k_1A \\\\\n",
"\\frac{dB}{dt}&=k_1A-k_2B \\end{align}$$\n",
"\n",
"If the initial amount of $A= A_0$ and $B_0 = 0$, then integrating the first equation gives \n",
"\n",
"$$\\displaystyle A = A_0e^{-k_1t}$$\n",
"\n",
"Substituting this into the second and rearranging gives\n",
"\n",
"$$\\displaystyle \\frac{dB}{dt}+k_2B =k_1Ae^{-k_1t} $$\n",
"\n",
"which has the form $\\displaystyle \\frac{dB}{dt}+PB=Q$ and can be solved using the integrating factor \n",
"\n",
"$$\\displaystyle e^{\\large{\\int Pdt}}=e^{k_2t}$$\n",
"\n",
"with the solution,\n",
"\n",
"$$\\displaystyle Be^{k_2t}=k_1A\\int e^{k_2t-k_1t}dt+c$$\n",
"\n",
"which is \n",
"\n",
"$$\\displaystyle Be^{k_2t}=\\frac{k_1A_0}{k_2-k_1} e^{k_2t-k_1t}dt+c$$\n",
"\n",
"The initial conditions are $B = 0$ when $t = 0$ then \n",
"\n",
"$$\\displaystyle B=\\frac{k_1A_0}{k_2-k_1}\\left(e^{-k_1t}-e^{-k_2t} \\right) $$\n",
"\n",
"and this has the expected form; it is zero when $t = 0$ and again when $t = \\infty$ and passes through a maximum when $dB/dt = 0$.\n",
"\n",
"## 9.4 The Bernoulli differential equation $\\displaystyle \\frac{dy}{dx} + Py = Qy^n $\n",
"\n",
"The equation \n",
"\n",
"$$\\displaystyle \\frac{dy}{dx} + Py = Qy^n $$ \n",
"\n",
"where $P$ and $Q$ are functions of $x$ alone, is called the Bernoulli equation which is not to be confused with an equation of the same name that shows that in a incompressible fluid its pressure plus kinetic and potential energy is a constant, see section 11.7. \n",
"\n",
"If the integer $n = 1$ the equation is solved by separating variables in the usual way. If $n \\ne 1$ the equation can be solved with an integrating factor with the substitution \n",
"\n",
"$$\\displaystyle y^{1-n} = u $$\n",
"\n",
"Differentiating gives \n",
"\n",
"$$\\displaystyle \\frac{(1-n)}{y^n}\\frac{dy}{dx}=\\frac{du}{dx}$$\n",
"\n",
"and the equation becomes\n",
"\n",
"$$\\displaystyle \\frac{du}{dx}+(1-n)Pu=(1-n)Q$$\n",
"\n",
"The complicated equation \n",
"\n",
"$$\\displaystyle x\\frac{dy}{dx}+y=x^2e^xy^2$$\n",
"\n",
"is seen to be of the Bernoulli form because if divided through by $x$ it becomes \n",
"\n",
"$$\\displaystyle \\frac{dy}{dx}+\\frac{y}{x}=xe^xy^2$$\n",
"\n",
"Comparing with the Bernoulli equation, $n = 2$ and with the substitution $u=1/y$ then \n",
"\n",
"$$\\displaystyle \\frac{du}{dx}-\\frac{u}{x}=-xe^x$$\n",
"\n",
"The integrating factor is $\\displaystyle e^{\\large{\\int Pdx}}=1/x$ then \n",
"\n",
"$$\\displaystyle \\frac{u}{x}=-\\int e^xdx\\quad \\text{ or }\\quad \\displaystyle u=-x(e^x+c)$$\n",
"\n",
"Substituting back gives $\\displaystyle y=-\\frac{1}{x(e^x+c)} $"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 10 Second-order differential equations\n",
"\n",
"In the next few sections equations of the general mathematical form \n",
"\n",
"$$\\displaystyle \\frac{d^2y}{dx^2} = \\pm f(y)$$\n",
"\n",
"are solved where the $\\pm f(y)$ is some function of $y$. In simple harmonic motion, for example, $f(y)= y$. The solution always involves exponentials or sines/cosines depending on the boundary conditions needed. \n",
"\n",
"There are different ways of solving differential equations as illustrated in the next few sections, but a general method of solution is detailed in section 12 using the 'D operator' method and is briefly outlined here. \n",
"\n",
"A second-order equation for illustration is,\n",
"\n",
"$$\\displaystyle \\frac{d^2y}{dx^2} + ay = 0$$\n",
"\n",
"The differential is replaced by the differential operators, \n",
"\n",
"$$\\displaystyle D=\\frac{dy}{dx},\\qquad D^2=\\frac{d^2y}{dx^2} $$ \n",
"\n",
"and so the equation becomes,\n",
"\n",
"$$\\displaystyle D^2 + ay = 0$$\n",
"\n",
"Next we hypothesize that the equation is satisfied by exponential functions such as \n",
"\n",
"$$\\displaystyle y = e^{kx}$$\n",
"\n",
"where $k$ is a constant to be determined. The way to find $k$ is to substitute the guessed answer into the equation \n",
"\n",
"$$\\displaystyle (D^2 + a)e^{kx} = 0$$\n",
"\n",
"and evaluate, viz.,\n",
"\n",
"$$\\displaystyle (D^2 +a)e^{kx} =(k^2 +a)e^{kx} = 0$$ \n",
"\n",
"Next evaluate $k$ via the _auxiliary equation_ which in this case is\n",
"\n",
"$$\\displaystyle k^2 + a = 0 $$\n",
"\n",
"which has roots of $k_1 = +\\sqrt{-a}=i\\sqrt{a} $ and $k_2 = -\\sqrt{-a}=-i\\sqrt{a}$. As there are two roots the solution is thus the sum of two exponentials \n",
"\n",
"$$\\displaystyle y = Ae^{i\\sqrt{a}x} + Be^{-i\\sqrt{a}x}$$\n",
"\n",
"where $A$ and $B$ are arbitrary constants determined by the initial conditions. As the equation has effectively been integrated twice two lots of initial conditions are needed, for example at $x = 0, y = y_0$ and also, say, $dy/dx = 0$ (called a _reflecting_ boundary condition) thus $y_0 = A+B$ and $0 = iA\\sqrt{a}-iB\\sqrt{a}$ or $A=B$ forming \n",
"\n",
"$$\\displaystyle y = \\frac{y_0}{2}\\left(e^{i\\sqrt{a}x} + e^{-i\\sqrt{a}x}\\right)$$\n",
"\n",
"and as the exponentials are complex this solution can be converted into a cosine as\n",
"\n",
"$$\\displaystyle y = y_0\\cos(\\sqrt{a}x)$$\n",
"\n",
"as a check differentiate twice, $\\displaystyle \\frac{d^2y}{dx^2} = -y_0a\\cos(\\sqrt{a}x)=-ay$.\n",
"\n",
"If the boundary conditions were $x = 0, y = y_0$ and when $x=L, y=0$ (an _absorbing_ boundary condition) where $L$ is some particular value, then $y_0=A+B$ and $\\displaystyle 0=Ae^{i\\sqrt{a}L}+Be^{-i\\sqrt{a}L}$from which $A,B$ can be determined. The result can be expressed as a ratio of exponentials or cosines in $x$ and $x-L$.\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 10.1 Newton's laws and differential equations describing motion\n",
"\n",
"Differential equations dominate the study of the motion of the planets and of molecules. In single molecules or in ensembles of them, molecular dynamics calculations rely on solving many simultaneous equations according to Newton's laws of motion, linked to potentials describing intermolecular interactions. \n",
"\n",
"Newton's laws are\n",
"\n",
"**(a)**$\\quad$ Every particle remains either in a state of rest or of constant speed in a straight line unless acted on by a force to change that state.\n",
"\n",
"**(b)**$\\quad$ The rate of change of the momentum of a particle is proportional to the force acting on it and is in the direction of the force.\n",
"\n",
"**(c)**$\\quad$ Action and reaction are equal and opposite.\n",
"\n",
"The first law states that any acceleration experienced by a particle is caused by the action of an external force. The second law proposes that force $f$ is equal to the product of mass and acceleration since momentum is the product of mass and velocity;\n",
"\n",
"$$\\displaystyle f = m \\frac{d^2x}{dt^2} = m\\frac{dv}{dt}$$\n",
"\n",
"where $x$ is position, $v$ velocity, and $t$ time. The second law includes the first, for if the force is zero then so is the acceleration and the body must remain unchanged.\n",
"\n",
"The third law asserts that if two particles exert forces on one another, the force exerted by the first on the second is equal to that exerted by the second on the first. This law can be used to define the mass of a particle.\n",
"\n",
"Newton's law of gravity was formulated to understand the motion of the planets. It states that the force of attraction of two bodies is proportional to the product of their masses and the inverse square of their separation $r$,\n",
"\n",
"$$\\displaystyle f = G\\frac{m_1m_2}{ r^2}$$\n",
"\n",
"where $G$ is the gravitational constant $6.673\\cdot 10^{-11}\\,\\mathrm{N\\, m^2\\,kg^{-2}}$. This law of attraction takes a simpler form in the case of a small body falling to earth from heights that are small compared to its radius. In this case, $r\\equiv R$, the radius of the earth, is sensibly constant and the law becomes\n",
"\n",
"$$\\displaystyle f = mg$$\n",
"\n",
"where the acceleration due to gravity is \n",
"\n",
"$$\\displaystyle g=\\frac{GM}{R^2} = 9.81\\,\\mathrm{ m \\,s^{-2}}$$\n",
"\n",
"where $M$ is the mass of the (spherical) earth. Clearly, $g$ will be different on the moon to that on the earth. The differential equation for a body falling from a height $x$ under gravity, is therefore\n",
"\n",
"$$\\displaystyle \\frac{d^2x}{dt^2} = g$$\n",
"\n",
"and is independent of the mass. The distance $x$ is positive in the downwards direction. Positive upwards would change $g$ into $-g$. If this equation is integrated once then\n",
"\n",
"$$\\displaystyle \\frac{dx}{dt} = gt + v_0 $$\n",
"\n",
"where the integration constant $v_0$ is the initial velocity at $t$ = 0, and $v = dx/dt$ is the velocity at time $t$ producing the familiar equation $v = v_0 + gt$. \n",
"\n",
"Integrating again produces the distance travelled after a time $t$ from the starting or reference point $x_0$,\n",
"\n",
"$$\\displaystyle x=\\frac{gt^2}{2} +v_0t+x_0$$\n",
"\n",
"This equation contains all the information about a freely falling body.\n",
"\n",
"## 10.2 General Equation of Motion, Energy equation and Simple Harmonic Motion.\n",
"\n",
"If the force is represented by $f(x)$ then different types of motion can be studied, for example motion under gravity or that due to extension of a spring which will lead to simple harmonic motion.\n",
"\n",
"The simple harmonic motion is the most important form of periodic motion. It describes the _small_ angular oscillations of a pendulum as well as a good approximation to the vibrations of molecules, and this is called the harmonic oscillator model. A spring that hangs vertically with a mass attached to its end, a taut wire with a mass attached at it centre, or the oscillations of a ship or of a hydrometer, all follow simple harmonic motion, if the inertia of the spring, wire, or liquid is ignored. In this motion, the acceleration is proportional to the displacement of the particle from its central position. \n",
"\n",
"The general equation of motion is formed by equating force, as mass multiplied by acceleration, to the force $f(x)$ on the particle, such as given by Hooke's or some other law,\n",
"\n",
"$$\\displaystyle m\\frac{d^2x}{dt^2} = f(x) \\qquad\\tag{13} $$\n",
"\n",
"If the force is due to gravity, then $f (x) = mg$; if describing simple harmonic motion based on a small extension of a spring obeying Hooke's law, then $f(x) = -kx$ where $k$ is the force constant and in molecules this has values of a few hundred newton metres sec$^{-1}$ . \n",
"\n",
"This type of differential equation can be solved by multiplying both sides by $dx/dt$ which produces\n",
"\n",
"$$\\displaystyle m\\frac{dx}{dt}\\frac{d^2x}{dt^2}= f(x)\\frac{dx}{dt}$$\n",
"\n",
"and, although this does not look too promising, the left-hand terms are the derivative of $\\displaystyle \\left(\\frac{1}{2}\\frac{dx}{dt}\\right)^2$, therefore integrating both sides gives\n",
"\n",
"$$\\displaystyle \\frac{m}{2}\\left(\\frac{dx}{dt}\\right)^2=\\int f(x)\\frac{dx}{dt}dt+c =\\int f(x)dx+c \\qquad\\tag{14} $$\n",
"\n",
"where $c$ is the constant of integration. This is the '_Equation of Energy_'; the left-hand side is the kinetic energy since $dx/dt$ is velocity and the right hand side is the potential energy. The time to reach position $x$ can also be found. First let \n",
"\n",
"$$\\displaystyle \\int f(x)dx+c =F(x)$$\n",
"\n",
"then rearrange the energy equation to\n",
"\n",
"$$\\displaystyle \\frac{dt}{dx}=\\pm\\sqrt{\\frac{m}{2}}\\frac{1}{\\sqrt{F(x)}}$$\n",
"\n",
"and integrate,\n",
"\n",
"$$\\displaystyle t=\\pm\\sqrt{\\frac{m}{2}}\\int \\frac{dx}{\\sqrt{F(x)}}+ c_1 \\qquad\\tag{15}$$\n",
"\n",
"This equation contains two arbitrary constants, $c_1$ and $c$, of which $c$ is already included in $F(x)$. Two constants are needed because the acceleration has to be integrated twice.\n",
"\n",
"The equation of energy can be obtained in a slightly different way if the velocity $v$ is required. Taking $x$ as the dependent variable and using \n",
"\n",
"$$\\displaystyle \\frac{dv}{dx} = \\frac{dv}{dt}\\frac{ dt}{dx}$$\n",
"\n",
"equation (13) can be written as\n",
"\n",
"$$\\displaystyle mv\\frac{dv}{dx}=f(x) \\qquad\\tag{16}$$\n",
"\n",
"Integrating produces \n",
"\n",
"$$\\displaystyle \\frac{mv^2}{2}=\\int f(x)dx+c$$\n",
"\n",
"which is the same as equation 14. The calculation can be completed when different types of forces are assigned to $f(x)$. Two examples are given, one for the motion of a rocket, another for simple harmonic motion.\n",
"\n",
"## 10.3 Rockets\n",
"At the end of section 3.5 the motion of a rocket launched vertically was examined. Figure 8b. shows plots of velocity and time vs distance away from the earth's surface. To calculate the distance moved in a given time equation 15 can be used. \n",
"\n",
"The equation to use is $\\displaystyle \\frac{dv}{dt}\\equiv v\\frac{dv}{dr}=-\\frac{gR^2}{r^2}$ which leads to $\\displaystyle F(r)= v_0^2 - 2gR+ \\frac{2gR^2}{r}$. \n",
"\n",
"The integration is \n",
"\n",
"$$\\displaystyle t=\\int \\frac{dr}{\\sqrt{v_0^2 - 2gR+ 2gR^2/r} } +c$$\n",
"\n",
"With $r$ as the variable the equation can be clarified if written as $\\displaystyle \\int \\frac{ dr}{\\sqrt{A+B/r}}$ where $A=v_0^2-2gR$ and $B=2gR^2$ are constants in the integration. The result is\n",
"\n",
"$$\\displaystyle t= \\frac{1}{A}\\left( \\sqrt{Br}\\sqrt{\\frac{Ar}{B}+1 } -\\frac{B}{\\sqrt{A}}\\sinh^{-1}\\left( \\sqrt{\\frac{Ar}{B}} \\right) \\right) +c$$\n",
"\n",
"and the constant $c$ is evaluated as $r=R$ at $t = 0$. When the initial velocity is the escape velocity \n",
"\n",
"$$\\displaystyle v_e=\\sqrt{2gR}$$\n",
"\n",
"then \n",
"\n",
"$$\\displaystyle t=\\frac{2}{3\\sqrt{2gR^2}}\\left( r^{3/2}-R^{3/2} \\right)$$\n",
"\n",
"Plots of $t$ vs $r$ are shown in fig 8b. Note that the inverse hyperbolic sine, $\\sinh^{-1}(x)$, can also be written as \n",
"\n",
"$$\\displaystyle \\sinh^{-1}(x)= \\ln(x+\\sqrt{x^2+1})$$\n",
"\n",
"## 10.4 Rockets and conservation of momentum\n",
"\n",
"The Law of Conservation of Momentum can be used to find the velocity of a rocket. Suppose that the rocket is moving at velocity $v$ (relative to some fixed coordinate system) and ejects fuel with velocity $-u$ relative to the rocket, therefore the mass of the rocket $M$ decreases with time as the fuel is used. We know that the rate of change of momentum is equal to the external force on a system of particles (i.e force is mass times acceleration and acceleration is the rate of change of momentum)\n",
"\n",
"$$\\displaystyle \\frac{dp}{dt}=F$$\n",
"\n",
"where $p$ is the total momentum of all particles in our case the rocket and ejected fuel. The external force $F$ could be air resistance or gravity for example. The momentum of rocket and exhaust produces\n",
"\n",
"$$\\displaystyle \\frac{d}{dt}(Mv)-(v-u)\\frac{dM}{dt}=F$$\n",
"\n",
"The term on the left is the change in the rocket's momentum and the second term that of the ejected fuel. The minus sign appears because the momentum of the ejected fuel is in the opposite direction to the rocket's motion. \n",
"Evaluating the first differential and simplifying gives\n",
"\n",
"$$\\displaystyle M\\frac{dv}{dt}+u\\frac{dM}{dt}=F$$\n",
"\n",
"The term $udM/dt$ is called the thrust and is in the opposite direction to the exhaust velocity. If there is no external force the remaining equation describes conservation of momentum, viz, \n",
"\n",
"$$\\displaystyle M\\frac{dv}{dt} + u\\frac{dM}{dt}=0$$\n",
"\n",
"Multiplying the last equation by $dt/M$ and integrating by recalling that $M$ is a function of time produces,\n",
"\n",
"$$\\displaystyle \\int_{v_0}^v dv = -u\\int_{M_0}^M \\frac{dM}{M}, \\qquad v - v_0 = u\\ln\\left(\\frac{M_0}{M}\\right)$$\n",
"\n",
"were $v_0$ is the initial velocity, $M_0$ the initial total mass which is that of rocket plus fuel, and $M$ is the mass of the rocket and any remaining fuel when the velocity is $v$.\n",
"\n",
"The rockets' speed only depends on the exhaust velocity and the fraction of the mass exhausted in that time interval needed to change the speed to $v$ from $v_0$. Notice also that the speed at any time does not depend on how quickly the fuel is used, this does not enter the calculation, but clearly the lower the rate of fuel consumption the longer it will take to reach a set velocity. \n",
"\n",
"If $m$ is the mass of the fuel and all is consumed then $M$ is the mass of the fuel empty rocket, $M_0=M+m$ and $v$ the maximum velocity, \n",
"\n",
"$$\\displaystyle v-v_0=u\\ln\\left(1+\\frac{m}{M}\\right)$$\n",
"\n",
"In a rocket it is therefore desirable to carry as much mass as fuel as possible so that $1+m/M)$ is large. Additionally, if the propellant is a cold gas, from the Kinetic Theory of Gases the r.m.s. speed of a gas decreases with atomic mass, i.e. $u$ is smaller for heavier than low atomic masses, so low atomic mass gases would seem to be preferred to make the final velocity as large as possible. \n",
"\n",
"## 10.5 Hooke's Law and simple harmonic motion\n",
"In the case of a force in a line towards the origin that is a fixed point, simple harmonic motion ensues if the force is described by Hooke's law \n",
"\n",
"$$\\displaystyle f (x) = -kx$$\n",
"\n",
"where $k$ is the force constant and $x$ the displacement from the origin. The minus sign indicates that the force is towards the origin; when $\\displaystyle d^2x/dt^2$ is negative $x$ is positive and vice versa. The equation of motion is now\n",
"\n",
"$$\\displaystyle \\frac{d^2x}{dt^2}=-\\frac{k}{m}x $$\n",
"\n",
"The frequency of vibration, or oscillation, is defined as \n",
"\n",
"$$\\displaystyle \\nu =\\frac{1}{2\\pi}\\sqrt{\\frac{k}{m}}\\, \\mathrm{s^{-1}},\\quad \\text{or as}\\quad \\omega=\\sqrt{\\frac{k}{m}}$$\n",
"\n",
"and substituting this makes the equation of motion\n",
"\n",
"$$\\displaystyle \\displaystyle\\frac{d^2x}{dt^2}=-\\omega^2x \\qquad\\tag{17}$$\n",
"\n",
"which when integrated gives \n",
"\n",
"$$\\displaystyle \\left(\\frac{dx}{dt}\\right)^2=-\\omega ^2x^2+c^2$$\n",
"\n",
"(see equation 14) and the constant is made $c^2$ as this has to be positive because the velocity $dx/dt$ must be a real not a complex number. Rearranging this equation to find the time gives\n",
"\n",
"$$\\displaystyle t=\\int\\frac{dx}{\\sqrt{c^2-\\omega^2x^2}}+c_1$$\n",
"\n",
"which is a standard integral giving \n",
"\n",
"$$\\displaystyle t=\\frac{1}{\\omega}\\sin^{-1}\\left( \\frac{\\omega x}{c} \\right) +c_1$$\n",
"\n",
"Thus \n",
"\n",
"$$ x=\\frac{c}{\\omega}\\sin(\\omega t-\\omega c_1) $$\n",
"\n",
"and the constants $c,\\;c_1$ are determined by the initial conditions and as they are constants this equation can just as correctly be written as\n",
"\n",
"$$\\displaystyle x=A\\sin(\\omega t+B) \\qquad\\tag{18} $$\n",
"\n",
"be defining $A$ and $B$ as constants also fixed by the initial conditions. $B$ is called the _phase angle_ of the sine wave and $A$ is the _amplitude_. Some authors give a cosine solution but this differs only by the phase from the sine; $\\sin(x) = \\cos(x \\pm \\pi/2)$. Furthermore, by the properties of sine and cosine functions, we can also write\n",
"\n",
"$$\\displaystyle x=\\alpha\\sin(\\omega t)+\\beta\\cos(\\omega t) \\qquad\\tag{19}$$\n",
"\n",
"where $\\alpha$ and $\\beta$ are new constants but still determined by the initial conditions.\n",
"If the initial velocity is $v_0$ and the position $x_0$ at $t$ = 0, then from (19) $x_0 = \\beta$ and\n",
"\n",
"$$\\displaystyle v=\\frac{dx}{dt}=\\alpha\\omega\\cos(\\omega t)-\\beta\\omega\\sin(\\omega t) $$\n",
"\n",
"which produces $\\nu_0=\\alpha\\omega$, thus \n",
"\n",
"$$\\displaystyle x=\\frac{v_0}{\\omega}\\sin(\\omega t)+x_0\\cos(\\omega t) \\qquad\\tag{20}$$\n",
"\n",
"and is dimensionally correct since $v_0/\\omega$ has dimensions of distance. This equation completely describes simple harmonic motion.\n",
"\n",
"The average value of the displacement $x$ over time of one or many whole vibrations should be zero. To prove this the equation needed is the displacement, such as eqn 18, and the time taken from zero to one period $t_0=1/v$ where $v$ is the frequency. Recall that $\\omega =2\\pi v$ and $B$ is a constant. \n",
"\n",
"$$\\displaystyle \\langle x\\rangle =\\frac{\\displaystyle \\int_0^{t_0} xdt}{\\displaystyle\\int_0^{t_0} dt}=v\\int_0^{t_0} A\\sin(\\omega t+B)$$\n",
"\n",
"Evaluating the integral gives \n",
"\n",
"$$\\displaystyle \\langle x\\rangle =-Av\\cos(2\\pi v t+B)\\Big|_0^{1/v} = A(\\cos(2\\pi+B)-\\cos(B) )=0$$\n",
"\n",
"because $\\cos(2\\pi+B)=\\cos(2\\pi)\\cos(B)-\\sin(2\\pi)\\sin(B)=\\cos(B)$.\n",
"\n",
"The average of the square of the displacement is not zero and is\n",
"\n",
"$$\\displaystyle \\langle x^2\\rangle =\\frac{\\int_0^{1/v} x^2dt}{\\int_0^{1/v} dt}=v\\int_0^{1/v} A^2\\sin^2(\\omega t+B)dt=\\frac{A^2v}{2}\\int_0^{1/v} (1-\\cos(4\\pi v t+2B)dt=\\frac{A^2}{2}$$\n",
"\n",
"using $\\cos(2\\theta)=1-2\\sin^2(\\theta)$ to simplify the integration. The integral using python/Sympy is "
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAC0AAAAVCAYAAADSM2daAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAABJ0AAASdAHeZh94AAADEklEQVR4nNXXW6h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": [
"$\\displaystyle \\frac{A^{2}}{2}$"
],
"text/plain": [
" 2\n",
"A \n",
"──\n",
"2 "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t, v, B, A = symbols('t, v, B, A', positive = True )\n",
"ans = integrate(A**2* v*( 1 - cos(4*pi*v*t+2*B ) )/2,(t,0,1/v) )\n",
"simplify(ans)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The square displacement gives the (time averaged) average potential (or displacement) energy as $V=kA^2/4$ obtained by integrating the force from Hook's law $f(x)=-kx$. The (time averaged) average kinetic energy has the same value because the total energy is $E=kA^2/2$ where $A$ is the maximum displacement which is at the turning point. \n",
"\n",
"The probability of being at position $x\\to x+dx$ can be found from the total energy by representing this as the sum of kinetic and potential parts. At extension $x$ kinetic part is effectively $mv^2/2$ for velocity $v$ and the potential $kx^2/2$. Thus\n",
"\n",
"$$\\displaystyle \\frac{m}{2}\\left( \\frac{dx}{dt}\\right)^2+\\frac{k}{2}x^2= \\frac{k}{2}A^2$$\n",
"\n",
"Separating out the derivative produces\n",
"\n",
"$$\\displaystyle \\frac{dx}{dt}=\\sqrt{\\frac{k}{m}\\left(A^2-x^2 \\right)}=2\\pi v\\sqrt{A^2-x^2}$$\n",
"\n",
"and isolating $dt$ gives\n",
"\n",
"$$\\displaystyle dt=\\frac{1}{2\\pi v\\sqrt{A^2-x^2}} dx $$\n",
"\n",
"which means that the time spent within limits $x\\to x+dx$ depends on $dx$ of the range considered. The probability of being at position $x \\to x+dx$ is this value as a fraction of the period $1/v$ this \n",
"\n",
"$$\\displaystyle pdx = \\frac{1}{\\pi \\sqrt{A^2-x^2}} dx $$\n",
"\n",
"This means that as $x\\to \\pm A$ the probability increases rapidly towards 1 but is small when $x0$.\n",
"\n",
"![Drawing](diffeqn-fig11a.png)\n",
"\n",
"Figure 11f. Energy levels and wavefunctions for a particle in a box. The mass used was that for an electron and the box is $1$ nm in length. Notice how the energy levels move apart as $n$ increases and how the number of nodes in the wavefunction also increases. A one dimensional box very approximately simulates a linear polyene, such as octatetraene.\n",
"_________\n",
"\n",
"## 11.6 The Rigid Rotor and a Particle on a Ring\n",
"\n",
"If the distance between two atoms is fixed, or if a particle is constrained to move on a circle, then the Schroedinger equation takes a simple form and the equation is essentially the same as for a harmonic oscillator. To describe motion in more than one dimension, the Schroedinger equation has coordinates in $x$ and $y$ if two dimensional, or $x$, $y$, and $z$ if the motion is three dimensional. Ratner & Schatz (2001) give a clear description of this problem and others in quantum mechanics relevant to Chemistry.\n",
"\n",
"The equation for two-dimensional motion is\n",
"\n",
"$$\\displaystyle -\\frac{\\hbar^2}{2m}\\left( \\frac{\\partial ^2\\psi}{\\partial x^2}+\\frac{\\partial ^2\\psi}{\\partial y^2}\\right) +V(x,y)\\psi=E\\psi $$\n",
"\n",
"which is a partial differential equation and is clearly rather complicated. First, to simplify the calculation, the rigid rotor or particle on a ring have zero potential energy so $V= 0$. It only remains to simplify the derivatives and this is done with a change to plane polar coordinates using (see Chapter 1 section 7)\n",
"\n",
"$$\\displaystyle x=r\\cos(\\theta) \\qquad y=r\\sin(\\theta) \\qquad r^2=x^2+y^2 $$\n",
"\n",
"The differential operator \n",
"\n",
"$$\\displaystyle \\nabla^2 =\\frac{\\partial^2}{\\partial x^2}+\\frac{\\partial^2}{\\partial y^2}$$\n",
"\n",
"is also changed into $r,\\;\\theta$ coordinates which gives \n",
"\n",
"$$\\displaystyle \\nabla^2 =\\frac{\\partial^2}{\\partial r^2}+\\frac{1}{r}\\frac{\\partial}{\\partial r}+\\frac{1}{r^2}\\frac{\\partial^2}{\\partial \\theta^2}$$\n",
"\n",
"(see question 3.114). Substituting produces\n",
"\n",
"$$\\displaystyle -\\frac{\\hbar^2}{2m}\\left(\\frac{\\partial^2}{\\partial r^2}+\\frac{1}{r}\\frac{\\partial}{\\partial r}+\\frac{1}{r^2}\\frac{\\partial^2}{\\partial \\theta^2}\\right) \\psi +V(r)\\psi = E\\psi \\qquad\\tag{26} $$\n",
"\n",
"The term in $\\theta$ describes the angular motion, and the other terms in $r$, the radial motion. In a rigid rotor or a particle on a ring, the radial part is constant which means that this part of the kinetic energy can be omitted, and as the potential energy $V$ is only a function of $r$ it is also a constant and can be ignored. Only the angular parts remain. \n",
"\n",
"There are two boundary conditions because the equation has second derivatives. Because the motion is circular, these conditions are (i) any wavefunction must have the same value after $2\\pi$ (360$^\\mathrm{o}$) rotation, or multiples of this, and (ii) that it has the same slope at this point. This means that the wavefunction repeats itself without a discontinuity see Fig. 10.26. The equation is now simplified using $\\varphi$ to represent the angular part of the wavefunction and $k^2=2mr^2/\\hbar^2$ ,\n",
"\n",
"$$\\displaystyle -\\frac{\\hbar^2}{2m}\\frac{1}{r^2}\\frac{\\partial^2\\varphi}{\\partial \\varphi^2}=E\\varphi \\qquad \\text{ or } \\qquad \\frac{\\partial^2\\varphi}{\\partial \\varphi^2}=-k^2\\varphi$$\n",
"\n",
"The distance $r$ is a constant, by definition for the rigid rotor, and $mr^2$ is the moment of inertia $I$ making $k^2 = 2IE/\\hbar^2$ and the energy is\n",
"\n",
"$$\\displaystyle E=\\frac{\\hbar^2k^2}{2I}$$\n",
"\n",
"The solution to the differential equation can be written down either as the sum of a sine and cosine or as exponentials. The latter is conventionally chosen making the solution\n",
"\n",
"$$\\displaystyle \\varphi =Ae^{ik\\theta}+Be^{-ik\\theta}$$\n",
"\n",
"The boundary conditions are that the wavefunction must reproduce itself exactly after $2\\pi$ radians, or $\\varphi(\\theta) = \\varphi(2\\pi + \\theta)$. This condition means that\n",
"\n",
"$$\\displaystyle Ae^{ik\\theta}+Be^{-ik\\theta} =Ae^{ik(2\\pi+\\theta)}+Be^{-ik(2\\pi +\\theta)}$$\n",
"\n",
"which will be true for any $A$ and $B$ if $\\displaystyle e^{ik\\theta} = e^{−ik\\theta} = 1$. This condition means that $k$ must be an integer with values $k = 0,\\,\\pm 1, \\,\\pm$ 2, $\\cdots$. Conventionally the solution $\\displaystyle \\varphi =Ae^{ik\\theta}$ is chosen and using the normalizing condition \n",
"\n",
"$$\\displaystyle N^2\\int_0^{2\\pi}\\varphi^*\\varphi d\\theta=1$$\n",
"\n",
"the wavefunction is;\n",
"\n",
"$$\\displaystyle \\varphi=\\frac{1}{\\sqrt{2\\pi}} e^{ik\\theta} \\qquad\\tag{27}$$\n",
"\n",
"The quantum numbers are $k = 0, \\pm 1, \\pm 2, \\cdots$ and as the lowest value is zero, this means that the minimum energy is zero and the rotor is stationary. As $k \\ne 0$ can be positive or negative it indicates that the rotor moves to the right or left and that these levels are each doubly degenerate. \n",
"\n",
"As the lowest energy is zero it initially suggests that the Heisenberg uncertainty principle $\\Delta \\theta \\Delta p \\ge \\hbar/2$ is not obeyed. However, when $J = 0$ the wavefunction is a constant, $1/ (2\\pi)$, so we cannot know what angle the rotor has and this means that $\\Delta \\theta \\Delta p \\ne 0$. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 11.7 Bernoulli Principle, fluid flow in a pipe\n",
"\n",
"The density of a flowing liquid is generally constant as the pressure changes and when this is so the liquid is considered to be *incompressible*. If a liquid flows towards a narrowing in a pipe, then the static pressure of the liquid is higher in the wider part of the pipe and the flow is slow, whereas in its narrow part the flow is increased and the static pressure reduced. This is called Bernoulli's Principle.\n",
"\n",
"![Drawing](diffeqn-fig11c.png)\n",
"\n",
"Figure 11g. Sketch showing Bernoulli's Principle.\n",
"___________\n",
"\n",
"Bernoulli's equation can be derived using Newton's $2^{nd}$ law of motion. Suppose that the pipe is horizontal, so the effect of gravity can be ignored, and a small volume of liquid of length $dx$ is flowing at speed $v=dx/dt$. The pipe has a cross-sectional area $A$ and the liquid has the same density $\\rho$ at all points and is $\\rho=m/Adx$ so that the mass of liquid in volume $Adx$ is $m=\\rho Adx$. The pressure change over length $dx$ is $dp$. The force on the volume is therefore $f=-Adp$ because pressure is force/area$. Using Newton's second law; force equals mass times acceleration,\n",
"\n",
"$$\\displaystyle f=m\\frac{d^2x}{dt^2}=m\\frac{dv}{dt}$$\n",
"\n",
"substituting for force and mass gives\n",
"\n",
"$$\\displaystyle -Adp=\\rho Adx\\frac{dv}{dt}, \\qquad\\to\\qquad -\\frac{dp}{dx}=\\rho \\frac{dv}{dt}$$\n",
"\n",
"To proceed further it is now necessary to deal with the derivative in time. This can be done as velocity is distance/time. Rewriting the acceleration gives\n",
"\n",
"$$\\displaystyle \\frac{dv}{dt}=\\frac{dv}{dx}\\frac{dx}{dt}=\\frac{dv}{dx}v=\\frac{d}{dx}\\left(\\frac{v^2}{2}\\right)$$\n",
"\n",
"and by substituting produces\n",
"\n",
"$$\\displaystyle -\\frac{dp}{dx}=\\rho \\frac{d}{dx}\\left(\\frac{v^2}{2}\\right)$$\n",
"\n",
"which rearranges to \n",
"\n",
"$$\\displaystyle\\frac{d}{dx}\\left(\\frac{\\rho}{2}v^2+p\\right)=0$$\n",
"\n",
"and when integrated gives the Bernoulli equation,\n",
"\n",
"$$\\displaystyle \\frac{v^2}{2}+\\frac{p}{\\rho}=C$$\n",
"\n",
"where $C$ is a constant that depends on the particular fluid used. We can see from this equation that Bernoulli's principle is obeyed because when the pressure is high the speed must be low and vice versa because $\\displaystyle v^2/2+p/\\rho$ is a constant. \n",
"\n",
"If there is a difference in height $z$ in the flow then\n",
"\n",
"$$\\displaystyle \\frac{v^2}{2}+gz+\\frac{p}{\\rho}=C$$\n",
"\n",
"where $g$ is the acceleration due to gravity and is the general form of the equation and shows that the pressure plus the sum of kinetic and potential energy is a constant. "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"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.9.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
}