Skip to content

Rules for manipulating derivatives #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
75 changes: 74 additions & 1 deletion multivariable-calculus/manipulating-derivatives.md
Original file line number Diff line number Diff line change
@@ -1 +1,74 @@
# Manipulating partial derivatives
# Manipulating Partial Derivatives

We sometimes need to find derivatives we don't obtain easily from one of these potentials. For this, we use some calculus rules.

---

#### Inversion
Copy link

@mzbush mzbush Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#### Inversion
``` {topic} Inversion Rule

Putting the definitions of the rules for manipulating derivatives inside of {topic} directives will help them stand out. Do this for the chain rule as well.


If x(y, z) and y(x, z), then:

```{math}
\left( \frac{\partial x}{\partial y} \right)_z = \frac{1}{\left( \frac{\partial y}{\partial x} \right)_z}
Comment on lines +11 to +12
Copy link

@mzbush mzbush Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```{math}
\left( \frac{\partial x}{\partial y} \right)_z = \frac{1}{\left( \frac{\partial y}{\partial x} \right)_z}
\begin{equation}
\left( \frac{\partial x}{\partial y} \right)_z = \frac{1}{\left( \frac{\partial y}{\partial x} \right)_z}
\end{equation}

Wrapping your equations inside \begin{equation}\end{equation} for single equations and \begin{align}\end{align} for multiple equations is preferred over the {math} directory. This will automatically number the equations which is useful for if you want to reference them later. Do this for all your equations.

```

**Example:**
Copy link

@mzbush mzbush Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrapping examples in the {example} directive will make the page look better organized. Do this for the other example as well.


Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this example, it is not entirely clear what the goal of these derivations is. Adding a short explanation at the start to about what the example is trying to find/prove/demonstrate will make it easier for the reader to follow along.

The goal according to the original notes is to calculate $\left( \frac{\partial x}{\partial y} \right)_z$ and then show that calculating $\left( \frac{\partial y}{\partial x} \right)_z$ from $y = \pm \sqrt{xz}$ and then inverting will give the same result. Instead, it looks like the goal is to find $\left( \frac{\partial y}{\partial x} \right)_z$ without dealing with applying the power rule to a fractional power.

The issue is that the direct derivation of $\left( \frac{\partial x}{\partial y} \right)_z$ and the derivation starting from $y = \pm \sqrt{xz}$ are shown concurrently as if in sequence instead of as two separate paths that both find the same answer. Another problem is that calculating the derivative from $y = \pm \sqrt{xz}$ gets simplified too quickly. In the original notes, it starts as $\left( \frac{\partial y}{\partial x} \right)_z = \frac{1}{2}\sqrt{\frac{z}{x}}$ and then gets simplified to $\frac{z}{2y}$. This part is crucial to understanding how this partial derivative is being calculated.

```{math}
Let:
x = \frac{y^2}{z}
```

We can rearrange this to:
```{math}
y = \pm \sqrt{xz}
```

Now compute:
```{math}
\left( \frac{\partial x}{\partial y} \right)_z = \frac{2y}{z}
```

Then:
```{math}
\left( \frac{\partial y}{\partial x} \right)_z = \frac{z}{2y}
```

And confirm the inversion:
```{math}
\frac{1}{\left( \frac{\partial y}{\partial x} \right)_z} = \frac{2y}{z}
```

#### Chain Rule
Copy link

@mzbush mzbush Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be in a {topic} directive


```{math}
\left( \frac{\partial x}{\partial y} \right)_z = \left( \frac{\partial x}{\partial w} \right)_z \left( \frac{\partial w}{\partial y} \right)_z
```
Comment on lines +44 to +46
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This equation could use some preamble to explain what the chain rule is and this new symbol $w$

**Example:**

```{math}
w = yz
```
So,
```{math}
y = \frac{w}{z}
```
Then:
```{math}
x = \frac{(w/z)^2}{z} = \frac{w^2}{z^3}
```
Comment on lines +56 to +59
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, you bring back the definition of x from the earlier example. This is fine, but you should try to be explicit when an example is using a quantity defined in previous examples. You could do this by including the previously used definition of x in a preamble of this example that goes something like "Given {{blank}} and {{blank}}, find {{blank}}." This will ensure the reader doesn't need to go back to the previous example.

Since using \begin{equation}\end{equation} should number all of your equations, you may also want to be explicit about which equations are being combined to make the math more clear. You might rewrite this line as "Then, using the definition of x from Equation {{put equation number here}}:"


Now compute:
```{math}
\left( \frac{\partial x}{\partial w} \right)_z = \frac{2w}{z^3}
```

And:
```{math}
\left( \frac{\partial w}{\partial y} \right)_z = z
```

Therefore:
```{math}
\left( \frac{\partial x}{\partial y} \right)_z = \frac{2w}{z^3} \cdot z = \frac{2w}{z^2} = \frac{2yz}{z^2} = \frac{2y}{z}
```
Comment on lines +72 to +74
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be broken up into multiple lines using \begin{align}\end{align}