title: Advanced Mathematics
subtitle: DLMDSAM01
Author: Dr. Robert Graf
publisher: IU International University of Applied Sciences
year: 2023

Calculus

https://en.wikibooks.org/wiki/LaTeX/Mathematics Wiki List of important Mathematical Series

Also, some useful calculus

For LaTeX symbols, I use This pdf. KaTeX Support

Side note

Certainly! Here’s a quick cheatsheet of commonly used set notation in LaTeX markdown:

  1. Set Membership: a \in A means “a belongs to set A.”
  2. Set Non-Membership: b \notin B means “b does not belong to set B.”
  3. Set Cardinality: |A| denotes the cardinality (number of elements) of set A.
  4. Set Union: A \cup B represents the union of sets A and B.
  5. Set Intersection: A \cap B represents the intersection of sets A and B.
  6. Set Difference: A \setminus B or A - B represents the set difference of A and B.
  7. Subset: A \subset B or A \subseteq B means that set A is a subset (or a proper subset) of set B.
  8. Superset: A \supset B or A \supseteq B means that set A is a superset (or a proper superset) of set B.
  9. Empty Set: \emptyset denotes the empty set.
  10. Universal Set: \mathbb{U} or \mathbb{V} represents the universal set.
  11. Complement: A^c or A' represents the complement of set A.
  12. Cartesian Product: A \times B represents the Cartesian product of sets A and B.
  13. Power Set: \mathcal{P}(A) represents the power set of set A.

Feel free to use these notations as needed in your LaTeX markdown!

LaTeX Cheat Sheet & Quick Reference short-math-guide.pdf (ctan.org) Aligning equations with amsmath - Overleaf, Online LaTeX Editor Seems to have basics of using LaTeX.


y=f(x)y=f(x) actually has a lot to it

Rate of change is very useful (eg. velocity is distance w/respect to time). Differentiation is the method of finding the rate of change given a function. And, given multiple independent variables, partial differentiation allows us to explore the rate of change with respect to each independent variable.

Integration can be seen as the inverse of differentiation, hence the alias anti-derivative.

Suggested Readings: …

Differentiation and Integration

https://www.malinc.se/math/latex/basiccodeen.php https://kapeli.com/cheat_sheets/LaTeX_Math_Symbols.docset/Contents/Resources/Documents/index Math Symbols and meaning MicroSoft MathSolver

Derivatives and Functions of a Single Variable

Considering the example v(t)=ΔsΔtv(t)=\dfrac{\Delta s}{\Delta t} just to see that by Δt\Delta t we mean an interval of time. It’s technically the average velocity over that unit of time. A Function is a relation between two sets that associates every element of one set to exactly one element of the other set.

We kind of brush over the concept of a limit, which is quite critical to the fundamentals of Calculus, but typically not invoked directly (so understandable). A limit is a self describing term for the result of a function, the dependent variable, as the independent variable(s) approach their limit’s value.

The slope of a curve is typically denoted as:

m=ΔyΔxm = \frac{\Delta y}{\Delta x}

definition 1.1

However, for actual curved shaped curves, non-linear relationships typically, the slope is not exact. We can approximate the slope by decreasing the size of Δx\Delta x, until it is indistinguishable from 00. This gives us the change in yy per infinitesimal change in xx. The slope which would intercept the curve at both xx points now only touches the curve in the one spot. Geometrically, we refer to it as the tangent line, the slope of the line tangent to the function f(x)f(x) at the point xx.

Additionally, In math, equivalent is different from equal. Equal means same in all aspects, whereas equivalent means similar but not identical. Use the equal sign to express an identity, and equivalent to express, say, same truth values.

Mathematically, it looks more like:

f(x)df(x)dxlimΔx0f(x+Δx)f(x)Δxf'(x) \equiv \dfrac{df(x)}{dx} \equiv \lim_{\Delta x\to 0}\frac{f(x+\Delta x)-f(x)}{\Delta x}

definition 1.2

Note that (the importance of limits) a function is differentiable at xtx_{t} if, and only if (IFF), the limit exists at point x=xtx = x_t. For the limit to exist, the definition of the limit requires that the quotient f(x+Δx)f(x)Δx\frac{f(x+\Delta x)-f(x)}{\Delta x} approaches the same value, f(x)f'(x), from both the left and right. That’s more limit talk.

EXAMPLE

Lets find f(x)f'(x) for f(x)=x2f(x) = x^2.

  1. Define a derivative.
f(x)=limΔx0f(x+Δx)f(x)Δxf'(x) = \lim_{\Delta x\to 0}\frac{f(x+\Delta x)-f(x)}{\Delta x}
  1. Substitute value of xx.
=limΔx0(x+Δx)2x2Δx=\lim_{\Delta x\to 0}\frac{(x+\Delta x)^2-x^2}{\Delta x}
  1. Expand Polynomial.
=limΔx0x2+2xΔx+Δx2x2Δx=\lim_{\Delta x\to 0} \frac{x^2+2x\Delta x+ \Delta x^2-x^2 } { \Delta x }
  1. x2x2=0x^{2} - x^{2} = 0.
=limΔx02xΔx+Δx2Δx=\lim_{\Delta x\to 0} \frac{2x\Delta x+ \Delta x^2 } { \Delta x }
  1. Divide by Δx\Delta x.
=limΔx02x+Δx=\lim_{\Delta x\to 0} 2x+ \Delta x
  1. Let Δx0\Delta x \to 0 (basically substitution).
=2x= 2x

The trick is that Δx\Delta x becomes infintessimally small as it approaches zero, but is always non-zero. Hence, does not cause function to become undefined.

Additionally, for a function to be differentiable at xtx_t, a function must be continuous at xtx_t. If the function were not continuous at that point, it would also not have a limit. However, being continuous is a weak criteria. Take f(x)=xf(x) = |x| for example. The derivative taken at x=0x=0 from the left is 1-1, but from the right is +1+1.

EXAMPLE

From definition, calculate f(x)f'(x) for f(x)=2x+1f(x)=2x+1.

f(x)=limΔx0f(x+Δx)f(x)Δx=limΔx02(x+Δx)+1(2x+1)Δx=limΔx02x+2Δx+12x1Δx=limΔx02x+2Δx+12x1Δx=limΔx02x+2Δx+12x1Δx=limΔx02ΔxΔx=limΔx02=2\begin{align*} f'(x) &= \lim_{\Delta x \to 0} \frac{f(x+\Delta x) - f(x)}{\Delta x}\\ &= \lim_{\Delta x \to 0} \frac{2(x+\Delta x) +1 - (2x +1)}{\Delta x}\\ &= \lim_{\Delta x \to 0} \frac{2x+ 2 \Delta x +1 - 2x - 1}{\Delta x}\\ &= \lim_{\Delta x \to 0} \frac{2x+ 2 \Delta x +1 - 2x - 1}{\Delta x}\\ &= \lim_{\Delta x \to 0} \frac{\cancel{2x} + 2 \Delta x + \cancel{1} - \cancel{2x} - \cancel{1}}{\Delta x}\\ &= \lim_{\Delta x \to 0} \frac{2 \cancel{\Delta x}}{ \cancel{\Delta x}}\\ &= \lim_{\Delta x \to 0}2\\ &= 2\\ \end{align*}

\Box

Using definition 1.2 and the laws of limits, we can find derivatives of many fundamental functions. Let n>0n>0 be a natural number and aa be a real-valued constant.

ddxxn=nxn1\frac{d}{dx} x^n=nx^{n-1}
ddxeax=aeax\frac{d}{dx} e^{ax} = ae^{ax}
ddxln(ax)=1x\frac{d}{dx} \ln (ax) = \frac {1} {x}
ddxsin(ax)=acos(ax)\frac{d}{dx} \sin (ax) = a \cos (ax)
ddxcos(ax)=asin(ax)\frac{d}{dx} \cos (ax) = -a \sin (ax)
ddxtan(ax)=acos2(ax)\frac{d}{dx} \tan (ax) = \frac {a} {\cos^2 (ax)}

What we have been discussing is just the first derivative of a function. The derivative goes by other name, such as slope or gradient.

Higher Order Derivatives

A derivative of a derivative is a higher order derivative. The results are obtained by applying the definition of a derivative onto the result of itself.

f(x)limΔx0f(x+Δx)f(x)Δxf''(x) \equiv \lim_{\Delta x\to 0}\frac{f'(x+\Delta x)-f'(x)}{\Delta x}

definition 1.3

More generally, for the nthn^{th} derivative;

fn(x)dfn1dxlimΔx0fn1(x+Δx)fn1(x)Δxf^n(x) \equiv \frac {df^{n-1}} {dx} \equiv \lim_{\Delta x\to 0}\frac{f^{n-1}(x+\Delta x)-f^{n-1}(x)}{\Delta x}

definition 1.4

… whenever the limit exists.

EXAMPLE

Using the definition for nthn^{th} derivative, calculate the f(x)f''(x) for f(x)=ax2+bx+cf(x)=ax^2+bx+c.

f(x)=limΔx0f(x+Δx)f(x)Δx=limΔx0(a(x+Δx)2+b(x+Δx)+c)(ax2+bx+c)Δx=limΔx0ax2+2axΔx+aΔx2+bx+bΔx+cax2bxcΔx=limΔx02axΔx+aΔx2+bΔxΔx=limΔx02ax+aΔx+b=limΔx02ax+a\cancelto0Δx+b=2ax+b\begin{align*} f'(x) &=\lim_{\Delta x \to 0} \frac{f(x+ \Delta x) - f(x)}{\Delta x}\\ &=\lim_{\Delta x \to 0} \frac{(a(x+\Delta x)^2+b(x + \Delta x) + c) - (ax^2+bx + c)}{\Delta x}\\ &=\lim_{\Delta x \to 0} \frac{ ax^2+ 2ax \Delta x +a\Delta x^2+bx + b\Delta x + c - ax^2-bx - c} {\Delta x}\\ &=\lim_{\Delta x \to 0} \frac{ 2ax \Delta x +a\Delta x^2 + b\Delta x} {\Delta x}\\ &=\lim_{\Delta x \to 0} 2ax +a\Delta x + b\\ &=\lim_{\Delta x \to 0} 2ax +a \cancelto{0}{\Delta x} + b\\ &=2ax + b\\ \end{align*}

And then

f(x)=limΔx0f(x+Δx)f(x)Δx=limΔx0(2a(x+Δx)+b)(2ax+b)Δx=limΔx02ax+2aΔx+b2axbΔx=limΔx02aΔxΔx=limΔx02a=2a\begin{align*} f''(x) &=\lim_{\Delta x \to 0} \frac{f'(x+ \Delta x) - f'(x)}{\Delta x}\\ &=\lim_{\Delta x \to 0} \frac{(2a(x+\Delta x)+b) - (2ax + b)}{\Delta x}\\ &=\lim_{\Delta x \to 0} \frac{2ax+ 2a\Delta x+b - 2ax - b}{\Delta x}\\ &=\lim_{\Delta x \to 0} \frac{2a\Delta x}{\Delta x}\\ &=\lim_{\Delta x \to 0} 2a\\ &= 2a\\ \end{align*}

\Box

Stationary Points

Imagine the parabola of f(x)=x2f(x)=x^2. At x=0x=0, the function achieves a local minimum. Graphically, the line tangent to the graph at this point is horizontal, with a slope m=0m=0.

For f(x)=xf(x)=|x|, x=0x=0 is a local extrema, a critical point defined to be a place where the derivative is zero or does not exist.

There are 3 different stationary points:

Worth noting that these are only for local min-max, and not the functions’ global min-max point.

EXAMPLE

Find the stationary points for f(x)=3x26xf(x) = 3x^2 - 6x. Determine if the points are minimum, maximum, or saddle.

The points are found in the first derivative, and described in the second derivative.

We will use techniques over the general derivative definition

f(x)=3x26xf(x)=6x6f(x)=6\begin{align*} f(x) &= 3x^2 - 6x\\ f'(x) &= 6x - 6\\ f''(x) &= 6\\ \end{align*}

Now, you can solve for f(x)=0f'(x) = 0 and see the stationary point is at x=1x=1.

Also, since f(x)f''(x) is positive, the rate of change will be increasing at this point. We don’t need to check for saddle because it’s a constant. Instead, you can envision this as a bowl shape, meaning this point is a minimum.

EXAMPLE

Suppose we have 6m of framing material and we want to build a rectangular window with sides xx and yy. Choose the values of xx and yy to maximize the area because we want a lot of sunlight.

We know that the area is A=xyA=xy, and we have C=2x+2yC=2x+2y amount of material. We want to maximize the output, so we need a function to solve for the derivative at 0.

Rearrange circumference formula

C=2l+2h6=2x+2yy=62x2y=3x\begin{align*} C &= 2l + 2h\\ 6 &= 2x + 2y\\ y &= \frac{6-2x}{2}\\ y &= 3-x\\ \end{align*}

Pop that into the Area

A=xy=x(3x)=x2+3x\begin{align*} A &= xy\\ &= x(3-x)\\ &= -x^2+3x\\ \end{align*}

Then, go for the derivative

A(x)=2x+3A'(x) = -2x+3

And solve xx for A(x)=0A'(x) = 0

A(x)=2x+30=2x+32x=3x=3/2\begin{align*} A'(x) &= -2x+3\\ 0 &= -2x+3\\ 2x &= 3\\ x &= 3/2\\ \end{align*}

Solve for y=33/2=6/23/2=3/2y=3-3/2=6/2-3/2=3/2.

It shouldn’t be too much of a surprise that the largest area comes from a square.

\Box

Rules of Differentiation

Differentiation of Functions with a Constant

Let aRa \in \mathbb{R} and be an arbitrary constant and g(x)g(x) be some function.

ddxf(x)=f(x)=addxg(x)=a×g(x)\frac {d} {dx} f(x) = f'(x) = a \frac {d} {dx} g(x) = a \times g'(x)

Differentiation of Products

Suppose our function is the product of multiple functions (eg. f(x)=u(x)×v(x)f(x) = u(x) \times v(x)). Decomposing a function into product parts may ease the strain of applying the definition of a derivative to the entire function. The idea is to choose a u(x)u(x) and v(x)v(x) that are easy to differentiate. Basically, we are about to derive the product rule of differentiation…

  1. Define a derivative:
f(x)=limΔx0f(x+Δx)f(x)Δxf'(x) = \lim_{\Delta x\to 0}\frac{f(x+\Delta x)-f(x)}{\Delta x}
  1. Substitution of u(x)×v(x)u(x) \times v(x)
=limΔx0u(x+Δx)×v(x+Δx)u(x)×v(x)Δx= \lim_{\Delta x\to 0}\frac{u(x+\Delta x) \times v(x+\Delta x)-u(x) \times v(x)}{\Delta x}
  1. Since u(x+Δx)×v(x)u(x+Δx)×v(x)=0u(x+\Delta x) \times v(x) - u(x+\Delta x) \times v(x) = 0, we add that in (tricky substitution):
=limΔx0u(x+Δx)×v(x+Δx)u(x)×v(x)+u(x+Δx)×v(x)u(x+Δx)×v(x)Δx= \lim_{\Delta x\to 0} \frac {u(x+\Delta x) \times v(x+\Delta x) - u(x) \times v(x) + u(x+\Delta x) \times v(x) - u(x+\Delta x) \times v(x)} {\Delta x}
  1. Reorganize for show:
=limΔx0u(x+Δx)×v(x+Δx)u(x+Δx)×v(x)+u(x+Δx)×v(x)u(x)×v(x)Δx= \lim_{\Delta x\to 0} \frac {u(x+\Delta x) \times v(x+\Delta x) - u(x+\Delta x) \times v(x) + u(x+\Delta x) \times v(x) - u(x) \times v(x)} {\Delta x}
  1. Factor out what we need:
=limΔx0u(x+Δx)[v(x+Δx)v(x)]+v(x)[u(x+Δx)u(x)]Δx= \lim_{\Delta x\to 0} \frac {u(x+\Delta x)[v(x+\Delta x) - v(x)]+v(x)[u(x+\Delta x)-u(x)]} {\Delta x}
  1. Distribute Δx\Delta x
=limΔx0{u(x+Δx)v(x+Δx)v(x)Δx+v(x)u(x+Δx)u(x)Δx}= \lim_{\Delta x\to 0}\left \{ u(x+\Delta x) \frac {v(x+\Delta x) - v(x)} {\Delta x}+ v(x) \frac {u(x+\Delta x)-u(x)} {\Delta x} \right \}
  1. As Δx0\Delta x \to 0, u(x+Δx)u(x)u(x + \Delta x) \to u(x) and we have something like:
f(x)ddx[u(x)v(x)]=u(x)dv(x)dx+v(x)du(x)dx=uv+vuf'(x) \equiv \frac {d} {dx} \left[ u(x) v(x) \right] = u(x) \frac {dv(x)} {dx} + v(x) \frac {du(x)} {dx} = uv' + vu'

definition 1.5

We can give a try at something like f(x)=u(x)v(x)w(x)f(x)=u(x)v(x)w(x), applying the rule on itself, but to spare the complexity:

f(x)=uddx(vw)+vwddx(u)=uvdwdx+uwdvdx+vwdudx\begin{align*} f'(x) &= u \frac {d} {dx} (vw) + vw \frac {d} {dx} (u) \\ &= uv \frac {dw} {dx} + uw \frac {dv} {dx} + vw\frac {du} {dx} \end{align*}

Q: Find the derivative of f(x)=x2sin(x)f(x) = x^2 \sin(x)

The Chain Rule

It might be hard to imagine right now, but sometimes it is easier to think of functions as functions of functions! Consider f(x)=(x1)2f(x) = (x-1)^2. If we let u(x)=x1u(x)=x-1, then f(x)=u(x)2f(x)=u(x)^2.

dydx=dydududx\frac {dy} {dx} = \frac {dy} {du} \frac {du} {dx}

definition 1.6

Let’s walk through an example.

  1. define our function
f(x)=(x1)2f(x)=(x-1)^2
  1. Substitute
f(u(x))=u(x)2whereu(x)=x1f(u(x))=u(x)^2 \quad \text{where} \quad u(x)=x-1
  1. Define derivative
dydx=dydududx\frac {dy} {dx} = \frac {dy} {du} \frac {du} {dx}
  1. What is dydu\dfrac {dy} {du}?
f(u)dydu=u2dydu=2uf(u) \frac {dy} {du} = u^2 \frac {dy} {du} =2u
  1. What is dudx\dfrac {du} {dx}?
u(x)dudx=(x1)dudx=1u(x) \frac {du} {dx} = (x-1) \frac {du} {dx} = 1
  1. And therefore:
f(u(x))dydx=2u1=2uf(u(x)) \frac {dy} {dx} = 2*u*1 = 2*u
  1. Substitute u(x)=x1u(x) = x-1
dydx=2(x1)\frac {dy} {dx} = 2(x-1)

Differentiation of Quotients

Similar to the product rule, the quotient rule finds f(x)f'(x) for f(x)=u(x)v(x)f(x)= \dfrac {u(x)} {v(x)}. Basically, you can consider applying the product rule to f(x)f'(x) for f(x)=u(x)v(x)1f(x)= u(x)v(x)^{-1}.

f(x)=(u(x)v(x))=v(x)u(x)u(x)v(x)v2f'(x) = \left (\frac {u(x)} {v(x)} \right )' = \frac {v(x)u'(x) - u(x)v'(x)} {v^2}

definition 1.7


EXAMPLE

Find f(x)f'(x) for

f(x)=(sin(3x)1)2x3f(x) = \frac{(\sin(3x)-1)^2}{x^3}

You can do this using the product rule or the Quotient rule. I like only remembering one formula so this is how I would do it… note that the v(x)v'(x) will also require using the chain rule, which is the derivative of the function times the derivative of the inside.

f(x)=v(x)u(x)f(x)=v(x)u(x)+v(x)u(x)v(x)=(sin(3x)1)2u(x)=x3v(x)=2(sin(3x)1)(3cos(3x))u(x)=3x4f(x)=2(sin(3x)1)(3cos(3x))x3+(sin(3x)1)23x4f(x)=xx(6cos(3x))(sin(3x)1)x33(sin(3x)1)2x4f(x)=(6xcos(3x))(sin(3x)1)x43(sin(3x)1)2x4f(x)=6xcos(3x)(sin(3x)1)3(sin(3x)1)2x4\begin{align*} f(x) &= v(x)u(x)\\ f'(x) &= v'(x)u(x) + v(x)u'(x)\\ &\therefore\\ v(x) &= (\sin(3x) -1)^2\\ u(x) &= x^{-3}\\ v'(x) &= 2(\sin(3x) - 1)*(3\cos(3x))\\ u'(x) &= -3x^{-4}\\ &\therefore\\ f'(x) &= 2(\sin(3x) - 1)*(3\cos(3x))*x^{-3}+(\sin(3x) -1)^2*-3x^{-4}\\ f'(x) &= \frac{x}{x} \frac{(6\cos(3x))(\sin(3x) - 1)}{x^{3}}- \frac{3(\sin(3x) -1)^2}{x^{4}}\\ f'(x) &= \frac{(6x\cos(3x))(\sin(3x) - 1)}{x^{4}}- \frac{3(\sin(3x) -1)^2}{x^{4}}\\ f'(x) &= \frac {6x\cos(3x)(\sin(3x) - 1)-3(\sin(3x) -1)^2} {x^{4}}\\ \end{align*}

You can continue to factor this pulling out a 2(sin(3x)1)2(\sin(3x)-1) from each side, but doesn’t make a huge difference.

\Box


Integrals of Functions of a Single Variable

Integrals as Area Under the Curve

So far, we have been using the definition of slope as m=ΔyΔxm= \dfrac {\Delta y} {\Delta x}, which defines an average rate of change. We then consider progressively shorter xx intervals, Δx0\Delta x \to 0 to determine the instantaneous rate of change f(x)=dydxf'(x)= \frac {dy} {dx}.

But given the rate of change, or the function of it, can we determine the coordinate values? For example, if given the function of velocity, can we determine an objects position at a given point in time? If velocity is change of position per unit time, expressed as v(t)=ΔsΔtv(t)= \dfrac {\Delta s} {\Delta t}, then we solve for position by Δs=Δt×v(t)\Delta s = \Delta t \times v(t). Graphically, this looks like base time height, which thus becomes the area under the curve.

Informally, we can approximate this value summing sub-intervals between t0t_0 and tnt_n. However, we will technically be summing rectangles, which will produce an error for a smooth curve. To increase accuracy, we shorten the interval, increasing the total number of intervals. And, if we let the interval length approach 0, we start our journey into integration.

Below is a function summing the intervals. Let f(x)f(x) be a function defined over the interval a<x<ba<x<b. We divide our interval [a,b][a,b] into nn sub-intervals such at a=ξ1<ξ2<...<ξn=ba=\xi_1<\xi_2<...<\xi_n =b. That means f(xi)×(ξiξi1)f(x_i) \times (\xi_i-\xi_{i-1}) is like our base times height.

S=i=1nf(xi)(ξiξi1)S = \sum_{i=1}^{n} f(x_i)(\xi_i-\xi_{i-1})

definition 1.8

Note that the area under some curves over certain intervals is not finite (eg. f(x)=1xf(x)= \frac {1}{x}). However, if the limit does exist, as nn \to \infty we define an integral as… realizing that nn may not be defined correctly above…

I=abf(x)dxI=\int_a^bf(x)dx

definition 1.9

The integral is undefined if the limit does not exist. For closed, finite intervals, the limit can exist if the function is continuous over that interval. It is both interesting and convenient to consider integration to be the summation of infinite parts.

The function to be integrated, f(x)f(x) is called the integrand. The process of integration kind of involves summing rectangles of area on the interval, and letting the width of the intervals approach 0. Certain functions in a summation can be expressed as an ordinary function, making the process easier. For example

i=1ni2=16n(n+1)(2n+1)\sum_{i=1}^ni^2=\frac{1}{6}n(n+1)(2n+1)

Let’s look at some interesting integral properties or identities:

ab0dx=0\int_a^b0\text{dx} = 0
aaf(x)dx=0\int_a^af(x)\text{dx} = 0
ab[f(x)+g(x)]dx=abf(x)dx+abg(x)dx\int_a^b[f(x)+g(x)]\text{dx} = \int_a^bf(x)\text{dx} + \int_a^bg(x)\text{dx}
ac[f(x)]dx=abf(x)dx+bcf(x)dx,  b[a,c]\int_a^c[f(x)]\text{dx} = \int_a^bf(x)\text{dx} + \int_b^cf(x)\text{dx}, \forall \; b \in[a,c]
abf(x)dx=baf(x)dx\int_a^bf(x)\text{dx}=-\int_b^af(x)\text{dx}

Integrals as inverse of differentiation

A formal definition is:

F(x)=axf(u)duF(x) = \int_a^xf(u)\text{du}

(1.14)

We are going to prove quick the Fundamental Theorem of Calculus, that states the derivative of the integral gives back the original integrand.

Consider:

F(x+Δx)=ax+Δxf(u)duF(x+\Delta x) = \int_a^{x+ \Delta x} f(u) \text{du}

We split integral into workable pieces:

F(x+Δx)=axf(u)du+xx+Δxf(u)duF(x+\Delta x) = \int_a^{x} f(u) \text{du} + \int_x^{x+ \Delta x} f(u) \text{du}

Then a quick substitute:

F(x+Δx)=F(x)+xx+Δxf(u)duF(x+\Delta x) = F(x) + \int_x^{x+ \Delta x} f(u) \text{du}

Now, divide both sides by Δx\Delta x.

F(x+Δx)F(x)Δx=1Δxxx+Δxf(u)du\frac {F(x+\Delta x) - F(x)} {\Delta x}= \frac{1}{\Delta x}\int_x^{x+ \Delta x} f(u) \text{du}

Then, we consider the limit as Δx0\Delta x \to 0

dF(x)dx=f(x)\frac {dF(x)} {dx}= f(x)

You may also see it written with definition of F(x)F(x) substituted back in as:

ddx[axf(u)du]=f(x)\frac {d}{dx} \left[ \int_a^xf(u)du \right] = f(x)

Typically, the definition is written as:

f(x)dx=F(x)+c\int f(x)\text{dx} = F(x) + c

Where cc is a constant. This is because the derivative of a constant cc will be 00 and therefore the value is lost. However, when going backwards, we account for the lost value with a placeholder. We refer to cc as the constant of integration.

And an interesting pattern that appears a bit in probability theory is, let x0x_0 be an arbitrary fixed point such that x0(a,b)x_0 \in (a,b). Then

abf(x)dx=ax0f(x)dx+x0bf(x)dx\int_a^bf(x)dx=\int_a^{x_0}f(x)dx+\int_{x_0}^bf(x)dx

The above is nothing new. However, we are going to do a switch-and-flip! New line in Latex Equation - TeX - LaTeX Stack Exchange = “align”, “flalign”, “align*”, “aligned”. Art of Problem Solving

abf(x)dx=x0bf(x)dxx0af(x)dx=F(b)F(a)\begin{aligned} \int_a^bf(x)dx &=\int_{x_0}^bf(x)dx-\int_{x_0}^{a}f(x)dx\\ &= F(b)-F(a) \end{aligned}

call this equation 1.21.

Integrals with Infinite Bounds of Integration

Previous definitions expected the bounds of integration to be finite. However, it is often the case that one or both bounds are infinite. We can extend the definition:

af(x)dx=limbabf(x)dx=limbF(b)F(a)\int_a^{\infty} f(x) dx = \lim_{b \to \infty} \int_a^b f(x) dx = \lim_{b \to \infty} F(b) - F(a)

Where the limit as bb approaches \infty is evaluated after the integral is calculated. That is, integrate and then evaluate.

Evaluation of integrals

Unlike derivatives, integrals usually cannot be evaluated as easily. As such, we have an extend list of recipes. Note, that uu is typically a function u(x)u(x), and that dudu is the derivative such that du=u(x)dxdu=u'(x)dx. The notation can be a little confusing. Khan Academy has a huge section on integration techniques, and a u-substitution.

undu=un+1n+t+c      where  (n1)uu=ln(u)+caudu=aulna+c...\begin{align*} \int u^n du &= \frac{u^{n+1}}{n+t}+c \;\;\; \text{where}\; (n \ne -1) \\ \int \frac {u'}{u} &= \ln{(|u|)} + c \\ \int a^u du &= \frac{a^u}{\ln{a}} + c \\ \text{...} \end{align*}

Page 28… Needs to be wrapped up. Even the book says that large number of integrals can be found in tables of integrals.

To evaluate unknown integrals, we try to transform them into forms that are easier to evaluate. Here’s a quick reference of some techniques:

We probably need many examples.

Try to evaluate abxcos(x)dx\int_a^b x * \cos{(x)} dx. Hint: look at the the above list… should make skip over all but integration by parts.

Try to evaluate the following:

1x2+x\int \frac{1}{x^2+x}

From page 30. It’s a cool situation where you factor the bottom, use partial fraction decomposition, and notice things being to look a bit logarithmic.


EXAMPLE

Evaluate the following integral

F(x)=01x2sin(x)dxF(x) = \int_0^1 x^2 \sin(x)dx

The best way to probably handle this is integration by parts.

F(x)=u(x)v(x)dx=u(x)v(x)v(x)u(x)dxF(x) = \int u(x)v'(x)dx = u(x)v(x) - \int v(x)u'(x)dx

I say this because in the derivative case it would be a power rule.

u(x)=x2v(x)=sin(x)u(x)=2xv(x)=cos(x)F(x)=(x2)(cos(x))0101(cos(x))(2x)dxF(x)=(1)(cos(1))+201(cos(x))(x)dx\begin{align*} u(x) &= x^2\\ v'(x) &= \sin(x)\\ &\therefore\\ u'(x) &= 2x\\ v(x) &= -\cos(x)\\ &\therefore\\ F(x) &= \left. (x^2)(-\cos(x)) \right|_0^1-\int_0^1 (-\cos(x))(2x)dx\\ F(x) &= (1)(-\cos(1))+2\int_0^1 (\cos(x))(x)dx\\ \end{align*}

At this point the reader may become annoyed realizing they, again, have to perform another integration by parts… We take out the negative from the cosine to make things easier.

G(x)=01(cos(x))(x)dxu(x)=xv(x)=cos(x)u(x)=1v(x)=sin(x)G(x)=(x)(sin(x))0101(1)(sin(x))G(x)=sin(1)((cos(1))(cos(0)))G(x)=sin(1)+cos(1)1\begin{align*} G(x) &= \int_0^1 (\cos(x))(x)dx\\ u(x) &= x\\ v'(x) &= \cos(x)\\ u'(x) &= 1\\ v(x) &= \sin(x)\\ G(x) &= \left. (x)(\sin(x))\right|_0^1-\int_0^1 (1)(\sin(x))\\ G(x) &= \sin(1) - ((-\cos(1)) - (-\cos(0)))\\ G(x) &= \sin(1) + \cos(1) - 1\\ \end{align*}

And we put this back into the former equation

F(x)=cos(1)+2G(x)F(x)=cos(1)+2(sin(1)+cos(1)1)F(x)=2sin(1)+cos(1)2F(x)=1.68294197+0.54030230586820.2232\begin{align*} F(x) &= -\cos(1)+2G(x)\\ F(x) &= -\cos(1)+2(\sin(1) + \cos(1) - 1)\\ F(x) &= 2\sin(1) + \cos(1) - 2\\ F(x) &= 1.68294197 + 0.540302305868 - 2 \approx 0.2232\\ \end{align*}

\Box


EXAMPLE

p.17

Evaluate the following

e3xcos(x)dx\int e^{3x}\cos(x) dx

You can probably tell, based on it being a product, that we will require integration by parts.

u(x)v(x)ddx=uv+uvuv=uv+uvu(x)v(x)=u(x)v(x)u(x)v(x)\begin{align*} u(x)v(x)\frac{d}{dx} &= u'v + uv'\\ uv &= \int u'v + \int uv' \\ \int u(x)v'(x) &= u(x)v(x) - \int u'(x)v(x) \end{align*}

To be honest, if we let v(x)=e3xv(x)=e^{3x}, I think we will be integrating forever. So…

also,

ddxsin(cx)=ccos(x)ddxcos(cx)=csin(x)cos(cx)dx=1csin(x)+csin(cx)dx=1ccos(x)+c\begin{gather*} \frac{d}{dx} \sin(cx) = c\cos(x)\\ \frac{d}{dx} \cos(cx) = -c\sin(x)\\ \int \cos(cx)dx = \frac{1}{c}\sin(x)+c\\ \int \sin(cx)dx = -\frac{1}{c}\cos(x)+c\\ \end{gather*}

just needed to write my notes,

u(x)v(x)=u(x)v(x)+u(x)v(x)u(x)=e3xv(x)=cos(x)u(x)=3e3xv(x)=sin(x)e3xcos(x)=e3xsin(x)3e3xsin(x)e3xcos(x)=e3xsin(x)3I(x)\begin{align*} \int u(x)v'(x) &= u(x)v(x) + \int u'(x)v(x)\\ u(x) &= e^{3x}\\ v'(x) &= \cos(x)\\ u'(x) &= 3e^{3x}\\ v(x) &= \sin(x) \\ \\ \int e^{3x}\cos(x) &= e^{3x}\sin(x) - \int 3e^{3x}\sin(x)\\ \int e^{3x}\cos(x) &= e^{3x}\sin(x) - 3I(x)\\ \end{align*}

We now calculate I(x)I(x)

e3xsin(x)dx=u(x)v(x)+u(x)v(x)u(x)=e3xv(x)=sin(x)u(x)=3e3xv(x)=cos(x)e3xsin(x)=e3xcos(x)+3e3xcos(x)\begin{align*} \int e^{3x}\sin(x)dx &= u(x)v(x) + \int u'(x)v(x)\\ u(x) &= e^{3x}\\ v'(x) &= \sin(x)\\ u'(x) &= 3e^{3x}\\ v(x) &= -\cos(x) \\ \\ \int e^{3x}\sin(x) &= -e^{3x}\cos(x) + \int 3e^{3x}\cos(x)\\ \end{align*}

Funny enough, you can see how we have recreated our integral in question. We can stir to combine…

e3xcos(x)=e3xsin(x)3I(x)I(x)=e3xcos(x)+3e3xcos(x)e3xcos(x)=e3xsin(x)3(e3xcos(x)+3e3xcos(x))e3xcos(x)=e3xsin(x)+3e3xcos(x)9e3xcos(x)e3xcos(x)+9e3xcos(x)=e3xsin(x)+3e3xcos(x)10e3xcos(x)=e3x(sin(x)+3cos(x))e3xcos(x)=e3x10(sin(x)+3cos(x))\begin{align*} \int e^{3x}\cos(x) &= e^{3x}\sin(x) - 3I(x)\\ I(x) &= -e^{3x}\cos(x) + \int 3e^{3x}\cos(x)\\ \int e^{3x}\cos(x) &= e^{3x}\sin(x) - 3\left(-e^{3x}\cos(x) + \int 3e^{3x}\cos(x)\right)\\ \int e^{3x}\cos(x) &= e^{3x}\sin(x) + 3e^{3x}\cos(x) - 9\int e^{3x}\cos(x)\\ \int e^{3x}\cos(x)+9\int e^{3x}\cos(x) &= e^{3x}\sin(x) + 3e^{3x}\cos(x)\\ 10\int e^{3x}\cos(x) &= e^{3x} (\sin(x) + 3\cos(x))\\ \int e^{3x}\cos(x) &= \frac{e^{3x}}{10} (\sin(x) + 3\cos(x))\\ \end{align*}

\Box


EXAMPLE

You are in a car moving at speed v(t)v(t). How far has the vehicle travelled between t0=0st_0=0s and t1=5st_1=5s?

v(t)=tt2+1v(t) = \frac{t}{t^2+1}

The anti-derivative of velocity is distance. So, it’s a bounded integration problem. I am going to suggest uu substitution because I don’t see integration by parts…

d(t)05=05tt2+1dtu(t)=t2+1ddtu(t)=2t dud(t)05=05tt2+1dt=2205tt2+1dt=1205uudu\begin{align*} \left.d(t)\right|_0^5 &= \int_0^5 \frac{t}{t^2+1} dt\\ u(t) &= {t^2+1}\\ \frac{d}{dt}u(t) &= 2t\ du\\ \\ \left.d(t)\right|_0^5 &= \int_0^5 \frac{t}{t^2+1} dt\\ &= \frac{2}{2}\int_0^5 \frac{t}{t^2+1} dt\\ &= \frac{1}{2}\int_0^5 \frac{u'}{u} du\\ \end{align*}

Luckily, the bounds can be left where they are because they are just constant values.

d(u(t))05=1205uudu=12ln(u(t))05=12ln(t2+1)05=12(ln(52+1)ln(02+1))=12(ln(26)ln(1))=12ln(26)\begin{align*} \left.d(u(t))\right|_0^5 &= \frac{1}{2}\int_0^5 \frac{u'}{u} du\\ &=\left. \frac{1}{2}\ln(u(t))\right|_0^5\\ &=\left. \frac{1}{2}\ln(t^2+1)\right|_0^5\\ &=\frac{1}{2}\left(\ln(5^2+1)-\ln(0^2+1) \right)\\ &=\frac{1}{2}\left(\ln(26)-\ln(1) \right)\\ &=\frac{1}{2}\ln(26)\\ \end{align*}

Nice \Box


Taylor Approximation

Taylor’s Theorem, named after Brook Taylor who expressed this relationship in 1712, provides an approximation to a function in the vicinity of a given point x0x_0 as a sum. The theorem requires the function f(x)f(x) be continuous and that all derivatives up to order fn(x)f^n(x) exist in order to generate the nthn^{th} degree polynomial approximation of f(x)f(x) near x0x_0. You can always refer to Wikipedia for more information. However, per equation 1.21, which is

aa+ϵf(x)dx=f(a+ϵ)f(a)\int_a^{a+\epsilon} f'(x) dx = f(a+ \epsilon) - f(a)

We say that xx and xϵx-\epsilon are in the vicinity of aa, and rewrite the fecker as:

f(a+ϵ)=f(a)+aa+ϵf(x)dxf(a+ \epsilon) = f(a) + \int_a^{a+\epsilon} f'(x) dx

Call this equation 1.24

Now comes the magic. We must assume that ϵ\epsilon is very small. So small that we can assume f(x)f(a)f'(x) \approx f'(a). A side-effect of this assumption is that

f(a+ϵ)f(a)+ϵf(a)f(a + \epsilon) \approx f(a) + \epsilon f'(a)

We are kind of saying that f(a+ϵ)f(a+\epsilon) is f(a)f(a) plus the tiny increment multiplied by the rate of change. After all, that is actually what we kind of assume integration is actually doing under the hood. So, then we express in terms of xx and aa, assuming we stay close to the point aa, to get the approximation

f(x)f(a)+(xa)f(a)f(x) \approx f(a) + (x-a) f'(a)

call this equation 1.26. Sorry the numbering is a bit off.


My example: Let f(x)=3x2f(x) = 3x^2. Compare the actual and approximate values if a=6a=6 and ϵ=0.1\epsilon = 0.1.

actual

f(6+0.1)=3(6.1)2=3×37.21=111.63f(6+0.1) = 3(6.1)^2 = 3 \times 37.21 = 111.63

approximate Firstly, we can determine that f(x)=6xf'(x) = 6x. Then,

f(6.1)6×62+0.1×6(6)=106+3.6=111.6f(6.1) \approx 6 \times 6^2 + 0.1 \times 6(6) = 106 + 3.6 = 111.6

That’s not a bad approximation.


This approximation is called the linear approximation of f(x)f(x) near x=ax=a. It is a tangent line approximation to a function ff. We obtain better approximations with more information about ff, which is to say, using higher order derivatives. Because ff is nn-differentiable, we continue to apply approximations to each derivative:

f(x)f(a)+(xa)f(a),f(x)f(a)+(xa)f(a),f(x)f(a)+(xa)f4(a),...f(n1)(x)f(n1)(a)+(xa)fn(a).\begin{align*} f'(x) &\approx f'(a) + (x-a)f''(a), \\ f''(x) &\approx f''(a) + (x-a)f'''(a), \\ f'''(x) &\approx f'''(a) + (x-a)f^4(a), \\ &\text{...}\\ f^{(n-1)}(x) &\approx f^{(n-1)}(a) + (x-a)f^n(a). \end{align*}

We then substitute the estimate of f(x)f'(x) into equation 1.24

f(a+ϵ)f(a)+aa+ϵ[f(a)+(xa)f(a)]dx=f(a)+ϵf(a)+ϵ22f(a)\begin{align*} f(a + \epsilon) &\approx f(a) + \int_a^{a + \epsilon} \left[ f'(a) + (x-a)f''(a) \right]dx \\ &= f(a) + \epsilon f'(a) + \frac{\epsilon^2}{2} f''(a) \end{align*}

It is like integrating the ϵ\epsilon portion, but taking another derivative of the f(a)f(a) function. You can continue the process either forever or until no more higher order derivatives exist. That will yield the nthn^{th}-degree Taylor polynomial approximation. A better expression, which I suppose assumes that ϵ=(xa)\epsilon = (x-a):

f(x)f(a)+(xa)f(a)+(xa)22!f(a)+...+(xa)nn!fn(a)f(x) \approx f(a) + (x-a)f'(a)+\frac{(x-a)^2}{2!}f''(a)+\text{...}+\frac{(x-a)^n}{n!}f^n(a)

Call this equation 1.27.

Partial Differentiation

We will now consider rates of change of functions that depend on more that one independent variable. Derivatives of functions of single variables are related to the change, or gradient, of that function. Consider the function z=f(x,y)=x2+y2z = f(x, y) = x^2 + y^2. It has a specific gradient in all directions of the xyxy plane. It’s probably easiest to consider working in the 3-D space, as we can imagine it visually, before moving to higher spacial dimensions that range from difficult to impossible to imagine visually.

Wiki has a small section on partial derivatives. I mostly looked it up to see what the symbol was. I thought it was greek but I’m getting that it is just a stylish cursive ‘d’. It will indicate differentiation is performed partially with respect to a single variable, keeping other constant.

The derivative, once a tangent line of our 2-D graph, becomes a tangent plane in a 3-D graph. And you can imagine it being a tangent volume in a 4-D graph, which is why it is harder to visually represent higher dimensions. Circle back to our 3-D logic, we can think of taking a derivative now a just a multi-step problem. Before, 1 independent variable meant one, sometimes big, step. Now, we determine the rate of change on each axis, holding the other variable(s) constant. Each step is a partial derivative, which is to say, we are only finding part of the rate of change, or gradient, of the function. Let’s work up some equations.

fx=limΔx0f(x+δx,y)f(x,y)Δx\frac {\partial f}{\partial x} = \lim_{\Delta x \to 0} \frac {f(x+\delta x, y)-f(x,y)} {\Delta x}

equation 1.28

But, don’t forget about the other independent variable…

fy=limΔy0f(x,y+Δy)f(x,y)Δy\frac {\partial f}{\partial y} = \lim_{\Delta y \to 0} \frac {f(x, y+\Delta y)-f(x,y)} {\Delta y}

equation 1.29

Some other notations might be

fx=xf(x,y)fx=xf\frac {\partial f}{\partial x} = \frac{\partial}{\partial x}f(x,y) \equiv f_x = \partial_xf

equations 1.31

They are different ways of writing the same thing, but I might recommend sticking with the first honestly.

You can also calculate higher order derivatives, provided that the relevant limits exist. Let’s look as some possibilities considering we only have 2 independent variables:

x(fx)=(2fx2)=fxxy(fy)=(2fy2)=fyyx(fy)=(2fxy)=fxyy(fx)=(2fyx)=fyx\begin{align*} \frac{\partial}{\partial x} \left({ \frac{\partial f}{\partial x} }\right) = \left( { \frac {\partial^2f}{\partial x^2} } \right) = f_{xx} \\ \frac{\partial}{\partial y} \left({ \frac{\partial f}{\partial y} }\right) = \left( { \frac {\partial^2f}{\partial y^2} } \right) = f_{yy} \\ \frac{\partial}{\partial x} \left({ \frac{\partial f}{\partial y} }\right) = \left( { \frac {\partial^2f}{\partial x \partial y} } \right) = f_{xy} \\ \frac{\partial}{\partial y} \left({ \frac{\partial f}{\partial x} }\right) = \left( { \frac {\partial^2f}{\partial y \partial x} } \right) = f_{yx} \end{align*}

Under sufficient continuity conditions, the following relationship should hold:

(2fxy)=(2fyx)\left({ \frac {\partial^2f}{\partial x \partial y} }\right) = \left({ \frac {\partial^2f}{\partial y \partial x} }\right)

I would recommend taking the time now to practice.

  1. Find the partial first derivatives of f(x,y)=3x2y2+yf(x,y) = 3x^2y^2+y. Then, find the second order derivatives from each partial with respect to the other independent variable. Compare them, are they the same?
fx=6xy2\frac{\partial f}{\partial x} = 6xy^2

Notice that the yy becomes 0. This is because ddxy=0\frac{d}{dx}y = 0, hopefully that is written correctly.

fy=6x2y+1\frac{\partial f}{\partial y} = 6x^2y + 1

Hopefully that makes enough sense. Kind of like just pretending that x2x^2 doesn’t exist. Now…

x(fy)=fy6xy2=12xyAND...y(fx)=fx6x2y+1=12xy\begin{align*} \frac{\partial}{\partial x} \left({ \frac{\partial f}{\partial y} }\right) &= \frac{\partial f}{\partial y} 6xy^2 = 12xy \\ &\text{AND...} \\ \frac{\partial}{\partial y} \left({ \frac{\partial f}{\partial x} }\right) &= \frac{\partial f}{\partial x} 6x^2y +1 = 12xy \end{align*}

EXAMPLE

Find the first order partial derivatives of

f(x,y)=xy2+xf(x,y) = xy^2+x

This isn’t too bad…

fx=y2+1fy=2xy\begin{align*} \frac{\partial f}{\partial x} &= y^2 + 1\\ \frac{\partial f}{\partial y} &= 2xy\\ \end{align*}

Remember to hold other variables constant when integrating for your one.

\Box


EXAMPLE

Find the first order partial derivatives of

f(x,y)=xy2+xz2+xyzf(x,y) = xy^2+xz^2+xyz

Again, this isn’t too bad, just take it one step at a time.

fx=y2+z2+yzfy=2xy+xzfz=2xz+xy\begin{align*} \frac{\partial f}{\partial x} &= y^2+z^2+yz\\ \frac{\partial f}{\partial y} &= 2xy+xz\\ \frac{\partial f}{\partial z} &= 2xz+xy\\ \end{align*}

Remember to hold other variables constant when integrating for your one.

\Box


EXAMPLE

Find f/x\partial f / \partial x for the following:

f(x,y)=xyln(2x)f(x,y) = xy \ln(2x)

This is giving product rule vibes.

uv=uv+uvu(x)=xyv(x)=ln(2x)u(x)=yv(x)=22x=1xfx=yln(2x)+xy1x=yln(2x)+y=y(ln(2x)+1)\begin{align*} uv &= u'v+uv'\\ u(x) &= xy\\ v(x) &= \ln(2x)\\ u'(x) &= y\\ v'(x) &= \frac{2}{2x}=\frac{1}{x}\\ \\ \frac{\partial f}{\partial x} &= y\ln(2x) + xy\frac{1}{x}\\ &= y\ln(2x) + y\\ &= y(\ln(2x) + 1)\\ \end{align*}

This LibreTexts.org section looks like a beautiful explanation of partial derivatives.

Total Differential

I got ahead of myself asking for the whole derivative above. Basically, we want to investigate the rate of change if we move in any direction in the domain. That is, a little in the xx (or Δx\Delta x), and a little in the yy as well.

Δf(x,y)=f(x+Δx,  y+Δy)f(x,  y)\Delta f(x,y) = f(x+\Delta x,\; y+ \Delta y) - f(x,\;y)

The book then does the algebraic trick of adding and subtracting by the same term, f(x,  y+Δy)f(x,  y+Δy)=0f(x,\;y+\Delta y) - f(x,\;y+\Delta y) =0. This allows to factor into desirable quotients. You can also multiply by ΔxΔx=1\frac{\Delta x}{\Delta x}=1 and ΔyΔy=1\frac{\Delta y}{\Delta y}=1. It looks a little funny, but if you let the deltas approach 0, you get:

df=fxdx+fydydf = \frac{\partial f}{\partial x}dx + \frac{\partial f}{\partial y}dy

equation 1.32.

And for nn independent variables

df=fx1dx1+fx2dx2+...+fxndxndf = \frac{\partial f}{\partial x_1}dx_1 + \frac{\partial f}{\partial x_2}dx_2 + \text{...} + \frac{\partial f}{\partial x_n}dx_n

equation 1.33.

LibreTexts.org has it’s own section on the Total Differential as well that defines Total Differential similarly, but explains it a little bit better. To better understand, let Δx=dx\Delta x = dx represent a change in the independent variable xx. We can assume that when dxdx is small, dyΔydy \approx \Delta y, the change in y resulting from the change in xx. The assumption also includes that as dxdx gets smaller, the difference between Δy\Delta y and dydy goes to 0. That is, as dx0dx \to 0, the error in approximating Δy\Delta y with dydy also goes to 0. An interesting distinction between Δy\Delta y and dydy.

If we expand this logic to a function with 2 independent variables, like z=f(x,y)z=f(x,y), we would like Δx=dx\Delta x = dx and Δy=dy\Delta y = dy. Then, the change in zz becomes Δz=f(x+dx,y+dy)f(x,y)\Delta z = f(x+dx, y+dy)-f(x,y). And we approximate Δzdz=fxdx+fydy\Delta z \approx dz = f_xdx+f_ydy. This means the total change in zz is approximately the change cause by Δx\Delta x and Δy\Delta y.

It’s really just an approximation. Wikipedia has an article as well.

Chain Rule

We start with the total derivative from 1.32, and follow a similar approach to single variable derivatives:

dfdu=fxdxdu+fydydu\begin{align*} \frac{df}{du} = \frac{\partial f}{\partial x} \frac{dx}{du} + \frac{\partial f}{\partial y} \frac{dy}{du} \end{align*}

You can go further with deeper nesting of functions as well if needed:

df(u(v(x)))dx=fuuvdvdx\frac{df(u(v(x)))}{dx} = \frac{\partial f}{\partial u} \frac{\partial u}{\partial v} \frac{dv}{dx}

That’s it for this section. A few examples would probably be nice.


EXAMPLE

Find total derivative for the following:

f(x,y)=cos(xy)f(x,y)=cos(xy)

The total derivative is slightly different than regular. It’s the sum of first order derivatives.

fx(x,y)=ysin(xy)fy(x,y)=xsin(xy)df(x,y)=ysin(xy)dxxsin(xy)dy\begin{align*} f_x(x,y) &= -y\sin(xy)\\ f_y(x,y) &= -x\sin(xy)\\ df(x,y) &= -y\sin(xy)dx - x\sin(xy)dy\\ \end{align*}

EXAMPLE

Find total derivative for the following:

f(x,y)=cos(x2+2y)f(x,y)=cos(x^2+2y)

This is similar to above, but we have basically another function within our function. Probably requires the chain rule. Technically, so did the other.

fx=fuuxfx(x,y)=(2x)(sin(x2+2y))fy(x,y)=(2)(sin(x2+2y))df(x,y)=(2x)(sin(x2+2y))dx+(2)(sin(x2+2y))dydf(x,y)=2(x dx+dy)(sin(x2+2y))\begin{align*} \frac{\partial f}{\partial x} &= \frac{\partial f}{\partial u}\frac{\partial u}{\partial x}\\ f_x(x,y) &= (2x)(-\sin(x^2+2y))\\ f_y(x,y) &= (2)(-\sin(x^2+2y))\\ df(x,y) &= (2x)(-\sin(x^2+2y))dx + (2)(-\sin(x^2+2y))dy\\ df(x,y) &= 2(x\ dx+ dy)(-\sin(x^2+2y))\\ \end{align*}

\Box


Multiple Integrals

We will again look at a function f(x,y)f(x,y) with specific bounds in both the xx and yy directions, represented by a region RR, enclosed by a contour CC. Following the approach from before, we divide the region into NN areas of ΔAp\Delta A_p. And we sum the product of the area times the small change in the dependent variable.

S=p=1Nf(xp,yp)ΔApS = \sum_{p=1}^N{ f(x_p,y_p)\Delta A_p }

Of course, this is monotonous, yet non-trivial, algebra. Calculus comes in as we let NN \to \infty, which implies that ΔAp0\Delta A_p \to 0.

I=Rf(x,y)dAI = \int_R f(x,y)dA

equation 1.35

where we consider dAdA to be an infinitesimally small area in the (x,y)(x,y) plane.

Now, if we assume to choose small rectangles in the xx and yy directions, we write ΔA=ΔxΔy\Delta A = \Delta x \Delta y. As both independent variable deltas tend to zero, we write

I=Rf(x,y)dxdyI = \int \int_R f(x,y)dxdy

equation 1.36.

Yes, that is a double integral. Sometimes, it matters the order of integration.

I=y=cy=d[x=x1(y)x=x2(y)f(x,y)dx]dyI = \int_{y=c}^{y=d} \left[ { \int_{x=x_1(y)}^{x=x_2(y)} f(x,y)dx } \right] dy

equation 1.37

You can reverse it as well, I’ll leave that to your imagination.

But, equation 1.37 needs a little elaboration. The inner integral treats yy as a constant when xx is being evaluated. And the outer integral then integrates yy. If possible, try to express the inner bounds in terms of the outer independent variable.

The book covers an example on page 38 where a triangular region form (x,y)=(0,0)(x,y)=(0,0) to x+y=1x+y=1 is evaluated. This allows the inner integral to be expressed as a function of the outer independent variable.

I would consider a more difficult example where we are given a range for zz where we then calculate the bounds of (x,y)(x,y) to evaluate the integral over.

Additionally, we easily extend the notation for more independent variables:

Vf(x,y,z)dxdydz\int \int \int_V f(x,y,z)dxdydz

equation 1.39


EXAMPLE

Evaluate the following:

I(x,y)=xy dx dyI(x,y) = \iint \frac{x}{y}\ dx \ dy

A good point to make is that, we are looking for a solution that satisfies this condition

2fxyI(x,y)=xy\frac{\partial^2f}{\partial x \partial y} I(x,y) = \frac{x}{y}

So, a particular solution can be as follows…

I(x,y)=xy dx dy=x22y dy=x22ln(y)\begin{align*} I(x,y) &= \iint \frac{x}{y}\ dx \ dy\\ &= \int \frac{x^2}{2y}\ dy\\ &= \frac{x^2}{2} \ln(|y|)\\ \end{align*}

We ignored the constant of integration for a moment. Apparently to go from particular to general, you want to add in the constants… but they aren’t normal constants anymore. They can be entire functions, but only of one variable. That is how they would cancel out in the end.

2fxyc(x,y)=0c(x,y)=f(x)+g(y)\begin{align*} \frac{\partial^2f}{\partial x \partial y} c(x,y) &= 0\\ c(x,y) &= f(x) + g(y)\\ \end{align*}

And therefore, we add in the constants of integration

I(x,y)=x22ln(y)+c(x,y)I(x,y)=x22ln(y)+f(x)+g(y)\begin{align*} I(x,y) &= \frac{x^2}{2} \ln(|y|) + c(x,y)\\ I(x,y) &= \frac{x^2}{2} \ln(|y|) + f(x)+g(y)\\ \end{align*}

EXAMPLE

Evaluate the definite integral below for 1<x<1-1 < x < 1 and 1<y<1-1 < y < 1:

Rxy dx dy\iint_R xy \ dx\ dy

The region is bound by constants, which simplifies things.

Rxy dx dy=1111x dx y dy=1112x211 y dy=1112(12(1)2) y dy=1112(11) y dy=110 dy=0\begin{align*} \iint_R xy \ dx\ dy &= \int_{-1}^1\int_{-1}^{1} x\ dx \ y \ dy\\ &= \int_{-1}^1\left. \frac{1}{2} x^2\right|_{-1}^{1} \ y \ dy\\ &= \int_{-1}^1 \frac{1}{2} (1^2-(-1)^2) \ y \ dy\\ &= \int_{-1}^1 \frac{1}{2} (1-1) \ y \ dy\\ &= \int_{-1}^1 0 \ dy\\ &= 0 \end{align*}

The book evaluated both xx and yy, both equating to zero, but that is unnecessary.


Calculus of Variations

Calculus of Variations is an extremely important extension of the idea of finding local extrema of real-valued functions through the use of stationary points.

Looks like we are moving towards finding extrema, which are maxima and minima values, the idea behand calculus of variations. It is often useful to find a function f(x)f(x) that yields extreme values.

The example we are looking at is a rope tied to two points, AA and BB. With no external forces other than gravity, and the initial motion is at rest, the force of gravity acts on each part of the rope, which takes the shape where the total potential energy, expressed by the integral over all small segments of the rope, is minimal. We want to find the function y(x)y(x) that described the shape of the hanging rope with the minimal potential energy.

To introduce the calculus of variations, start with:

I=abF(y,y,x)dxI = \int_a^b F(y, y', x) dx

equation 1.40

…where aa, bb, and FF are given by the nature of the problem. The limits aa and bb of the integral are fixed, the correspond to the endpoints of the rope. Functions that take in other functions as their input and result in a scalar as their output are called functionals. That is, the argument of a functional is an entire curve. We say that II is a functional of y(x)y(x), denoted as:

I=I[y(x)]I = I [ y(x) ]

equation 1.41

So, we use the square brackets to actually indicate that II is a functional, instead of a function of Rn\mathbb{R}^n. Think of I[y(x)]I[y(x)] as a replacement for our use of f(x)f(x), but remember that they are technically different concepts.

A stationary point y(x)y(x) of the functional is a point where the functional II does not change if the y(x)y(x) is perturbed by a small amount. We look for the curves y(x)y(x) that are stationary value(s) of the integral II, and determine whether such curves are extrema of the integral. It is possible for the integral to have more than on stationary points.


Let’s break down the concept of the calculus of variations in simple terms.

Imagine you have a path or a curve represented by the function y(x)y(x). This curve could be anything like the path of a ball flying through the air or the shape of a hanging cable. Now, we want to find a special point on that curve that has a unique property.

This special point is called a “stationary point.” A stationary point is a point where something interesting happens. In this case, it’s a point where the curve y(x) doesn’t change much if we make a small change to it.

To understand this, let’s think about a ball rolling down a hill. If you imagine the path the ball takes, it might go up and down, left and right, but it eventually reaches the bottom of the hill. At that bottom point, if you move the ball just a tiny bit to the left or right, it won’t really make a big difference because it’s already at the lowest point. That lowest point is like a stationary point.

Similarly, in the calculus of variations, we’re looking for a curve (represented by the function y(x)y(x)) where if we make a small change to it, the overall effect on the curve is very small. It’s like finding the path that is already at its best possible shape.

Now, the functional I[y(x)]I[y(x)] is a way to measure how good a curve is. It’s like a scoring system for curves. If a curve gets a higher score, it means it’s better according to certain criteria. The functional takes into account the shape of the curve and how it behaves.

So, when we say that a stationary point y(x)y(x) of the functional II is a point where the functional doesn’t change if the curve is perturbed by a small amount, it means that at that point, the curve is already at its best shape according to the scoring system. No matter how you slightly wiggle or change the curve, the score won’t improve or change much because it’s already as good as it can be.

Finding these special points, these stationary points, helps us understand and optimise different processes in the world, like finding the shortest path between two points or the shape that minimises the energy of a system. It’s a powerful tool in mathematics and science to figure out the best solutions for various problems.

- ChatGPT


Ok, my confusion was around the statement saying that the functional doesn’t change. Actually, what we mean is that the functional II changes so little that it is not noticeable or insignificant when compared to the overall value of the functional. We represent change in the functional like:

y(x)y(x)+ϵη(x)y(x) \to y(x) + \epsilon \eta(x)

equation 1.42

By our conversation, we require that II doesn’t change (much) if we move our stationary a tiny about, say ε\varepsilon, using any (sufficiently well-behaved) function η(x)\eta(x). We write something like:

dIdϵϵ=0=0η(x){\frac{dI}{d \epsilon}}\rvert_{\epsilon = 0} = 0 \forall \eta(x)

equation 1.43

I believe that reads like the small changes in II, evaluated at 0, are equal to 0 for all tiny changes in our stationary point.

Now, sub that into our previous definition of the functional:

I[y(x),ϵ]=abF(y+ϵη,y+ϵη,x)dxI \left[ { y(x), \epsilon } \right] = \int_a^bF \left( { y+\epsilon \eta, y' + \epsilon \eta', x } \right) dx

equation 1.435

I suppose we consider all functions to be well behaved, especially when considering situations related to physical examples. And I assume by well behaved we mean… continuous.

We then, for some reason, throw in an example of Taylor Series with Multiple Variables. It is like single variable, but where you basically perform polynomial expansion on higher order terms. And with little to no introduction to vectors, the book generalises the formula to any number of variables denoted by the vector x\vec{x}. Check out page 41 of the course text…

And then we push on to incorporate the Taylor series with our calculus of variations. We make some substitutions, and eventually get to the Euler-Lagrange equation:

Fy=ddx(Fy)\frac{\partial F}{\partial y} = \frac{d}{dx} \left( {\frac{\partial F}{\partial y'}} \right)

equation 1.48

The importance of the Euler-Lagrange equation is that it can be used to find stationary paths of a wide class of functions in a standardised manner. What types of functions can we use this theory with? Those are functions that have the specified form

I[y(x)]=abF(y,y,x)dx   with   y(a)=ya   and   y(b)=ybI[y(x)] = \int_a^bF(y, y', x) dx \; \text{ with } \; y(a)=y_a \; \text{ and } \; y(b)=y_b

It has bounds, and depends on the function yy and its derivative, and even the main independent variable xx. However, if there is a dependency on the second derivative or higher order derivatives, the theory cannot be applied. Additionally, you don’t need to depend on yy, yy', or xx all at once, but they can.

Functional Example

Can we look at an example? How about proving the shortest path between 2 points is a straight line?

Let’s start with 2 points A and BA \text{ and } B. They have points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2). But remember that we like things in terms of each other, so it’s more like… (x1,f(x1))(x_1, f(x_1)), and same for the other. The wonderful Pythagoras’ Theorem states that c2=a2+b2c^2=a^2+b^2.

For small / tiny segments of the path we will measure for the shortest distance, we can approximate the length with the distance formula ds=(dx)2+(dy)2ds= \sqrt {(dx)^2+(dy)^2}, assuming that dxdx and dydy are small enough to justify a useful approximation. We are then letting dy=f(x)dxdy=f'(x)dx and factoring out the dxdx.

ds=1+y2dxds = \sqrt {1+y'^2}dx

Now, the total length of the line can be expressed as the sum of all of the tiny bits, which means as an integral:

L=abds=ab1+y2dxL = \int_a^bds = \int_a^b \sqrt{1+y'^2}dx

eq. 1.50

Remember, we kind of don’t know what y(x)y(x) is yet, it’s just a place holder still at this point. However, we want to calculate the path that leads to a stationary point for LL. In this case, a minimum distance between AA and BB.

Let I[y(x)]I[y(x)] be a functional that maps functions satisfying y(a)=yay(a)=y_a and y(b)=yby(b)=y_b to the real numbers. Any such function for which,

ddεI[y(x)+εη(x)]ε=0=0\frac{d}{d \varepsilon}I[y(x)+ \varepsilon \eta(x)] |_{\varepsilon=0}=0

…for all η(x)\eta(x) with η(a)=η(b)=0\eta(a) = \eta(b) = 0, is said to be a stationary path of II. This is kind of saying that if there is no perturbation (ε=0\varepsilon = 0), we are looking for a local extrema, when a derivative is 0. Because the function is a curve, I suppose that is why we would call it a path instead of a point.

Let’s use Euler-Lagrange equation. Note, the function in the integral LL does not explicitly depend on yy. This conveniently implies that Fy=0\frac{\partial F}{\partial y}=0. Write the Equation!

ddx(Fy)=0\frac{d}{dx} \left( \frac{\partial F}{\partial y'} \right) = 0

So, for the derivative of a function to equal Zero, it must be a constant value! That’s interesting to know. Anyway, Looks like we do a little bit of literal substitution here:

c=Fy=y1+(y)2c = \frac{\partial F}{\partial y'} = \frac{y'}{\sqrt{1 + (y')^2}}

That is the derivative of the function F=1+y2F=\sqrt{1+y'^2} with respect to yy'. Then, go through the painful algebraic steps of getting to

dy=c1c2dxdy=\frac{c}{\sqrt{1-c^2}}dx

A simple integration yields an equations similar to y=mx+by=mx+b, but mm is that mess with constant cc.

Wikipedia has an article on Calculus of Variations also. There’s an article on the fundamental lemma of the calculus or variations which also sounds important.

Another example of how a functional can occur in practice is when trying to determine the length of a curve. A classical problem in the calculus of variation is to find the surface of minimal area that is generated by revolving a curve y(x)y(x) about the x-axis, where y(x)y(x) passes through two given points (a,ya)(a, y_a) and (b,yb)(b, y_b).

Another Example (From Lecture)

Suppose we have a function S[y(x)]=01y(x)2+ydxS[y(x)] = \int_0^1y'(x)^2+ydx. We are considering the functions has endpoints y(0)=0y(0)=0 and y(1)=2y(1)=2.

Can we find the stationary path of this function? Using the Euler-Langrange equation:

Fy=ddxFyWHERE...F(y,y,x)=(y)2+y\begin{align*} \frac{\partial F}{\partial y} &= \frac{d}{dx} \frac{\partial F}{\partial y'} \\ &\text{WHERE...} \\ F(y,y',x) &=(y')^2+y \\ \end{align*}

So, our function FF actually does not have a specific xx argument. Also notice how we say that FF is the integrand of our functional. Lets explicitly define our E-L equation (keep reading if the solution is confusing):

Fy=1\frac{\partial F}{\partial y} = 1

We are taking the partial derivative of FF with respect to yy, actually solving for that bit. For the purpose of our finding of the partial derivative of FF with respect to yy, we would view yy' as a constant. Derivatives of constants are equal to ZERO. And the d/dy=1d/dy = 1.

Now we solve for the next bit on the right side of the equation:

Fy=2y\frac{\partial F}{\partial y'} = 2y'

Hopefully from above the reader can understand how we came to this solution.

Now, for the most interesting step, we must compute the total derivative of the expression we have determined.

ddxFy=ddx(2y)=2y\frac{d}{dx} \frac{\partial F}{\partial y'} = \frac{d}{dx}(2y')=2y''

The left side of equation is said as “the total derivative with regard to xx of F\partial F by y\partial y'.” When it comes to the total derivative, we must consider both explicit and implicit xx dependencies. You can see that yy' doesn’t have an explicit xx in it, so there’ no explicit xx dependency. However, the yy' is in fact a function of xx. Guilty by association because y(x)y(x) is a function of xx. Because of this, we end up getting the second order derivative.

To Conclude…

1=2yy=12\begin{align*} 1 &= 2y'' \\ y'' &= \frac{1}{2} \end{align*}

Wow, so now to get the stationary path, we backwards solve from yy'' to yy. You might notice that this is a differential equation, but a simple one so don’t panic. Just integrate twice.

y=12x+by=14x2+bx+c\begin{align*} y' &= \frac{1}{2} x + b \\ y &= \frac{1}{4} x^2 + bx + c \end{align*}

Notice how those integration constants begin to pile up? No worries, because we know the boundary conditions, we can solve for them.

y(0)=0=14(0)2+b(0)+c    c=0y(1)=2=14(1)2+b(1)+0    b=74\begin{align*} y(0) = 0 = \frac{1}{4} (0)^2 + b(0) + c \implies c=0 \\ y(1) = 2 = \frac{1}{4} (1)^2 + b(1) + 0 \implies b = \frac{7}{4} \end{align*}

Very good! I think that helps a little bit with application of theory.

Summary

We looked as single variable function and multivariate functions, analysing rates of change with derivatives and integrals in a slew of poorly explained proofs and severe lack of examples. We also looked at Taylor expansion and the Euler-Lagrange equation.

We covered finding extrema of a single variable and of a functional. We did not look into finding extrema of multiple variable functions…

Check Yourself

Q: Is stating that f(a)=0f'(a) = 0 and that f(x)f(x) has a stationary point at x=ax=a the same as saying that f(x)f(x) has a local maximum or minimum at the point x=ax=a? (Think hard).

A: No, these are not the same. Although all statements lead to the discovery that the tangent line is horizontal at x=ax=a, the fundamental difference is the exclusion of the possibility of a saddle point in the latter statement.

Q: Is the antiderivative of a function unique?

A: No

Q: What is a double integral?

A: Apparently, over a region RR can be approximated by filling RR with small rectangles RiR_i and summing the volumes of the rectangular prisms with RiR_i and height bounded by the graph of ff above RiR_i.