Difference between revisions of "Differential Equations (Mathematical Modeling)"

From Department of Mathematics at UTSA
Jump to navigation Jump to search
Line 190: Line 190:
 
* [https://mathresearch.utsa.edu/wikiFiles/MAT1193/Differential%20Equations%20(Mathematical%20Modeling)/Presentation17_Setting%20Up%20Differential%20Equations.pptx Setting up Differential Equations]. PowerPoint file created by Professor Cynthia Roberts, UTSA.
 
* [https://mathresearch.utsa.edu/wikiFiles/MAT1193/Differential%20Equations%20(Mathematical%20Modeling)/Presentation17_Setting%20Up%20Differential%20Equations.pptx Setting up Differential Equations]. PowerPoint file created by Professor Cynthia Roberts, UTSA.
 
* [https://en.wikibooks.org/wiki/A-level_Mathematics/MEI/DE/Introduction_to_Differential_Equations/Using_Differential_Equations_in_Modelling Using Differential Equations in Modelling], Wikibooks: Introduction to Differential Equations (A-level Mathematics)
 
* [https://en.wikibooks.org/wiki/A-level_Mathematics/MEI/DE/Introduction_to_Differential_Equations/Using_Differential_Equations_in_Modelling Using Differential Equations in Modelling], Wikibooks: Introduction to Differential Equations (A-level Mathematics)
* [https://en.wikibooks.org/wiki/Ordinary_Differential_Equations/Simple_Harmonic_Motion Simple Harmonic Motion], Wikibooks: Differential Equations
+
* [https://en.wikibooks.org/wiki/Ordinary_Differential_Equations/Separable_2 Separable equations], Wikibooks: Ordinary Differential Equations
 +
* [https://en.wikibooks.org/wiki/Ordinary_Differential_Equations/Simple_Harmonic_Motion Simple Harmonic Motion], Wikibooks: Ordinary Differential Equations

Revision as of 11:59, 15 October 2021

Introduction to Differential Equations

Key points

  • A differential equation is an equation involving a derivative.
  • The order of a differential equation is the order of the highest derivative.
  • Differential equations are used to model situations which involve rates of change.
  • The solution to a differential equation gives a relationship between the variables themselves, not the derivatives.
  • The general solution of a first order differential equation satisfies the differential equations and has a constant of integration in its solution.
  • The particular solution of a differential equation is one in which additional information has been used to calculate the constant of integration.
  • The general solution may be represented by a family of curves and the particular solution is one of that family.
  • To verify that a function is a particular solution, you must check that it satisfies the differential equation and initial conditions.

How does the quantity of drug in the body vary with time? How long does it take a cup of coffee take to cool? After how many days will the moon take the same shape again? These question all have on thing in common. They have a quantity that is continuously changing. We see change in most things in life. Some changes are permanent; like the temperature of coffee. Some have repeating patterns, like the cycle of the moon.

You have already studied a lot of mathematics to describe these changes, but never really put that into real life applications. You will know from previously studies calculus that the rate of change of a quantity is called a derivative. If an equation contains a derivative, it is a differential equation.

The simplest form of a differential equation is to show the rate of change of one variable with respect to another like:

  • 1.Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{dy}{dx} = x + y} ,
  • 2.

These are 2 very basic examples of differential equations. You will learn how to solve them in later sections.

A solution to a differential equation gives a relationship between the variables, which doesn't involve a derivative. The solutions to the differential equations above are given by:

  • 1.
  • 2.

(where C and A are constants of integration)

Differential equations begin to get more complicated where higher derivatives are involved (Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{d^2y}{dx^2}} ), or if they included more variables.

Modeling

In order to solve any problem successfully, you need to develop a mathematical model that describes the situation adequately. In this module you will learn how to solve problems which can be solved using differential equations.

With some problems you can go straight into the mathematics. This is usually the case where you have already have some models that you can apply to the situation. These usually include; but are not limited to newtons laws of motion, and many kinematics problems (stuff in mechanics 1, basically.)Because of this your solution to a problem will depend on assumptions and simplifications you made; like ignoring air resistance, or assuming constant mass, ect. This can sometimes give significant errors in your solution. Collecting data can help see if your model is off or not.

Some problems will need their own model developed, however. This means you will need to do some experiments to find a correlation between the results you get. This will help with understanding the problem better, and help you formulate a mathematical model.

Examples

Pharmaceutical example

You have been asked to find out how much of an antidepressant is left in the body after a given time of taking the pill. How would you do this? Well the process of removing a drug from the body varies with the drug. The kidney plays the most important rule, doing something called renal clearance. The rate of this can be measured by taking urine samples.

Lets make some assumptions about the problem:

  • Once the pill has been taking, it is instantly absorbed into the body
  • The drug is removed from the bloodstream via renal clearance.
  • The rate of renal clearance is proportional to the quantity of the drug in the body

We can now formulate a model. Let 't' be time in hours, and 'q' be the amount of drug in the body (in mg). this means that:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{dq}{dt} \propto q }

we replace the proportional sign:

where k is a positive constant of proportionality, and the negative sign is there because the amount of drug is decreasing.

We will show later that the solution to the differential equation is:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle q=Ae^{-kt}} , Where A is a constant of integration. Although we have not shown this solution is true, we can check that is is a solution by differentiating it.

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{dq}{dt} = A(-ke^{-kt}) = -kAe^{-kt} }

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{dq}{dt}=-kq } , so therefore we have shown that it is a solution

Now we need to find values for A and k,for this we will need some experimental results:

  • In the morning a man takes 40 mg of the antidepressant
  • Every hour, approximately 5% of it is gone

We now let t=0, and q=40

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 40=Ae^{0}=A }

in this case our constant of integration, A, is 40. So therefore:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle q=40e^{-kt} }

Now lets find k. We know that every hour the amount of drug decreases by 5% every hour, so when t=1, q=(0.75)*40=38

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 38=40e^{-k} }

Dividing each side by 40, and taking logs of each side gives that:

This gives that:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle q=40e^{-0.0513k} }

The Differential Equation of Free Motion or SHM

Finally, if we set the equation above equal to zero, we end up with the following:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle m\ddot x+kx=0}

Since our leading coeffiecient should be equal to 1, we divide by the mass to get:

If we set , we'll have our final form of this equation:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \ddot x+\omega^2x=0}

The above equation is known to describe Simple Harmonic Motion or Free Motion.

Initial Conditions

With the free motion equation, there are generally two bits of information one must have to appropriately describe the mass's motion.

  1. The starting position of the mass. Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x_2}
  2. The starting direction and magnitude of motion.

Generally, one isn't present without the other. For simplicity, we will consider all displacement below the equilibrium point as Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x>0} and above as Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x<0} .

For upward motion , and for downward motion Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle v>0} .

Solution

Multiplying this equation by Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \dot x} gives:

The first and the second addends are exact derivatives, so this equation may be integrated to obtain the following relation:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle m\frac{{\dot x}^2}{2}+k\frac{x^2}{2}=E}

The first addend of this relation is known as the kinetic energy of the mass and the second — as the potential energy of the spring. The above integral represents the energy conservation law. This is also a first order separable differential equation. It may be rewritten as

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{dx}{\sqrt{\frac{2 E}{m}-\frac{k}{m}x^2}}=\pm dt}

The integration of this relation gives


Or, finally rearranging the result, substituting Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \omega = \sqrt{k/m}} , and solving for Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x} we obtain

Exponential Growth and Decay

One of the most common differential equations in science is

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle y'=ky \,} .

The solution to this is

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle y=Ce^{kt} \,} .

If k is positive, this is called exponential growth. If k is negative, its exponential decay. Both are used in science, for very different reasons.

Population Growth

Lets say we have a group of animals in the wild. We want to know how many animals there will be in t years. We know how many there are now. We also know the birth rate and death rate. Can we solve this problem?

Of course we can. First, we need to figure out the rate of growth. If the birth rate is B, and the death rate is D, the total rate of change is (B-D). Since this is the rate, we need to multiply it by the current population to get the population growth. The final equation looks like

where P is the population. That looks like the equation for exponential growth, doesn't it? As a matter of fact, change the 'delta' to a differential, and it is. The growth factor is (B-D).

Example

In a certain population of rabbits, the birth rate is 10%. The death rate is 15%. The initial population is 100. How many rabbits are there after 10 years? Will we always have rabbits?

From our solution to the exponential equation:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P=Ce^{(B-D)t} \,}
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 100=Ce^{(B-D)\times 0}=Ce^0 \,}
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle C=100 \,}
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P=100e^{-0.05t} \,}
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(10)=100e^{-0.5}\approx 61}

Unfortunately, we will not always have rabbits. Since the growth rate is negative, they will eventually go extinct. (Note: we will never actually hit 0, but in real life you can't have less than 1 rabbit. If we were measuring a continuous property instead of a discrete one, we would always have something, it would just get very small).

Radioactive Decay

Another situation for exponential growth is radioactive isotopes. If you have a sample of radioactive material, individual atoms will randomly decay or not decay. While you can't know exactly how many atoms decay and when, you do know the average rate of decay. Every λ years, half of the atoms left will decay. This period of time, λ, is called a half life. The activity of the sample (how many decays per second) is called A. Mathematically, this looks like

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{dA}{dt}=\lambda A}

These problems look just like the problem above. Just like rabbits, we will eventually run out of radioactive atoms as well.

Other Applications

Many fundamental laws of physics and chemistry can be formulated as differential equations. In biology and economics, differential equations are used to model the behavior of complex systems. The mathematical theory of differential equations first developed together with the sciences where the equations had originated and where the results found application. However, diverse problems, sometimes originating in quite distinct scientific fields, may give rise to identical differential equations. Whenever this happens, mathematical theory behind the equations can be viewed as a unifying principle behind diverse phenomena. As an example, consider the propagation of light and sound in the atmosphere, and of waves on the surface of a pond. All of them may be described by the same second-order partial differential equation, the wave equation, which allows us to think of light and sound as forms of waves, much like familiar waves in the water. Conduction of heat, the theory of which was developed by Joseph Fourier, is governed by another second-order partial differential equation, the heat equation. It turns out that many diffusion processes, while seemingly different, are described by the same equation; the Black–Scholes equation in finance is, for instance, related to the heat equation.


Resources