From 4b9554d3b8b63d5b1a56dd91e3efe49b84afe8da Mon Sep 17 00:00:00 2001 From: Michael Howard Date: Fri, 9 May 2025 11:40:12 -0500 Subject: [PATCH 1/2] Reapply changes --- first-order-odes/separable.md | 91 +++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/first-order-odes/separable.md b/first-order-odes/separable.md index 24f2cd7ff..9bd96b436 100644 --- a/first-order-odes/separable.md +++ b/first-order-odes/separable.md @@ -175,3 +175,94 @@ t &= 2 \left(\frac{1}{0.01}\right)^2 \sqrt{\frac{2}{2 \cdot 9.8}} = 6400 This time is in seconds because all units are SI, so the tank drains in about 1.8 hours. ```` + +## Skill builder problems + +Solve the following: + +1. $y'+(x+2)y^2 = 0 ; \quad y(1) = 1$ + +```{solution} +\begin{align} +\frac{dy}{dx} &= -(x+2)y^2 \\ +\int\frac{dy}{y^2} &= \int-(x+2)dx \\ +-\frac{1}{y} &= -\left(\frac{x^2}{2} + 2x\right) + C \\ +\end{align} +Isolate $y'$ and then integrate both sides. +`` +When using variable names within text, wrap them in $$. + +\begin{equation} +y(1) = -1 = -\left(\frac{1}{2} + 2 \right) + C \quad \to \quad C = \frac{3}{2} +\end{equation} +Use the initial condition to find the value of C. + +\begin{equation} +y = \frac{2}{x^2+4x-3} +\end{equation} +Plug in the value for C and solve for y. +``` + +(b) + +\begin{equation} +yy'+4x = 0 ; \quad y(0) = 3 +\end{equation} + +```{solution} +\begin{align} +y*\frac{dy}{dx} &= -4x \\ +\int y*dy &= \int-4x*dx \\ +-\frac{y^2}{2} &= -2x^2 + C \\ +\end{align} +Use the initial condition to find the value of C. + +\begin{equation} +y(0) = \frac{9}{2} = C \to y^2 = 9-4x^2 +\end{equation} +Plug in the value for C and solve for y. + +\begin{equation} +y = ±\sqrt{9-4x^2} +\end{equation} +The negative does not meet the initial condition, so choose the positive. + +\begin{equation} +y = \sqrt{9-4x^2} +\end{equation} +``` + +(c) + +\begin{equation} +y' = \frac{x-1}{y}e^{-y^2} \quad y(0) = 1 +\end{equation} + +```{solution} +\begin{align} +\int ye^{y^2} = \int (x-1)dx\\ +\frac{1}{2}e^{y^2} = \frac{x^2}{2}-x + C +\end{align} + +Use the initial condition to find the value of C. +\begin{equation} +y(0) = 1 \to \frac{1}{2}e^{1^2} = C +\end{equation} + + +Plug in the value for C and divide everything by 1/2. + +\begin{equation} +e^{y^2} = x^2-2x+e +end{equation} + +\begin{equation} +y^2 = ln(x^2-2x+e) +\end{equation} +Take the natural log of both sides. + +\begin{equation} +y = \sqrt{ln(x^2-2x+e)} +\end{equation} +The negative does not meet the initial condition, so choose the positive. +``` From eda9cfeeb9c6456d9fca7b7e1d60ba0da55bdc63 Mon Sep 17 00:00:00 2001 From: Michael Howard Date: Fri, 9 May 2025 11:50:23 -0500 Subject: [PATCH 2/2] Cleanup formatting --- first-order-odes/separable.md | 137 +++++++++++++++++----------------- 1 file changed, 69 insertions(+), 68 deletions(-) diff --git a/first-order-odes/separable.md b/first-order-odes/separable.md index 9bd96b436..851822192 100644 --- a/first-order-odes/separable.md +++ b/first-order-odes/separable.md @@ -180,89 +180,90 @@ This time is in seconds because all units are SI, so the tank drains in about Solve the following: -1. $y'+(x+2)y^2 = 0 ; \quad y(1) = 1$ +1. $y'+(x+2)y^2 = 0, \quad y(1) = 1$ -```{solution} -\begin{align} -\frac{dy}{dx} &= -(x+2)y^2 \\ -\int\frac{dy}{y^2} &= \int-(x+2)dx \\ --\frac{1}{y} &= -\left(\frac{x^2}{2} + 2x\right) + C \\ -\end{align} -Isolate $y'$ and then integrate both sides. -`` -When using variable names within text, wrap them in $$. + ```{solution} + Separate and integrate: -\begin{equation} -y(1) = -1 = -\left(\frac{1}{2} + 2 \right) + C \quad \to \quad C = \frac{3}{2} -\end{equation} -Use the initial condition to find the value of C. + \begin{align} + \dd{}{y}{x} &= -(x+2)y^2 \\ + \int\frac{\d{y}}{y^2} &= -\int (x+2) \d{x} \\ + -\frac{1}{y} &= -\left(\frac{x^2}{2} + 2x\right) + c + \end{align} -\begin{equation} -y = \frac{2}{x^2+4x-3} -\end{equation} -Plug in the value for C and solve for y. -``` + Apply initial condition $y(1) = 1$: -(b) + \begin{equation} + -1 = -\left(\frac{1}{2} + 2 \right) + c + \end{equation} -\begin{equation} -yy'+4x = 0 ; \quad y(0) = 3 -\end{equation} + so $c = 3/2$. Hence, -```{solution} -\begin{align} -y*\frac{dy}{dx} &= -4x \\ -\int y*dy &= \int-4x*dx \\ --\frac{y^2}{2} &= -2x^2 + C \\ -\end{align} -Use the initial condition to find the value of C. + \begin{equation} + y = \frac{2}{x^2+4x-3} + \end{equation} + ``` -\begin{equation} -y(0) = \frac{9}{2} = C \to y^2 = 9-4x^2 -\end{equation} -Plug in the value for C and solve for y. +2. $yy'+4x = 0, \quad y(0) = 3$ -\begin{equation} -y = ±\sqrt{9-4x^2} -\end{equation} -The negative does not meet the initial condition, so choose the positive. + ```{solution} + Separate and integrate: -\begin{equation} -y = \sqrt{9-4x^2} -\end{equation} -``` + \begin{align} + y \frac{dy}{dx} &= -4x \\ + \int y \d{y} &= \int-4x \d{x} \\ + -\frac{y^2}{2} &= -2x^2 + c \\ + \end{align} -(c) + Apply initial condition $y(0) = 3$: -\begin{equation} -y' = \frac{x-1}{y}e^{-y^2} \quad y(0) = 1 -\end{equation} + \begin{equation} + -\frac{9}{2} = c + \end{equation} -```{solution} -\begin{align} -\int ye^{y^2} = \int (x-1)dx\\ -\frac{1}{2}e^{y^2} = \frac{x^2}{2}-x + C -\end{align} + so -Use the initial condition to find the value of C. -\begin{equation} -y(0) = 1 \to \frac{1}{2}e^{1^2} = C -\end{equation} + \begin{align} + y^2 &= 9-4x^2 \\ + y &= \pm \sqrt{9-4x^2} + \end{align} + The negative root does not satisfy the initial condition, so choose the + positive root: -Plug in the value for C and divide everything by 1/2. + \begin{equation} + y = \sqrt{9-4x^2} + \end{equation} + ``` -\begin{equation} -e^{y^2} = x^2-2x+e -end{equation} +3. $\displaystyle y' = \frac{x-1}{y}e^{-y^2}, \quad y(0) = 1$ -\begin{equation} -y^2 = ln(x^2-2x+e) -\end{equation} -Take the natural log of both sides. + ```{solution} + Separate and integrate: -\begin{equation} -y = \sqrt{ln(x^2-2x+e)} -\end{equation} -The negative does not meet the initial condition, so choose the positive. -``` + \begin{align} + \int y e^{y^2} \d{y} &= \int (x-1) \d{x} \\ + \frac{1}{2} e^{y^2} &= \frac{x^2}{2} - x + c + \end{align} + + Apply initial condition $y(0) = 1$: + + \begin{equation} + \frac{1}{2} e = c + \end{equation} + + Hence, + + \begin{align} + e^{y^2} &= x^2 - 2x + e \\ + y^2 &= \ln(x^2 - 2x + e) \\ + y &= \pm \sqrt{\ln(x^2 - 2x + e)} + \end{align} + + The negative root again does not meet the initial condition, so choose the + positive one: + + \begin{equation} + y = \sqrt{\ln(x^2 - 2x + e)} + \end{equation} + ```