class: center, middle, inverse, title-slide .title[ # Introduction to ODEs ] .subtitle[ ## Session 01 ] .author[ ### Alejandro Ucan ] .date[ ### 2024-09-15 ] ---
# Session's Goals * Define ODEs. <br/><br/> * Modelling using ODEs. <br/><br/> * Qualitative Analysis of ODEs. <br/><br/> --- # What we understand for Modelling? > **Definition:** A model is a simplified (mathematical) representation of a real problem. <br/><br/> 1. Clear hypothesis where the problem is based (it must describe the relationship between the quantities to be studied). <br/> 1. Define the variables and parameters involved in the problem. <br/> 1. Use the hypotheses to generate equations that relate the variables and parameters. <br/> 1. Solve the equations to obtain the solution. <br/><br/> --- ## A growing population problem -- > **Hyphotesis:** The infection rate of a virus in cells is proportional to the number of infected cells. <br/><br/> -- **Variables and parameters:** <br/> * `\(P(t)\)`: Population at time `\(t.\)` <br/> * `\(k\)`: Proportionality constant. <br/><br/> -- **Equation:** Remember that the growth rate is a _rate of change_: `$$\frac{dP}{dt}=kP.$$` --- ## What happens if we change my hypothesis? > **Hyphotesis 1:** If the population of infected cells is small then the growth rate is proportional to the elements of the population. But if the population is too large (to be supported), the population will begin to decrease. <br/><br/> -- **Variables and parameters:** <br/> * `\(P(t)\)`: Population at time `\(t.\)` <br/> * `\(k\)`: Proportionality constant. <br/><br/> * `\(N\)`: Population limit. <br/><br/> -- **Equation:** $$ \frac{dP}{dt}=kP(1-\frac{P}{N}).$$ --- # What is an ODE? > **Definition:** An _ordinary differential equation_ is an equation whose unknown is a function and involves derivatives (of the unknown) and the independent variable. `$$f(y^{(n)},y^{(n-1)},\cdots, y',y,x)=0$$`<br/><br/> * The independent variable is the variable with respect to which the functions are derived. <br/> * The dependent variable is the function to be found. <br/><br/> * The order of the equation is the order of the highest derivative that appears in the equation. <br/><br/> * The ODE is linear if the functions and their derivatives appear raised to the first power and are not multiplied together. <br/><br/> * The ODE is non-homogeneous if the ODE has an independent term (function of the independent variable) different from zero. --- ## Examples of ODEs * **Generic:** `\(yy'-\sin(x)=3y,\)` `\(y''-2y+\sqrt{3x}=0,\)` etc. <br/><br/> * **Homogeneous:** `\(y'+y=0,\)` `\(y'y=0,\)` `\(\sqrt{y''-3xy}=0,\)` etc. <br/><br/> * **Linear:** `\(y'+y=3x,\)` `\(3y'''+2y''-xy=0,\)` etc. <br/><br/> --- ## Solutions of an ODE. > **Definition:** We say that `\(f\)` is a function defined on a certain interval `\(I,\)` with continuous derivatives in `\(I\)` (as many derivatives as the order of the equation) is a solution of a differential equation if when we substitute the function we obtain an identity. **Example:** The function `\(f(x)=e^x\)` defined in `\(\mathbb{R},\)` is a solution of the ODE `$$y'-y=0.$$` Let's see, `\(f'(x)=e^x\)` and if `\(y=f(x),\)` then `$$y'-y=e^x-e^x=0.$$` Is it true if we substitute `\(y=4e^x\)` in the ODE `\(y'-y=0\)`? --- ## Solution by Curves > **Definition:** The graph of a function solution to an ODE is known as a solution curve. Note that the solution curve may differ from the graph of the function given that the solution curve **depends on the interval of definition of the solution.**<br/><br/> **Example:** Consider the equation `\(xy'+y=0.\)` The function `\(y=f(x)=1/x\)` is a solution, but remember that `\(f(x)\)` is not differentiable at `\(x=0,\)` so we must define the interval we will take, if `\((-\infty,0)\)` or `\((0,\infty).\)` --- ### Implicit Solutions. > **Definition:** Sometimes the ODE can be satisfied by a relationship `\(G(x,y)\)` (equation involving `\(x\)` and $y), but always with the premise that there is a function that satisfies this relationship that will behave as the solution of the ODE. -- <br/><br> ** Example:** The relationship `\(x^2+y^2=k^2\)` is a solution of the equation `\(yy'+x=0.\)` And the associated functions are `\(f(x)=\sqrt{k^2-x^2}\)` and `\(f(x)=-\sqrt{k^2-x^2}\)` in their respective intervals of definition. --- # Growth and Decay Problems > **Hyphotesis:** In these problems, the central hypothesis is that the rate of change of a certain quantity is in proportion to its population or quantitie at any moment. <br/><br/> * If the proportionality constant is positive, then we say it is _growth._ <br/> * If the proportionality constant is negative, then we say it is _decay._ <br/><br/> <br/><br/> -- The ODE that models these problems is `$$\frac{dP}{dt}=kP.$$` --- # In and Out Problems > **Hyphotesis:** In these problems, the central hypothesis is that the rate of change of a certain quantity is in proportion to the difference between the quantity and the quantity of the medium in which it is found. <br/><br/> * If the proportionality constant is positive, then we say it is _inflow._ <br/> * If the proportionality constant is negative, then we say it is _outflow._ <br/><br/> <br/><br/> -- The ODE that models these problems is `$$\frac{dP}{dt}=k(P-P_m).$$` --- ### Examples of These: > **Temperature hypotheses:** The rate of change of the temperature that a body experiences is proportional to the difference between the temperature of the body and the temperature of the medium in which it is found. <br/><br/> **Example:** A motor's temperature is placed in a room with a temperature of 20°C. When the motor is turned on, the temperature of the motor is 30°C. The motor's temperature increases at a rate of 2°C per minute. What will be the temperature of the motor after 10 minutes? --- ### Examples of these: > **Mixtures Hypotheses:** In a tank with `\(N\)` liters of water mixed with an agent (salt, sugar, etc.). Consider the following: <br/> * The amount that enters and leaves the tank is always the same. <br/> * The concentration of the mixture is uniform throughout the tank. <br/> * The water mixed by tube `\(A\)` that enters at a rate of `\(a\)` liters per minute with a mixture of `\(k\)` units of agent per liter. <br/> * The mixed water leaves through tube `\(B\)` at a rate of `\(b\)` gallons per minute. -- `$$\frac{d S}{dt}=ak-b\frac{S}{N}.$$` --- # Qualitative Analysis of ODEs > **Definition:** The qualitative analysis of an ODE consists of studying the behavior of the solutions of the ODE without solving it. <br/><br/> * The qualitative analysis is based on the study of the slope field of the ODE. <br/> * The slope field is a graphical representation of the direction of the solutions of the ODE. <br/><br/> --- ## Slope Field > **Definition:** The _slope field_ of the ODE `\(y'=f(x,y)\)` is constructed with a representation of a line with slope `\(f(x,y)\)` at each point `\((x,y).\)` <br/><br/> Study the slope field of the following ODEs: 1. `\(y'=x+y.\)` 2. `\(y'=2.\)` 3. `\(y'=-x.\)` 4. `\(y'=4y(1-y).\)` --- ## Solution Curves > The solution curves are the curves that follow the direction of the slopes of the slope field. <br/><br/> We can classify these curves by: <br/> * Equilibrium curves. <br/> * Stable and unstable curves. <br/><br/> Study the slope field of the ODE `\(y'=4y(1-y).\)`