A simplified guide on how to prep up on Mathematics for Artificial Intelligence, Machine Learning and Data Science: Calculus (Important Pointers only)
Module - II : Calculus
I. Limits and Continuity.
-> Limits, functions, derivatives, integrals, and infinite series.
1. Limits
The limit of as approaches is if, as gets arbitrarily close to , gets arbitrarily close to . This is written as:
Right-hand limit: lim x → a + f ( x ) \lim_{{x \to a^+}} f(x) Left-hand limit: lim x → a − f ( x ) \lim_{{x \to a^-}} f(x)
Removable Discontinuity: A hole in the graph (can be "fixed" by redefining the function at that point). Jump Discontinuity: A sudden jump in function values. Infinite Discontinuity: The function goes to infinity at the point.
Intermediate Value Theorem: If is continuous onf f and[ a , b ] [a, b] is betweenN N andf ( a ) f(a) , then there exists somef ( b ) f(b) such thatc ∈ ( a , b ) c \in (a, b) .f ( c ) = N - Extreme Value Theorem: If
is continuous onf f , then[ a , b ] [a, b] attains its maximum and minimum values, each at least once, onf f .[ a , b ] [a, b]
II. Derivatives and Differentiation Rules.
1. Derivatives
The derivative of a function
The derivative at a point is the slope of the tangent line to the function's graph at that point.
2. Differentiation Rules
(i). Power Rule
If
(ii). Constant Rule
If
(iii). Constant Multiple Rule
If
(iv). Sum Rule
If
(v). Difference Rule
If
(vi). Product Rule
If
(vii). Quotient Rule
If
(viii). Chain Rule
If
3. Higher-Order Derivatives
The second derivative of
Notation
- First derivative:
orf ′ ( x ) f'(x) d d x f ( x ) \frac{d}{dx}f(x) - Second derivative:
orf ′ ′ ( x ) f''(x) d 2 d x 2 f ( x ) \frac{d^2}{dx^2}f(x) - nth derivative:
orf ( n ) ( x ) f^{(n)}(x) d n d x n f ( x ) \frac{d^n}{dx^n}f(x)
III. Partial Derivatives.
If
Similarly, the partial derivative of
Notations:
or∂ f ∂ x \frac{\partial f}{\partial x} for the partial derivative with respect tof x f_x x x or∂ f ∂ y for the partial derivative with respect tof y f_y y y
Higher-Order Partial Derivatives
- The second partial derivative with respect to
:x x ∂ 2 f ∂ x 2 \frac{\partial^2 f}{\partial x^2} - The mixed partial derivative with respect to
and thenx x :y y ∂ 2 f ∂ x ∂ y \frac{\partial^2 f}{\partial x \partial y}
If
Eg:
Let
First partial derivatives:
and∂ f ∂ x = y e x y \frac{\partial f}{\partial x} = y e^{xy} ∂ f ∂ y = x e x y \frac{\partial f}{\partial y} = x e^{xy} Second mixed partial derivatives:
∂ 2 f ∂ x ∂ y = ∂ ∂ y ( y e x y ) = e x y + x y e x y ∂ 2 f ∂ y ∂ x = ∂ ∂ x ( x e x y ) = e x y + x y e x y \frac{\partial^2 f}{\partial y \partial x} = \frac{\partial}{\partial x} \left( x e^{xy} \right) = e^{xy} + xy e^{xy}
By Clairaut's theorem, if the mixed partial derivatives are continuous, they are equal:
IV. Gradient and Directional Derivatives.
1. Gradient
The gradient of a scalar function
Eg:
Let
The gradient of
Properties
- The gradient vector points in the direction of the steepest ascent.
- The magnitude of the gradient vector represents the rate of the steepest ascent.
2. Directional Derivative
The directional derivative of a function
Properties
- The directional derivative is the rate of change of the function in the direction of
.u \mathbf{u} - It reduces to the partial derivative when
is aligned with one of the coordinate axes.u \mathbf{u}
3. Relationship Between Gradient and Directional Derivative
The directional derivative in the direction of a unit vector
This relationship shows that the gradient vector provides all the information needed to compute the directional derivative in any direction.
V. Definite and Indefinite Integrals.
1. Definite Integral
The definite integral of
It is calculated as the difference in the values of an antiderivative
It represents the area under the curve of a function between two points on the x-axis. It is a number, not a function, and it accounts for the actual area bounded by the function and the x-axis between two specified limits.
2. Indefinite Integral
The indefinite integral of a function
The result is a function
Here,
Basic Rules of Indefinite Integrals
- Power Rule:
∫ x n d x = x n + 1 n + 1 + C ( n ≠ − 1 ) \int x^n \, dx = \frac{x^{n+1}}{n+1} + C \quad (n \neq -1) - Constant Multiple Rule:
∫ k ⋅ f ( x ) d x = k ∫ f ( x ) d x - Sum Rule:
∫ ( f ( x ) + g ( x ) ) d x = ∫ f ( x ) d x + ∫ g ( x ) d x
3. Fundamental Theorem of Calculus
This theorem connects the concept of differentiation and integration and has two parts:
- First Part: If
is an antiderivative ofF F on an intervalf f , then:[ a , b ] [a, b] ∫ a b f ( x ) d x = F ( b ) − F ( a ) \int_{a}^{b} f(x) \, dx = F(b) - F(a) - Second Part: If
is continuous onf f and[ a , b ] [a, b] is defined by:F F F ( x ) = ∫ a x f ( t ) d t
Then is continuous onF F , differentiable on[ a , b ] [a, b] , and( a , b ) (a, b) .F ′ ( x ) = f ( x ) F'(x) = f(x)
VI. Techniques of Integration.
1. Substitution
Substitution, or
Steps:
- Choose a substitution
.u = g ( x ) u = g(x) - Compute
.d u = g ′ ( x ) d x - Rewrite the integral in terms of
andu u .d u du - Integrate with respect to
.u u - Substitute back to the original variable.
2. Integration by Parts
Integration by parts is based on the product rule for differentiation and is useful for integrating products of functions.
Steps:
- Identify parts of the integrand to set
andu u .d v dv - Differentiate
to findu u , and integrated u du to findd v dv .v v - Apply the above formula.
3. Trigonometric Integrals
Integrating products of trigonometric functions often involves using trigonometric identities to simplify the integrand.
Eg:
Evaluate
- Use the identity
.sin 2 ( x ) = 1 − cos ( 2 x ) 2 \sin^2(x) = \frac{1 - \cos(2x)}{2} - The integral becomes
∫ 1 − cos ( 2 x ) 2 d x = 1 2 ∫ ( 1 − cos ( 2 x ) ) d x - Integrate:
1 2 ( x − sin ( 2 x ) 2 ) + C = x 2 − sin ( 2 x ) 4 + C \frac{1}{2} \left( x - \frac{\sin(2x)}{2} \right) + C = \frac{x}{2} - \frac{\sin(2x)}{4} + C
4. Trigonometric Substitution
Trigonometric substitution is used to simplify integrals involving square roots of quadratic expressions.
Rules:
5. Partial Fraction Decomposition
Partial fraction decomposition is used to integrate rational functions by expressing them as a sum of simpler fractions.
Steps
- Factor the denominator.
- Decompose the fraction into partial fractions.
- Integrate each partial fraction.
6. Integration by Partial Fractions
Integration by partial fractions is particularly useful for rational functions where the degree of the numerator is less than the degree of the denominator.
Eg:
Evaluate
- Factor the denominator:
.x 2 − x − 6 = ( x − 3 ) ( x + 2 ) x^2 - x - 6 = (x-3)(x+2) - Decompose:
2 x + 3 ( x − 3 ) ( x + 2 ) = A x − 3 + B x + 2 \frac{2x+3}{(x-3)(x+2)} = \frac{A}{x-3} + \frac{B}{x+2} - Find
andA A :B B
.2 x + 3 = A ( x + 2 ) + B ( x − 3 ) 2x + 3 = A(x + 2) + B(x - 3)
Solving gives ,A = 1 .B = 1 B = 1 - The integral becomes
∫ ( 1 x − 3 + 1 x + 2 ) d x = ∫ 1 x − 3 d x + ∫ 1 x + 2 d x - Integrate:
ln ∣ x − 3 ∣ + ln ∣ x + 2 ∣ + C = ln ∣ ( x − 3 ) ( x + 2 ) ∣ + C
VII. Multiple Integrals.
The concept of integration to functions of more than one variable, enabling the calculation of volumes, areas, and other quantities in higher dimensions.
1. Double Integrals
The double integral of
If
Eg:
Evaluate
First, integrate with respect to
Next, integrate with respect to
So,
2. Triple Integrals
To integrate functions of three variables over a three-dimensional region.
The triple integral of
If
VIII. Line and Surface Integrals.
1. Line Integrals
Line integrals, also known as path integrals, integrate a function along a curve.
For a scalar field
For a vector field
∫
2. Surface Integrals
Surface integrals integrate a function over a surface in three-dimensional space.
For a scalar field
For a vector field
∬
