- A differential equation is a
*separable equation*, if it can be written in the form \[ \frac{\mathrm dy}{\mathrm dx}=f(x)g(y). \]- In some cases, it might be easier to recognize it as written in the form \[ \frac{\mathrm dy}{\mathrm dx}=\frac{f(x)}{h(y)} \]
- To solve a separable equation, we transform its equation so that each side of the equation only has one variable (hence the name separable): \[ \frac{\mathrm dy}{g(y)}=f(x)\,\mathrm dx, \]
- and then we integrate: \[ \int\frac{\mathrm dy}{g(y)}=\int f(x)\,\mathrm dx. \]
- This gives an implicit equation for the solution \(y=y(x)\). In lucky cases, we can solve this equation for \(y\).

- Example. consider the logistic DE: \[
\frac{\mathrm dP}{\mathrm dt}=kP\left(1-\frac{P}{M}\right).
\]
- This is an
*autonomous equation*, since \(t\) only appears as the variable of \(P\) in it. In particular, it is separable. - We can separate variables: \[ \frac{\mathrm dP}{P(1-P/M)}=k\mathrm dt \]
- and integrate: \[ \int\frac{\mathrm dP}{P(1-P/M)}=\int\frac{M}{P(M-P)}\,\mathrm dP=\int\frac{1}{P}+\frac{1}{M-P}\,\mathrm dP=\ln|P|-\ln|M-P|+C=\ln\left|\frac{P}{M-P}\right|+C. \]
- We have gotten the implicit equation which in this case we can solve: \[\begin{align*} \ln\left|\frac{P}{M-P}\right|+C&=kt\\ \ln\left|\frac{M-P}{P}\right|&=-kt+C\\ \left|\frac{M-P}{P}\right|&=e^Ce^{-kt}\tag{$A=e^C$}\\ \frac{M-P}{P}&=Ae^{-kt}\\ \frac{M}{P}-1&=Ae^{-kt}\\ P&=\frac{1}{1+Ae^{-kt}}. \end{align*}\]

- This is an
- Exercises. 9.3: 1, 5, 15, 19

- Recall that if line \(L_1\) has slope \(m\): \[ L_1:(y-y_1)=m(x-x_1), \] and line \(L_2\) is perpendicular to \(L_1\), then \(L_2\) has slope \(-m^{-1}\): L_2:(y-y_2)=-m^{-1}(x-x_2).
- In
*orthogonal trajectories*, given a family of curves, we can set up a differential equation the solutions of which are curves perpendicular to every member of the original family. - For example, consider the family of parabolas \(x=ky^2\) where \(k\) is a constant.
- To get a differential equation the solutions of which are exactly these curves, we implicitly derivate by \(x\): \[ 1=2kyy'\text{ or }y'=\frac{1}{2ky}. \]
- Since \(x=ky^2\) yields \(k=\frac{x}{y^2}\), we can eliminate \(k\): \[ y'=\frac{y}{2x}. \]
- Now to get orthogonal curves, we need to change the slopes to the perpendicular ones: \[ y'=-\frac{2x}{y}. \]
- Separate variables: \[ y\,\mathrm dy=-2x\,\mathrm dx \]
- Integrate: \[ \frac{y^2}{2}=-x^2+C. \]
- We see that the orthogonal trajectories are the ellipses \[ x^2+\frac{y^2}{2}=C. \]

- Exercises. 9.3: 29, 30.

- A common problem type in separable equations is that of mixing problems.
- It is about a tank containing a thoroughly mixed solution of some substance, for example salt.
- You are told how a solution of a possibly different density is entering the tank, and how the thoroughly mixed solution is exiting the tank.
- Letting \(y(t)\) denote the amount of the substance in the tank at time \(t\), using the problem description, you need to create a differential equation in the form \[ \frac{\mathrm dy}{\mathrm dt}=\text{(rate in)}-\text{(rate out)} \] and solve it.

- Example. A tank contains 20 kg of salt dissolved in 5000 L of water. Brine that contains 0.03 kg of salt per litre of water enters the tank at a rate of 25 L/min. The solution is kept thoroughly mixed and drains from the tank at the same rate. How much salt remains in the tank after half an hour?
- Rate in: 25 L/min of 0.03 kg/L salt is incoming, so we get \(25\cdot 0.03=\frac34\) kg/min.
- Rate out: the tank contains \(y(t)\) kg salt. Since exit rate is 25 L/min, we get \(y(t)\cdot\frac{25}{5000}\) kg/min.
- Our differential equation is \[ \frac{\mathrm dy}{\mathrm dt}=\text{(rate in)}-\text{(rate out)}=\frac34-\frac{y}{200}=\frac{150-y}{200}. \]
- Separate variables and integrate: \[\begin{align*} \int\frac{\mathrm dy}{150-y}&=\int\frac{\mathrm dt}{200}\\ -\ln|150-y|&=\frac{t}{200}+C \end{align*}\]
- Since \(y(t=0)=20\) gives \(-\ln130=C\), we get \[\begin{align*} -\ln|150-y|&=\frac{t}{200}-\ln130\\ |150-y|&=130e^{-t/200}\\ \end{align*}\]
- Since the RHS is always nonnegative, so is the LHS, therefore we get \[\begin{align*} y(t)&=150-130e^{-t/200}. \end{align*}\]
- The amount of salt after half an hour is \[ y(t=30)=150-130e^{-30/200}. \]

- Exercises. 9.3: 45, 46, 48 (I know you like odd-numbered exercises, but 47 is utterly disgusting)