quot;, or "the derivative with respect to $x$ of $x^2$ is $2xquot;. This is something Lagrange's notation can't do and is very convenient for evaluating more complex derivatives where you can go some of the way and drop in $\frac{\mathop{\mathrm{d}}}{\mathop{\mathrm{d}x}}$ of some subexpression you're going to tackle in a later step (this is going to be useful when applying the [[Rules and Techniques for Derivatives#Product and quotient rules|quotient rule]] for example. Most written maths seem to use whatever notation is most convenient and in particular will use this form liberally even when generally using Lagrange notation. ## Rules and Techniques for differentiation Note there are various [[Rules and Techniques for Derivatives|rules and techniques]] that need to be mastered by practise 1. The [[Rules and Techniques for Derivatives#Sum and Difference rule|sum and difference rule]] 2. The [[Rules and Techniques for Derivatives#Product and quotient rules|product and quotient rules]] 3. The [[Rules and Techniques for Derivatives#Chain rule and $u$-substitution|chain rule]] and the associated technique of $u$-substitution ## Uses of differentiation ### Stationary points One obvious use of differentiation is to find stationary points, which occur where the first derivative is zero. At a local maximum the graph of a function is increasing on the left and decreasing on the right, and at a local minimum it is decreasing on the left and increasing on the right. This allows us to use something known as the [[First derivative test]] to determine the nature of the stationary points. If a function is twice differentiable, they can also be investigated by the [[Second Derivative Test]]. ## Smoothness and continuity This is not relevant in my studies yet, but I found it interesting, and is discussed in this video:  If a function is continuous at all points and its derivative is continuous on all points, we say it is in $\mathcal{C}^1$, the set of continuously differentiable functions. If its second derivative is continuous then it is in $\mathcal{C}^2$, the set of continuously _second_ differentiable functions, and so on. If it is continuously differentiable infinitely many times then it lives in $\mathcal{C}^\infty$ and we say that the function is smooth. # Typesetting derivatives in latex There is no particular challenge to typesetting derivatives in Lagrange notation. The simplest way to typeset a derivative in Leibniz notation in latex is something like ```latex \frac{dy}{dx} ``` to produce $ \frac{dy}{dx} $ This is actually (I seem to recall) how Knuth used to write derivatives so you'd be in good company. However the standard now (see [here](https://tex.stackexchange.com/questions/14821/whats-the-proper-way-to-typeset-a-differential-operator) and [here](https://tug.org/tugboat/tb18-1/tb54becc.pdf)) is to write them with the "d" in roman (ie not italics). We also want to ensure there is some space before and after the "dx" like an operator. This doesn't matter as much for derivatives actually but is important for integrals. To do this better there are a plethora of possible macros etc to help. I generally use the [esdiff](https://ctan.org/pkg/esdiff?lang=en) package, which would allow you to write just ```latex \diff{y}{x} ``` ...and get a nice looking derivative. To get a second derivative using esdiff you would do ```latex \diff[2]{y}{x} ``` It also has an analogous `\diffp` macro which does partial derivatives in the way you might expect. These nice options are not available in a mathjaxx situation like in obsidian or jupyter notebook or if I'm typing equations into a forum or whatever. So there you can get a slightly better format by doing something like ```latex \frac{\mathop{\mathrm{d}y}}{\mathop{\mathrm{d}x}} ``` $ \frac{\mathop{\mathrm{d}y}}{\mathop{\mathrm{d}x}} $ I frequently don't bother with the `mathop` in these notes as it really just adjusts the spacing to make it look a bit more like an operator and I know what I mean. One of my other packages (maybe `amsmath` but I'm really not sure) adds the `\d` macro which is basically equivalent to the above so makes writing integrals a bit easier although again is generally not available in mathjaxx.