Computational Neuroscience. Session 1-2 Dr. Marco A Roque Sol 05/29/2018
Definitions Differential Equations A differential equation is any equation which contains derivatives, either ordinary or partial derivatives of an unknown function. Ordinary and Partial Differential Equations A differential equation is called an ordinary differential equation, abbreviated by ODE, if it has only ordinary derivatives in it, having the form: F (y (n), y (n 1),..., y, y(t), t) = 0 Likewise, a differential equation is called a partial differential equation, abbreviated by PDE, if it has partial derivatives in it.
Definitions There many situations where we can find such an object. Thus, for instance in the case of the study of Classical Mechanics in Physics, if an object of mass m is moving with acceleration a and being acted on with force F then NewtonâĂŹs Second Law tells us. F = ma To see that this is in fact a differential equation. First, remember that we can rewrite the acceleration, a, in one of two ways. a = dv dt or a = d 2 u dt 2 Where v is the velocity of the object and u is the position function of the object at any time t. We should also remember at this point that the force, F may also be a function of time, velocity, and/or position.
Definitions m dv dt = F (t, v) or m d 2 u = F (t, u, v) dt2 More examples of differential equations 2y + 3y 5y = 0 cos(y) d 2 y (1 + y)dy dx 2 dx + y 3 e y = 0 y (4) + 5y 4y + y = sin(x) a 2 2 u x 2 = u t a 2 2 u x 2 = 2 u t 2 u 3 2 x t = 1 + u y
Classification Order The order of a differential equation is the largest derivative present in the differential equation. The equation m dv dt = F (t, v) is a first order differential equation, the equations m d 2 u = F (t, u, v) dt2 2y + 3y 5y = 0 cos(y) d 2 y (1 + y)dy dx 2 dx + y 3 e y = 0
Classification a 2 2 u x 2 = u t a 2 2 u x 2 = 2 u t 2 are second order differential equations, the equation u 3 2 x t = 1 + u y is a third order differential equation and finally, the equation y (4) + 5y 4y + y = sin(x) is a fourth order differential equation. Note that the order does not depend on whether or not you ve got ordinary or partial derivatives in the differential equation.
Definitions Solution A solution to an ordinary differential equation (ODE) on an interval α < t < β is any function y(t) which satisfies the differential equation in question on the interval. It is important to note that the solutions are often accompanied by intervals and these intervals can impart some important information about the solution.
Classification Linear Differential Equations A linear differential equation is any differential equation that can be written in the following form. a n (t)y (n) + a n 1 (t)y (n 1) +... + a 1 (t)y + a 0 (t)y = g(t) The important thing to note about linear differential equations is that there are no products of the function and its derivatives, and neither the function or its derivatives occur to any power other than the first power.
Classification The coefficients a n (t),..., a 0 (t), g(t) can be any function. Only the function y(t) and its derivatives are used in determining if a differential equation is linear. If a differential equation cannot be written in the above form, then it is called a non-linear differential equation. In the examples above only cos(y) d 2 y (1 + y)dy dx 2 dx + y 3 e y = 0 is a non-linear equation. Note that we can t classify Newton s Second Law equations since we do not know what form the function F has. These could be either linear or non-linear depending on F.
Differential Equations in Physics Schrödinger s Equation. h2 2m 2 Ψ + V (r)ψ = i h Ψ t Is the starting point for non-relativistic Quantum Mechanics, here the solution Ψ( r, t) is the wave function. In the one-dimensional case, If we substitute into the above equation, the proposed solution Ψ(x, t) = ψ(x)φ(t)
we get h2 2m ψ (x)φ(t) + V (x)ψ(x)φ(t) = i hψ(x)φ (t) Dividing the whole equation by ψ(x)φ(t) we get h2 ψ (x) 2m ψ(x) + V (x) = i h φ (t) φ(t) = constant = E So we obtain two ODE s.
First, The Time Independent Schrödinger Equation h2 d 2 ψ(x) 2m dt 2 + V (x)ψ(x) = Eψ(x) and second, The Energy Eigenvalue Equation i h dφ(t) dt = Eφ(t)
Maxwell s equations: Ē = ρ ɛ 0, (1a) B = 0, Ē = B t, B = µ 0 ɛ 0 Ē t (1b) (1c) + µ 0 J, (1d) This is the set of fundamental equations for Classical Electromagnetism, here the solutions Ē and B represent the electrical and magnetic fields.
In the vacuum ρ = J = 0. Maxwell Equations can be written as 2 Ē = µ 0 ɛ 0 2 Ē t 2 2 B = µ 0 ɛ 0 2 B t 2 Each one of these is 3 PDE s. Consider the one-dimensional case for the Electrical Field 2 E x 2 = µ 2 E 0ɛ 0 t 2 Now, suppose that E(x, t) = X(x)T (t) making this substitution we get
X (x)t (t) = µ 0 ɛ 0 X(x)T (t) dividing by X(x)T (t) X (x) X(x) = µ 0ɛ 0 T (t) T (t) = constant = a Thus, we have to solve a couple of ODE s d 2 X(x) dx 2 = ax(x); µ 0 ɛ 0 T (t) = at (t)
Newton s Second Law. m d 2 r dt 2 = F ( r, t) Is the fundamental equation for Classical Mechanics, here the solution r(t) is the position as a function of time. In this case we have one independent variable, the time t. Solving any particular case of a Force bring us immediately to solving an ODE.
Consider the Gravity near earth s surface m d 2 r dt 2 = mg ˆk That vector equation is equivalent to the next three ODE s m d 2 x dt 2 = 0 m d 2 y dt 2 = 0 m d 2 z dt 2 = mg
Example 1.1 Show that y(x) = x 3/2 is a solution to 4x 2 y + 12xy + 3y = 0 for x > 0. Solution We will need the first and second derivatives : y (x) = 3 2 x 5/2, y (x) = 15 4 x 7/2 Plug these as well as the function into the differential equation:
4x 2 ( 15 4 x 7/2 ) + 12x( 3 2 x 5/2 ) + 3x 3/2 = 0 15x 3/2 18x 3/2 + 3x 3/2 = 0 0 = 0 So, y(x) = x 3/2 does satisfy the differential equation and hence is a solution. Why then didn t I include the condition that x > 0? I did not use this condition anywhere in the work showing that the function would satisfy the differential equation.
To see why recall that y(x) = x 3/2 = 1 x 3/2 In this form it is clear that we will need to avoid x = 0 at the least as this would give division by zero. So, we saw in the last example that even though a function may symbolically satisfy a differential equation, because of certain restrictions brought about by the solution we cannot use all values of the independent variable and hence, must make a restriction on the independent variable.
In the last example, note that there are in fact many more possible solutions to the differential equation. For instance all of the following are also solutions y(x) = x 1/2 y(x) = 5x 3/2 y(x) = 3x 1/2 y(x) = 2x 1/2 + 3x 3/2
I ll leave the details to you to check that these are in fact solutions. Given these examples can you come up with any other solutions to the differential equation? y(x) = c 1 x 1/2 + c 2 x 3/2 There are in fact an infinite number of solutions to this differential equation. So, given that there are an infinite number of solutions to the differential equation in the last example, we can ask a natural question. Which is the solution that we want or does it matter which solution we use? This question leads us to the next material in this section.
Example 1.2 Show that y(x) = x 3/2 is a solution to 4x 2 y + 12xy + 3y = 0 with initial conditions y(4) = 1 8 and y (4) = 3 64. Solution As we saw in previous example the function y(x) = x 3/2 is a solution and we can then note that y(4) = 4 3/2 = 1 4 3/2 = 1 8 y (4) = 3 2 4 5/2 = 3 1 2 4 = 3 5/2 64 and so this solution also meets the initial conditions.
In fact, y(x) = x 3/2 is the only solution to this differential equation that satisfies these two initial conditions. Initial Value Problem An Initial Value Problem (or IVP) is a differential equation along with an appropriate number of initial conditions. Example 1.3 The following is an example of IVP 4x 2 y + 12xy + 3y = 0, y(4) = 1 8, and y (4) = 3 64.
Example 1.4 This is another example of an IVP 2ty + 4y = 3, y(1) = 4. As you can notice, the number of initial conditions required will depend on the order of the differential equation. Interval of Validity The interval of validity for an IVP with initial condition(s). y(t 0 ) = y 0, y (t 0 ) = y 1,..., y k (t 0 ) = y k
is the largest possible interval on which the solution is valid and contains t 0. These are easy to define, but can be very difficult to find in the practice. General Solution The general solution to a differential equation is the most general form that the solution can take and doesn t take any initial conditions into account.
Example 1.5 y(t) = 3 4 + c t 2 is the general solution to the equation 2ty + 4y = 3 Check it out!!!!!! In fact, all solutions to this differential equation will be in this form. This is one of the first differential equations that we will learn how to solve and we will be able to verify this shortly.
Particular Solution The particular solution to a differential equation is the specific solution that not only satisfies the differential equation, but also satisfies the given initial condition(s). Example 1.6 What is the particular solution to the following IVP? 2ty + 4y = 3 y(1) = 4
Solution This is actually easier to do than it might, the general solution is of the form: y(t) = 3 4 + c t 2 All what we need is to determine the value of c that will give us the solution that we are after. To find this, all we need to do is use our initial condition as follows: 4 = 3 4 + c 1 2
c = 4 3 4 = 19 4 So, the particular solution to the IVP is: y(t) = 3 4 19 4t 2
Implicit/Explicit Solution An explicit solution is any solution that is given in the form y = y(t). An implicit solution is any solution that is not in explicit form, that is, y can not be expressed explicitly as a function of t. Note that it is possible to have either general implicit/explicit solutions and particular implicit/explicit solutions. Example 1.7 Show that y 2 = t 2 3 is an implicit solution of the differential equation yy = t.
Solution Using implicit derivation, the solution follows: 2yy = 2t + 0 yy = t Example 1.8 Find a particular explicit solution to the IVP yy = t y(2) = 1
Solution We already know from the previous example that an implicit solution to this IVP is y 2 = t 2 3. To find the explicit solution all we need to do is solve for y(t) from y(t) = ± t 2 3 Now, we ve got a problem here. There are two functions here and we only want one and in fact only one will be the correct!!! We can determine the correct function by reapplying the initial condition.
Only one of them will satisfy the initial condition. In this case we can see that the negative solution, will be the correct one. The explicit solution is then y(t) = t 2 3 In this case we were able to find an explicit solution to the differential equation. It should be noted however that it will not always be possible to find an explicit solution.
Example 1.9 A spherical raindrop evaporates at a rate proportional to its surface area. Write a differential equation for the volume of the raindrop as a function of time. Solution If the volume at time t is denoted by V (t) and the surface at time t is denoted by S(t), then the fact that raindrop evaporates at a rate proportional to its surface area can be write as dv (t) dt proportional to S(t) dv (t) dt = αs(t)
were α is a constant of proportionality. But, we have the following relationship this implies that V = 4 3 πr 3 = r = [ 3V 4π ]1/3 dv (t) dt = αs(t) = 4πr 2 = 4απ[ 3V 4π ]2/3 = 4απ[ 3 4π ]2/3 V 2/3 where c is a constant. dv (t) dt = cv 2/3
Example 1.10 A certain drug is being administered intravenously to a hospital patient. Fluid containing 5mg/cm 3 of the drug enters the patientâăźs bloodstream at a rate of 100cm 3 /h. The drug is absorbed by body tissues or otherwise leaves the bloodstream at a rate proportional to the amount present, with a rate constant of 0.4(h) 1. (a) Assuming that the drug is always uniformly distributed throughout the bloodstream, write a differential equation for the amount of the drug that is present in the bloodstream at any time. (b) How much of the drug is present in the bloodstream after a long time?
Solution (a) If the drug is always uniformly distributed throughout the bloodstream, and the amount of the drug in mg at time t is denoted by Q(t), then the equation that we will use is a balance equation Rate of change of Q(t) = Rate at which Q(t) enters the bloodstream - Rate at which Q(t) exits the bloodstream dq dt dq dt = drug entering drug exiting = (concentration)(rate of entering) (concentration)(rate of exitin
dq = (5)(100) Q(t)(0.4) dt and the final equation is (b) dq dt = 500 Q(t)(0.4) Q (t) = 500 Q(t)(0.4) Q (t) 500 Q(t)(0.4) = 1
d ln 500 Q(t)(0.4) /0.40 = 1 dt ln 500 Q(t)(0.4) = 0.4t + c 500 Q(t)(0.4) = e 0.4t+c = ce 0.4t 500 ce t Q(t) = 0.4 Thus, in the long run the amount of drug present is... 500/0.4 = 20 mg!!!