#### *Related to [[Integration]] and [[Derivative]]*
*During these notes I will use the acronym FODE to refer to separable first order differential equations.*
---
## The basics
- A **differential is a mathematical relationship between a function and its derivate**. A differential *equation* therefore, is an equation that uses/references **its derivative inside of itself**.
- The **"solution"** to a differential equation is an equation whose derivative is equal to the original differential equation.
- A *first order* differential equation defines *any equation* that contains **only one first derivative *(usually $\small x'\;or\; y'$)***
- A *"separable"* differential equation is any equation which is in a form that allows you to easily isolate the two variables *(usually $\small x$ and $\small y$)* **on different sides of the equal sign** using **only multiplication of division.** It is usually in the form:
$\text{Seperable first order differential equation: }\;\Huge\boxed{\large\;\frac{dy}{dx}=f(x,y)\;}$
---
## Solving separable first order differential equations
- The first step is to separate the two variables, moving them to different sides of the equal sign. In a separable FODE you can only do this **through the use of multiplication or division**. *One side will contain both instances of a variable and its first derivative... that's ok*.
- You will often have to **factor out a constant** before you can use multiplication/division to move a variable to the other side of the equal sign.
- If the derivative is already alone on one side of the equation you should always move other instances of that variable over to the same side.
- **Even if there is only *one variable* in the differential equation you still have to isolate that variable and its derivative to one side of the equal sign**.
$\newline$
$\frac{dy}{dx}=4xy+y\longrightarrow\biggl(\frac{1}{y}\biggl)\frac{dy}{dx}=4x\cancel{y}+\cancel{y}\;\biggl(\frac{1}{\cancel{y}}\biggl)\longrightarrow\color{LightCyan}\boxed{\frac{1}{y}\cdot\frac{dy}{dx}=4x+1}$
$\newline$
- After isolating the variables we can **take the integral of both sides**.
- This works *(in the above example)* if we take the integral of both sides with respect to $\small dx$. On the left side of the equation the new $\small dx$ will cancel out the $\small dx$ on the bottom of the Leibniz notation derivative leaving us with just $\small dy$ *(which is correct for that side)*.
- ==Don't forget to add a + C term to one side of the equation!==
$\newline$
$\int\frac{1}{y}\cdot\frac{dy}{\cancel{dx}}\;\cancel{dx}=\int4x+1\;dx\longrightarrow\color{lightcyan}\ln|\,y\,|=2x^2+x$
$\newline$
- As you can see, integrating both sides **gets rid of the derivative** leaving us with a standard two variable equation. This allows us to solve for whichever variable had a derivative in the original equation, in this case that would be $\small y$.
- The unknown constant C does not change **no matter how it is algebraically manipulated**.
- Since natural log and e are commonly used during this step knowing log/exponent rules comes in handy [[Algebra|see these rules here]].
- **In some cases it is impossible to fully isolate the appropriate variable *(in the case above that would be $\small y$).* In these situations you can leave the variable un-isolated.**
$\newline$
$\large\cancel{e}^{\;\cancel{\ln}|\;y\;|}=e^{\,2x^2\,+\,x\,+\,C}=e^{\,C}\cdot e^{\,2x^2\,+\,x\,}{\color{grey}\longrightarrow e^C=C_1\longrightarrow}\color{lightcyan}y=C_1e^{\,2x^2\,+\,x}$
$\newline$
- If you are given a solution to this equation in the form: $\small y(a)=b$ you can use that = to solve for c *(by plugging in a to x and b to y)*.
- This equation is considered to be the **solution** to the differential equation because **if you take its derivative you will get the same equation that you had before *(including the y'!)*.**
>[!bug]
>###### *Useful algebra tip:*
>- To get rid of an absolute value you can replace it with a plus or minus sign
---
## Applications of separable differential equations
##### *Mixing problems*
- Mixing problems are an application of **separable differential equations.** These problems require you to create *(and sometimes solve)* a separable differential equation that is based on the **concentration of a substance in a tank**.
- To solve these problems we must first **create an equation relating the rate of the change of concentration to the concentration already in the tank**. These equations take the following form:
- By solving this differential equation we get a *non-differential* equation that tells us the concentration of the solute at any time $\small t$.
$\newline$
$\text{rate }=\text{rate in }-\text{ rate out}\;\longrightarrow\;\Huge\boxed{\large \frac{dy}{dt}=C\cdot r_1-\frac{y}{\text{total volume}}\cdot r_2}$
$\color{grey}\small C =\text{ concentration of liquid going in}\;\;r=\text{rate}$
$\newline$
##### *Newton's cooling equation*
- Newton's heating equation is a **differential equation** that when solved gives us an equation which relates the temperature of an object to the amount of time passed so long as we know the temperature of the environment that the object is in.
- The variable $\small\alpha$ in this equation is the heat transfer coefficient of the object. This is essentially just a constant that corresponds to the rate at which that object loses heat.
$\newline$
$\text{Newton's cooling equation: }\;\frac{dT}{dt}=\alpha\Big(S-T\Big)$
$\color{grey}\small\text{where }\;\;T=\text{temp of object}\;\;\;S=\text{temp of environment}\;\;\;\alpha=\text{heat transfer coefficent}$
$\newline$
##### *Populations*
- Since the rate of change or **growth of a population is dependent on the number of people already in that population** we can use a differential equation to predict how a population will change over time.
- This equation is also sometimes called the *logistic equation* since it can be applied to a large variety of different situations involving the *logistic growth (growth that "maxes out" at some point)*.
$\newline$
$\text{Population equation: }\;\frac{dP}{dt}=a\cdot P\Big(b-P\Big)$
$\color{grey}\small\text{where}\;\;P=\text{population number}\;\;\;a=\text{percent change per unit of time }t\;\;\;b=\text{max population}$
$\newline$
$\text{Alternative/logistic form: }\;\frac{dP}{dt}=a\cdot P\Biggl(1-\frac{P}{b}\Biggl)$
$\newline$
>[!quote]
>##### *Logistic/population growth graph modeled by logistic equation*
>![[logisitcgrowthgraph.png|850]]
---
## Calculator
>[!cite]
>
>---
><iframe src="https://www.wolframalpha.com/input?i=differential+equation" width="850" height="1200"></iframe>