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

From Department of Mathematics at UTSA
Jump to navigation Jump to search
Line 32: Line 32:
 
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.
 
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. Colecting data can help see if your model is off or not.
+
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 devolped, however. This means you will need to do some experiments to find a corrolation between the results you get. This will help with understanding the problem better, and help you formulate a mathematical model.
+
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.
  
===Example===
+
==Examples==
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.
+
===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:
 
Lets make some assumptions about the problem:
Line 50: Line 51:
 
we replace the proportional sign:
 
we replace the proportional sign:
  
<math>\frac{dq}{dt} = -kq </math> where k is a postive constant of proportionality, and the negitive sign is there because the ammount of drug is decreasing.
+
<math>\frac{dq}{dt} = -kq </math> 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:
 
We will show later that the solution to the differential equation is:
Line 86: Line 87:
  
 
<math> q=40e^{-0.0513k} </math>
 
<math> q=40e^{-0.0513k} </math>
 +
 +
===The Differential Equation of Free Motion or SHM===
 +
Finally, if we set the equation above equal to zero, we end up with the following:
 +
<p align="center"><math>m\ddot x+kx=0</math></p>
 +
Since our leading coeffiecient should be equal to 1, we divide by the mass to get:
 +
<p align="center"><math>\ddot x+\frac{k}{m}x=0</math></p>
 +
If we set <math>\omega^2=\frac{k}{m}</math>, we'll have our final form of this equation:
 +
<p align="center"><math>\ddot x+\omega^2x=0</math></p>
 +
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.
 +
#The starting position of the mass. <math>x_2</math>
 +
#The starting direction and magnitude of motion. <math>v</math>
 +
Generally, one isn't present without the other. For simplicity, we will consider all displacement below the equilibrium point as <math>x>0</math> and above as <math>x<0</math>.
 +
 +
For upward motion <math>v<0</math>, and for downward motion <math>v>0</math>.
 +
 +
====Solution====
 +
Multiplying this equation by <math>\dot x</math> gives:
 +
<p align="center"><math>m\ddot x \dot x+k x \dot x=0</math></p>
 +
The first and the second addends are exact derivatives, so this equation may be integrated to obtain the following relation:
 +
<p align="center"><math>m\frac{{\dot x}^2}{2}+k\frac{x^2}{2}=E</math></p>
 +
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
 +
<p align="center"><math>\frac{dx}{\sqrt{\frac{2 E}{m}-\frac{k}{m}x^2}}=\pm dt</math></p>
 +
The integration of this relation gives
 +
 +
<!--
 +
the following doesn't look right, I think it should be arcsin given that it is dx and not -dx.
 +
 +
I believe it should read:
 +
 +
<p align="center">
 +
  <math>\arcsin x\sqrt{\frac{k}{2E}} = \pm \sqrt{\frac{k}{m}} t + \varphi</math>
 +
</p>
 +
 +
Finally, by rearranging the result, substituting <math>\omega = \sqrt{k/m}</math>, and solving for <math>x</math> we obtain
 +
 +
<p align="center">
 +
  <math>x = \sqrt{\frac{2E}{k}}\sin(\omega t + \varphi)</math>
 +
</p>
 +
-->
 +
 +
<p align="center"><math>\arccos x\sqrt{\frac{k}{2E}} = \pm \sqrt{\frac{k}{m}} t + \varphi</math></p>
 +
Or, finally rearranging the result, substituting <math>\omega = \sqrt{k/m}</math>, and solving for <math>x</math> we obtain
 +
<p align="center"><math>x = \sqrt{\frac{2E}{k}}\cos (\omega t + \varphi)</math></p>
  
  
Line 91: Line 138:
 
* [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

Revision as of 11:47, 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.,
  • 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 (), 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:

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:

, 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.

, 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

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

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

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

This gives that:

The Differential Equation of Free Motion or SHM

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

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:

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.
  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 and above as .

For upward motion , and for downward motion .

Solution

Multiplying this equation by gives:

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

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

The integration of this relation gives


Or, finally rearranging the result, substituting , and solving for we obtain


Resources