# 4.2 Ordinary & Partial Differentiation

## Detailed Theory: Ordinary & Partial Differentiation

### **1. Introduction to Derivatives**

#### **1.1 What is a Derivative?**

The derivative measures how a function changes as its input changes. It represents the **instantaneous rate of change** or the **slope of the tangent line** to the curve at a point.

#### **1.2 Definition of Derivative**

The derivative of a function $$f(x)$$ at point $$x = a$$ is:

$$
f'(a) = \lim\_{h \to 0} \frac{f(a+h) - f(a)}{h}
$$

Alternative notation: $$f'(x)$$, $$\frac{df}{dx}$$, $$\frac{d}{dx}f(x)$$

#### **1.3 Geometric Interpretation**

* $$f'(a)$$ = slope of tangent line to $$y = f(x)$$ at $$x = a$$
* If $$f'(a) > 0$$: function increasing at $$x = a$$
* If $$f'(a) < 0$$: function decreasing at $$x = a$$
* If $$f'(a) = 0$$: possible local maximum/minimum or inflection point

#### **1.4 Example: Finding Derivative from Definition**

Find derivative of $$f(x) = x^2$$ using definition.

**Solution:**

$$
f'(x) = \lim\_{h \to 0} \frac{(x+h)^2 - x^2}{h}
$$

$$
\= \lim\_{h \to 0} \frac{x^2 + 2xh + h^2 - x^2}{h}
$$

$$
\= \lim\_{h \to 0} \frac{2xh + h^2}{h}
$$

$$
\= \lim\_{h \to 0} (2x + h) = 2x
$$

So $$f'(x) = 2x$$

***

### **2. Basic Differentiation Rules**

#### **2.1 Power Rule**

For any real number $$n$$:

$$
\frac{d}{dx}(x^n) = nx^{n-1}
$$

**Examples:**

* $$\frac{d}{dx}(x^3) = 3x^2$$
* $$\frac{d}{dx}(\sqrt{x}) = \frac{d}{dx}(x^{1/2}) = \frac{1}{2}x^{-1/2} = \frac{1}{2\sqrt{x}}$$
* $$\frac{d}{dx}\left(\frac{1}{x}\right) = \frac{d}{dx}(x^{-1}) = -x^{-2} = -\frac{1}{x^2}$$

#### **2.2 Constant Rule**

For constant $$c$$:

$$
\frac{d}{dx}(c) = 0
$$

#### **2.3 Constant Multiple Rule**

For constant $$c$$:

$$
\frac{d}{dx}\[c \cdot f(x)] = c \cdot f'(x)
$$

**Example:** $$\frac{d}{dx}(5x^3) = 5 \cdot 3x^2 = 15x^2$$

#### **2.4 Sum/Difference Rule**

$$
\frac{d}{dx}\[f(x) \pm g(x)] = f'(x) \pm g'(x)
$$

**Example:** $$\frac{d}{dx}(x^2 + 3x - 5) = 2x + 3$$

#### **2.5 Product Rule**

$$
\frac{d}{dx}\[f(x) \cdot g(x)] = f'(x)g(x) + f(x)g'(x)
$$

**Example:** Find $$\frac{d}{dx}(x^2 \sin x)$$

$$
\frac{d}{dx}(x^2 \sin x) = (2x)(\sin x) + (x^2)(\cos x) = 2x \sin x + x^2 \cos x
$$

#### **2.6 Quotient Rule**

$$
\frac{d}{dx}\left\[\frac{f(x)}{g(x)}\right] = \frac{f'(x)g(x) - f(x)g'(x)}{\[g(x)]^2} \quad (g(x) \neq 0)
$$

**Example:** Find $$\frac{d}{dx}\left(\frac{x}{x^2 + 1}\right)$$

$$
\frac{d}{dx}\left(\frac{x}{x^2 + 1}\right) = \frac{(1)(x^2 + 1) - (x)(2x)}{(x^2 + 1)^2}
$$

$$
\= \frac{x^2 + 1 - 2x^2}{(x^2 + 1)^2} = \frac{1 - x^2}{(x^2 + 1)^2}
$$

#### **2.7 Chain Rule**

For composite function $$f(g(x))$$:

$$
\frac{d}{dx}\[f(g(x))] = f'(g(x)) \cdot g'(x)
$$

Alternative notation: If $$y = f(u)$$ and $$u = g(x)$$, then:

$$
\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}
$$

**Example:** Find $$\frac{d}{dx}\[\sin(x^2)]$$

Let $$u = x^2$$, then $$y = \sin u$$

$$
\frac{dy}{du} = \cos u = \cos(x^2)
$$

$$
\frac{du}{dx} = 2x
$$

So $$\frac{dy}{dx} = \cos(x^2) \cdot 2x = 2x \cos(x^2)$$

***

### **3. Derivatives of Elementary Functions**

#### **3.1 Trigonometric Functions**

1. $$\frac{d}{dx}(\sin x) = \cos x$$
2. $$\frac{d}{dx}(\cos x) = -\sin x$$
3. $$\frac{d}{dx}(\tan x) = \sec^2 x$$
4. $$\frac{d}{dx}(\cot x) = -\csc^2 x$$
5. $$\frac{d}{dx}(\sec x) = \sec x \tan x$$
6. $$\frac{d}{dx}(\csc x) = -\csc x \cot x$$

#### **3.2 Exponential and Logarithmic Functions**

1. $$\frac{d}{dx}(e^x) = e^x$$
2. $$\frac{d}{dx}(a^x) = a^x \ln a \quad (a > 0, a \neq 1)$$
3. $$\frac{d}{dx}(\ln x) = \frac{1}{x} \quad (x > 0)$$
4. $$\frac{d}{dx}(\log\_a x) = \frac{1}{x \ln a} \quad (a > 0, a \neq 1)$$

#### **3.3 Inverse Trigonometric Functions**

1. $$\frac{d}{dx}(\sin^{-1} x) = \frac{1}{\sqrt{1 - x^2}} \quad (-1 < x < 1)$$
2. $$\frac{d}{dx}(\cos^{-1} x) = -\frac{1}{\sqrt{1 - x^2}} \quad (-1 < x < 1)$$
3. $$\frac{d}{dx}(\tan^{-1} x) = \frac{1}{1 + x^2}$$
4. $$\frac{d}{dx}(\cot^{-1} x) = -\frac{1}{1 + x^2}$$
5. $$\frac{d}{dx}(\sec^{-1} x) = \frac{1}{|x|\sqrt{x^2 - 1}} \quad (|x| > 1)$$
6. $$\frac{d}{dx}(\csc^{-1} x) = -\frac{1}{|x|\sqrt{x^2 - 1}} \quad (|x| > 1)$$

#### **3.4 Hyperbolic Functions**

1. $$\frac{d}{dx}(\sinh x) = \cosh x$$
2. $$\frac{d}{dx}(\cosh x) = \sinh x$$
3. $$\frac{d}{dx}(\tanh x) = \text{sech}^2 x$$

***

### **4. Higher Order Derivatives**

#### **4.1 Definition**

The **second derivative** is the derivative of the first derivative:

$$
f''(x) = \frac{d}{dx}\[f'(x)] = \frac{d^2f}{dx^2}
$$

The **n-th derivative**:

$$
f^{(n)}(x) = \frac{d^n f}{dx^n}
$$

#### **4.2 Notation**

* First derivative: $$f'(x)$$, $$f^{(1)}(x)$$, $$\frac{df}{dx}$$
* Second derivative: $$f''(x)$$, $$f^{(2)}(x)$$, $$\frac{d^2f}{dx^2}$$
* n-th derivative: $$f^{(n)}(x)$$, $$\frac{d^n f}{dx^n}$$

#### **4.3 Physical Interpretation**

* **Position → Velocity → Acceleration:**
  * If $$s(t)$$ = position, then $$v(t) = s'(t)$$ = velocity
  * $$a(t) = v'(t) = s''(t)$$ = acceleration
* **Curvature:** Second derivative gives information about concavity
  * $$f''(x) > 0$$: concave up
  * $$f''(x) < 0$$: concave down
  * $$f''(x) = 0$$: possible inflection point

#### **4.4 Example**

Find first three derivatives of $$f(x) = x^3 - 3x^2 + 2x$$

$$
f'(x) = 3x^2 - 6x + 2
$$

$$
f''(x) = 6x - 6
$$

$$
f'''(x) = 6
$$

***

### **5. Implicit Differentiation**

#### **5.1 What is Implicit Differentiation?**

Used when $$y$$ is defined implicitly as a function of $$x$$ by an equation, not explicitly as $$y = f(x)$$.

#### **5.2 Method**

1. Differentiate both sides of equation with respect to $$x$$
2. Treat $$y$$ as function of $$x$$ (use chain rule for $$y$$ terms)
3. Solve for $$\frac{dy}{dx}$$

#### **5.3 Examples**

**Example 1:** Find $$\frac{dy}{dx}$$ for $$x^2 + y^2 = 25$$

Differentiate both sides:

$$
\frac{d}{dx}(x^2) + \frac{d}{dx}(y^2) = \frac{d}{dx}(25)
$$

$$
2x + 2y \frac{dy}{dx} = 0
$$

Solve for $$\frac{dy}{dx}$$:

$$
2y \frac{dy}{dx} = -2x
$$

$$
\frac{dy}{dx} = -\frac{x}{y}
$$

**Example 2:** Find $$\frac{dy}{dx}$$ for $$x^3 + y^3 = 6xy$$

Differentiate:

$$
3x^2 + 3y^2 \frac{dy}{dx} = 6y + 6x \frac{dy}{dx}
$$

Rearrange:

$$
3y^2 \frac{dy}{dx} - 6x \frac{dy}{dx} = 6y - 3x^2
$$

$$
(3y^2 - 6x) \frac{dy}{dx} = 6y - 3x^2
$$

$$
\frac{dy}{dx} = \frac{6y - 3x^2}{3y^2 - 6x} = \frac{2y - x^2}{y^2 - 2x}
$$

***

### **6. Logarithmic Differentiation**

#### **6.1 When to Use**

Useful for:

1. Functions of form $$y = \[f(x)]^{g(x)}$$
2. Products/quotients with many factors
3. Functions with variables in both base and exponent

#### **6.2 Method**

1. Take natural logarithm of both sides: $$\ln y = \ln\[f(x)]$$
2. Simplify using logarithm properties
3. Differentiate implicitly with respect to $$x$$
4. Solve for $$\frac{dy}{dx}$$

#### **6.3 Examples**

**Example 1:** Find $$\frac{dy}{dx}$$ for $$y = x^x$$

Take natural log: $$\ln y = \ln(x^x) = x \ln x$$

Differentiate implicitly:

$$
\frac{1}{y} \frac{dy}{dx} = \ln x + x \cdot \frac{1}{x} = \ln x + 1
$$

$$
\frac{dy}{dx} = y(\ln x + 1) = x^x(\ln x + 1)
$$

**Example 2:** Find $$\frac{dy}{dx}$$ for $$y = \frac{(x+1)^2 \sqrt{x-1}}{(x+3)^3}$$

Take natural log:

$$
\ln y = 2\ln(x+1) + \frac{1}{2}\ln(x-1) - 3\ln(x+3)
$$

Differentiate:

$$
\frac{1}{y} \frac{dy}{dx} = \frac{2}{x+1} + \frac{1}{2(x-1)} - \frac{3}{x+3}
$$

$$
\frac{dy}{dx} = y\left\[\frac{2}{x+1} + \frac{1}{2(x-1)} - \frac{3}{x+3}\right]
$$

$$
\= \frac{(x+1)^2 \sqrt{x-1}}{(x+3)^3} \left\[\frac{2}{x+1} + \frac{1}{2(x-1)} - \frac{3}{x+3}\right]
$$

***

### **7. Applications of Derivatives**

#### **7.1 Tangent and Normal Lines**

* **Tangent line** at $$x = a$$: $$y - f(a) = f'(a)(x - a)$$
* **Normal line** at $$x = a$$: $$y - f(a) = -\frac{1}{f'(a)}(x - a)$$ (if $$f'(a) \neq 0$$)

**Example:** Find tangent and normal to $$y = x^2$$ at $$(2, 4)$$

$$f'(x) = 2x$$, so $$f'(2) = 4$$

Tangent: $$y - 4 = 4(x - 2)$$ or $$y = 4x - 4$$

Normal: $$y - 4 = -\frac{1}{4}(x - 2)$$ or $$y = -\frac{1}{4}x + \frac{9}{2}$$

#### **7.2 Rates of Change**

If $$y = f(x)$$, then $$\frac{dy}{dx}$$ = instantaneous rate of change of $$y$$ with respect to $$x$$.

**Example:** Radius of circle increasing at 3 cm/s. How fast is area changing when radius = 10 cm?

$$A = \pi r^2$$, $$\frac{dr}{dt} = 3$$

$$
\frac{dA}{dt} = \frac{dA}{dr} \cdot \frac{dr}{dt} = 2\pi r \cdot 3 = 6\pi r
$$

When $$r = 10$$: $$\frac{dA}{dt} = 6\pi(10) = 60\pi \text{ cm}^2/\text{s}$$

#### **7.3 Related Rates**

Problems where two or more quantities are related and changing over time.

**Strategy:**

1. Identify given rates and wanted rate
2. Find equation relating variables
3. Differentiate with respect to time
4. Substitute known values and solve

**Example:** Ladder 10 ft long slides down wall. Bottom moves away at 1 ft/s. How fast is top sliding down when bottom is 6 ft from wall?

Let $$x$$ = distance from wall, $$y$$ = height on wall

Given: $$x^2 + y^2 = 100$$, $$\frac{dx}{dt} = 1$$, find $$\frac{dy}{dt}$$ when $$x = 6$$

Differentiate: $$2x\frac{dx}{dt} + 2y\frac{dy}{dt} = 0$$

When $$x = 6$$, $$y = \sqrt{100 - 36} = \sqrt{64} = 8$$

$$
2(6)(1) + 2(8)\frac{dy}{dt} = 0
$$

$$
12 + 16\frac{dy}{dt} = 0
$$

$$
\frac{dy}{dt} = -\frac{12}{16} = -\frac{3}{4} \text{ ft/s}
$$

Negative means top is sliding down.

***

### **8. Partial Differentiation**

#### **8.1 Functions of Several Variables**

A function of two variables: $$z = f(x, y)$$

**Example:** $$f(x, y) = x^2 + 2xy + y^2$$

#### **8.2 Partial Derivatives**

* **Partial derivative with respect to** $$x$$**:** Treat $$y$$ as constant Notation: $$f\_x$$, $$\frac{\partial f}{\partial x}$$, $$\frac{\partial}{\partial x}f(x, y)$$
* **Partial derivative with respect to** $$y$$**:** Treat $$x$$ as constant Notation: $$f\_y$$, $$\frac{\partial f}{\partial y}$$, $$\frac{\partial}{\partial y}f(x, y)$$

#### **8.3 Computing Partial Derivatives**

**Example:** For $$f(x, y) = x^2y + \sin(xy)$$

$$
f\_x = \frac{\partial f}{\partial x} = 2xy + y\cos(xy)
$$

$$
f\_y = \frac{\partial f}{\partial y} = x^2 + x\cos(xy)
$$

#### **8.4 Higher Order Partial Derivatives**

For $$f(x, y)$$:

1. **Second partials:**
   * $$f\_{xx} = \frac{\partial}{\partial x}\left(\frac{\partial f}{\partial x}\right) = \frac{\partial^2 f}{\partial x^2}$$
   * $$f\_{yy} = \frac{\partial}{\partial y}\left(\frac{\partial f}{\partial y}\right) = \frac{\partial^2 f}{\partial y^2}$$
   * $$f\_{xy} = \frac{\partial}{\partial y}\left(\frac{\partial f}{\partial x}\right) = \frac{\partial^2 f}{\partial y \partial x}$$
   * $$f\_{yx} = \frac{\partial}{\partial x}\left(\frac{\partial f}{\partial y}\right) = \frac{\partial^2 f}{\partial x \partial y}$$
2. **Clairaut's Theorem:** If $$f\_{xy}$$ and $$f\_{yx}$$ are continuous, then $$f\_{xy} = f\_{yx}$$

#### **8.5 Example: Higher Order Partials**

For $$f(x, y) = e^{x^2 + y}$$

$$
f\_x = 2xe^{x^2 + y}
$$

$$
f\_y = e^{x^2 + y}
$$

$$
f\_{xx} = \frac{\partial}{\partial x}(2xe^{x^2 + y}) = 2e^{x^2 + y} + 4x^2e^{x^2 + y} = 2e^{x^2 + y}(1 + 2x^2)
$$

$$
f\_{yy} = \frac{\partial}{\partial y}(e^{x^2 + y}) = e^{x^2 + y}
$$

$$
f\_{xy} = \frac{\partial}{\partial y}(2xe^{x^2 + y}) = 2xe^{x^2 + y}
$$

$$
f\_{yx} = \frac{\partial}{\partial x}(e^{x^2 + y}) = 2xe^{x^2 + y}
$$

Note: $$f\_{xy} = f\_{yx}$$

***

### **9. Total Differential and Chain Rule for Partial Derivatives**

#### **9.1 Total Differential**

For $$z = f(x, y)$$, the total differential is:

$$
dz = \frac{\partial z}{\partial x} dx + \frac{\partial z}{\partial y} dy
$$

**Interpretation:** Approximate change in $$z$$ when $$x$$ changes by $$dx$$ and $$y$$ changes by $$dy$$.

#### **9.2 Chain Rule for Partial Derivatives**

**Case 1:** $$z = f(x, y)$$**,** $$x = g(t)$$**,** $$y = h(t)$$

$$
\frac{dz}{dt} = \frac{\partial z}{\partial x} \frac{dx}{dt} + \frac{\partial z}{\partial y} \frac{dy}{dt}
$$

**Case 2:** $$z = f(x, y)$$**,** $$x = g(s, t)$$**,** $$y = h(s, t)$$

$$
\frac{\partial z}{\partial s} = \frac{\partial z}{\partial x} \frac{\partial x}{\partial s} + \frac{\partial z}{\partial y} \frac{\partial y}{\partial s}
$$

$$
\frac{\partial z}{\partial t} = \frac{\partial z}{\partial x} \frac{\partial x}{\partial t} + \frac{\partial z}{\partial y} \frac{\partial y}{\partial t}
$$

#### **9.3 Example of Chain Rule**

Let $$z = x^2y$$, $$x = s + t$$, $$y = st$$

Find $$\frac{\partial z}{\partial s}$$ and $$\frac{\partial z}{\partial t}$$

First: $$\frac{\partial z}{\partial x} = 2xy$$, $$\frac{\partial z}{\partial y} = x^2$$

Also: $$\frac{\partial x}{\partial s} = 1$$, $$\frac{\partial x}{\partial t} = 1$$, $$\frac{\partial y}{\partial s} = t$$, $$\frac{\partial y}{\partial t} = s$$

Now:

$$
\frac{\partial z}{\partial s} = (2xy)(1) + (x^2)(t) = 2xy + tx^2
$$

Substitute $$x = s+t$$, $$y = st$$:

$$
\= 2(s+t)(st) + t(s+t)^2 = 2s^2t + 2st^2 + t(s^2 + 2st + t^2)
$$

$$
\= 2s^2t + 2st^2 + ts^2 + 2st^2 + t^3 = 3s^2t + 4st^2 + t^3
$$

Similarly:

$$
\frac{\partial z}{\partial t} = (2xy)(1) + (x^2)(s) = 2xy + sx^2
$$

Substitute: $$= 2(s+t)(st) + s(s+t)^2 = 2s^2t + 2st^2 + s^3 + 2s^2t + st^2$$

$$
\= s^3 + 4s^2t + 3st^2
$$

***

### **10. Gradient and Directional Derivatives**

#### **10.1 Gradient Vector**

For $$f(x, y)$$, the gradient is:

$$
\nabla f = \left\langle \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y} \right\rangle
$$

For $$f(x, y, z)$$:

$$
\nabla f = \left\langle \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}, \frac{\partial f}{\partial z} \right\rangle
$$

#### **10.2 Properties of Gradient**

1. Points in direction of maximum increase of $$f$$
2. Magnitude = maximum rate of increase
3. Perpendicular to level curves/surfaces

#### **10.3 Directional Derivative**

Rate of change of $$f$$ in direction of unit vector $$\vec{u} = \langle a, b \rangle$$:

$$
D\_{\vec{u}} f = \nabla f \cdot \vec{u} = f\_x a + f\_y b
$$

**Example:** Find directional derivative of $$f(x, y) = x^2 + y^2$$ at $$(1, 2)$$ in direction of $$\vec{v} = \langle 3, 4 \rangle$$

First, make $$\vec{v}$$ unit vector: $$|\vec{v}| = \sqrt{9 + 16} = 5$$

$$
\vec{u} = \left\langle \frac{3}{5}, \frac{4}{5} \right\rangle
$$

Gradient: $$\nabla f = \langle 2x, 2y \rangle$$

At $$(1, 2)$$: $$\nabla f(1, 2) = \langle 2, 4 \rangle$$

Directional derivative:

$$
D\_{\vec{u}} f = \langle 2, 4 \rangle \cdot \left\langle \frac{3}{5}, \frac{4}{5} \right\rangle = \frac{6}{5} + \frac{16}{5} = \frac{22}{5}
$$

***

### **11. Taylor Series and Maclaurin Series**

#### **11.1 Taylor Series for Single Variable**

For $$f(x)$$ about $$x = a$$:

$$
f(x) = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \frac{f'''(a)}{3!}(x-a)^3 + \cdots
$$

$$
\= \sum\_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^n
$$

#### **11.2 Maclaurin Series**

Taylor series about $$a = 0$$:

$$
f(x) = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \frac{f'''(0)}{3!}x^3 + \cdots
$$

#### **11.3 Important Maclaurin Series**

1. $$e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots = \sum\_{n=0}^{\infty} \frac{x^n}{n!}$$
2. $$\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots = \sum\_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{(2n+1)!}$$
3. $$\cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \cdots = \sum\_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{(2n)!}$$
4. $$\ln(1+x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} + \cdots = \sum\_{n=1}^{\infty} \frac{(-1)^{n-1} x^n}{n} \quad (|x| < 1)$$

#### **11.4 Taylor Series for Two Variables**

For $$f(x, y)$$ about $$(a, b)$$:

$$
f(x, y) = f(a, b) + f\_x(a, b)(x-a) + f\_y(a, b)(y-b)
$$

$$

* \frac{1}{2!}\[f\_{xx}(a, b)(x-a)^2 + 2f\_{xy}(a, b)(x-a)(y-b) + f\_{yy}(a, b)(y-b)^2] + \cdots
  $$

***

### **12. Applications of Partial Derivatives**

#### **12.1 Tangent Plane to Surface**

For surface $$z = f(x, y)$$ at point $$(x\_0, y\_0, z\_0)$$:

Equation of tangent plane:

$$
z - z\_0 = f\_x(x\_0, y\_0)(x - x\_0) + f\_y(x\_0, y\_0)(y - y\_0)
$$

**Example:** Find tangent plane to $$z = x^2 + y^2$$ at $$(1, 2, 5)$$

$$
f\_x = 2x \Rightarrow f\_x(1, 2) = 2
$$

$$
f\_y = 2y \Rightarrow f\_y(1, 2) = 4
$$

Tangent plane: $$z - 5 = 2(x - 1) + 4(y - 2)$$

$$
z = 2x - 2 + 4y - 8 + 5 = 2x + 4y - 5
$$

#### **12.2 Linear Approximation**

For $$f(x, y)$$ near $$(a, b)$$:

$$
L(x, y) = f(a, b) + f\_x(a, b)(x-a) + f\_y(a, b)(y-b)
$$

Approximation: $$f(x, y) \approx L(x, y)$$ for $$(x, y)$$ near $$(a, b)$$

#### **12.3 Optimization**

To find local maxima/minima of $$f(x, y)$$:

1. Find critical points: Solve $$f\_x = 0$$, $$f\_y = 0$$
2. Use Second Derivative Test: Let $$D = f\_{xx}f\_{yy} - (f\_{xy})^2$$ at critical point $$(a, b)$$
   * If $$D > 0$$ and $$f\_{xx} > 0$$: Local minimum
   * If $$D > 0$$ and $$f\_{xx} < 0$$: Local maximum
   * If $$D < 0$$: Saddle point
   * If $$D = 0$$: Test inconclusive

**Example:** Find and classify critical points of $$f(x, y) = x^2 + y^2 - 2x - 4y$$

$$
f\_x = 2x - 2 = 0 \Rightarrow x = 1
$$

$$
f\_y = 2y - 4 = 0 \Rightarrow y = 2
$$

Critical point: $$(1, 2)$$

Second derivatives: $$f\_{xx} = 2$$, $$f\_{yy} = 2$$, $$f\_{xy} = 0$$

$$
D = (2)(2) - (0)^2 = 4 > 0
$$

Since $$f\_{xx} = 2 > 0$$, $$(1, 2)$$ is local minimum.

***

### **13. Important Formulas Summary**

#### **13.1 Basic Differentiation Rules**

* Power rule: $$\frac{d}{dx}(x^n) = nx^{n-1}$$
* Product rule: $$(fg)' = f'g + fg'$$
* Quotient rule: $$\left(\frac{f}{g}\right)' = \frac{f'g - fg'}{g^2}$$
* Chain rule: $$\frac{d}{dx}\[f(g(x))] = f'(g(x))g'(x)$$

#### **13.2 Common Derivatives**

* $$\frac{d}{dx}(e^x) = e^x$$
* $$\frac{d}{dx}(\ln x) = \frac{1}{x}$$
* $$\frac{d}{dx}(\sin x) = \cos x$$
* $$\frac{d}{dx}(\cos x) = -\sin x$$
* $$\frac{d}{dx}(\tan^{-1} x) = \frac{1}{1+x^2}$$

#### **13.3 Partial Derivatives Notation**

* $$f\_x = \frac{\partial f}{\partial x}$$
* $$f\_{xy} = \frac{\partial^2 f}{\partial y \partial x}$$
* Gradient: $$\nabla f = \langle f\_x, f\_y \rangle$$

#### **13.4 Chain Rule for Partials**

$$
\frac{\partial z}{\partial t} = \frac{\partial z}{\partial x} \frac{\partial x}{\partial t} + \frac{\partial z}{\partial y} \frac{\partial y}{\partial t}
$$

***

### **14. Solved Examples**

#### **Example 1:** Implicit Differentiation

Find $$\frac{dy}{dx}$$ for $$x^2 + xy + y^2 = 3$$

**Solution:**

Differentiate term by term:

$$
2x + y + x\frac{dy}{dx} + 2y\frac{dy}{dx} = 0
$$

$$
(x + 2y)\frac{dy}{dx} = -2x - y
$$

$$
\frac{dy}{dx} = \frac{-2x - y}{x + 2y}
$$

#### **Example 2:** Logarithmic Differentiation

Find $$\frac{dy}{dx}$$ for $$y = (\sin x)^x$$

**Solution:**

Take $$\ln$$: $$\ln y = x \ln(\sin x)$$

Differentiate:

$$
\frac{1}{y}\frac{dy}{dx} = \ln(\sin x) + x \cdot \frac{\cos x}{\sin x}
$$

$$
\frac{dy}{dx} = y\left\[\ln(\sin x) + x\cot x\right] = (\sin x)^x\[\ln(\sin x) + x\cot x]
$$

#### **Example 3:** Partial Derivatives

Find all second partials of $$f(x, y) = x^3y + e^{xy}$$

**Solution:**

$$
f\_x = 3x^2y + ye^{xy}
$$

$$
f\_y = x^3 + xe^{xy}
$$

$$
f\_{xx} = \frac{\partial}{\partial x}(3x^2y + ye^{xy}) = 6xy + y^2e^{xy}
$$

$$
f\_{yy} = \frac{\partial}{\partial y}(x^3 + xe^{xy}) = x^2e^{xy}
$$

$$
f\_{xy} = \frac{\partial}{\partial y}(3x^2y + ye^{xy}) = 3x^2 + e^{xy} + xye^{xy}
$$

$$
f\_{yx} = \frac{\partial}{\partial x}(x^3 + xe^{xy}) = 3x^2 + e^{xy} + xye^{xy}
$$

Note $$f\_{xy} = f\_{yx}$$

***

### **15. Common Mistakes and Exam Tips**

#### **15.1 Common Mistakes**

1. **Chain rule errors:** Forgetting to multiply by derivative of inner function
2. **Product/quotient rule:** Misremembering formula signs
3. **Partial derivatives:** Forgetting which variable is held constant
4. **Implicit differentiation:** Forgetting to multiply by $$\frac{dy}{dx}$$ for $$y$$ terms
5. **Logarithmic differentiation:** Forgetting final step of multiplying by $$y$$

#### **15.2 Problem-Solving Strategy**

1. **Identify type:** Which rule(s) apply? (product, quotient, chain, implicit, etc.)
2. **Proceed systematically:** Write each step clearly
3. **Check work:** Verify derivative makes sense
4. **Simplify:** Final answer should be in simplest form

#### **15.3 Quick Checks**

1. **Derivative of constant = 0**
2. **Chain rule:** Always multiply by inside derivative
3. **Product rule:** $$(fg)' = f'g + fg'$$ (NOT $$f'g'$$)
4. **Quotient rule:** Denominator squared, minus sign in numerator
5. **Partial derivatives:** Only differentiate with respect to one variable at a time

This comprehensive theory covers all aspects of ordinary and partial differentiation with detailed explanations and examples, providing complete preparation for the entrance examination.
