0% found this document useful (0 votes)
3 views17 pages

Mathematics Study Guide RME

MSc in RME DU math-guide

Uploaded by

201918037
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views17 pages

Mathematics Study Guide RME

MSc in RME DU math-guide

Uploaded by

201918037
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Mathematics

10 Topics Covered
• Limits, continuity and L'Hopital's rule
• Differentiation — all rules and standard derivatives
• Integration — all techniques, definite and indefinite
• Maxima and minima — optimisation problems
• Partial derivatives, gradient, Jacobian matrix
• Matrices, determinants, systems of equations
• Eigenvalues, eigenvectors, matrix rank
• 1st and 2nd order ODEs
• Laplace transforms and inverse Laplace
• Numerical methods — Newton-Raphson, Simpson's rule
1. Limits, Continuity & L'Hopital's Rule Foundation of all calculus

1.1 What is a limit?

The limit describes the value a function approaches as the input gets closer to some point — even if the function is
undefined at that exact point. Written as: lim(x to a) f(x) = L

Concept Definition Exists when

Left-hand limit x approaches a from the LEFT (x to a-) lim(x to a-) f(x) = L_left

Right-hand limit x approaches a from the RIGHT (x to a+) lim(x to a+) f(x) = L_right

Two-sided limit x approaches a from either side Left-hand limit = Right-hand limit = L

Continuity at x=a f behaves smoothly at x=a with no jumps or holes (1) f(a) exists (2) limit exists (3) lim = f(a)

Basic limit laws (assuming lim f and lim g exist as x approaches a):
lim(f + g) = lim(f) + lim(g)
lim(f - g) = lim(f) - lim(g)
lim(f * g) = lim(f) * lim(g)
lim(f / g) = lim(f) / lim(g) [provided lim(g) is not 0]
lim(c) = c (constant rule)
lim(x^n) = a^n (direct substitution when no 0/0 issue)

1.2 L'Hopital's rule — resolving indeterminate forms

When direct substitution gives 0/0 or infinity/infinity, the limit is indeterminate. L'Hopital's rule resolves it by
differentiating numerator and denominator separately (NOT the quotient rule).
L'Hopital's rule:
If lim f(x)/g(x) gives 0/0 or inf/inf as x approaches a, then:
lim f(x)/g(x) = lim f'(x)/g'(x)

Differentiate TOP and BOTTOM separately.


Apply repeatedly if the result is still indeterminate.

Common indeterminate forms:


0/0 inf/inf 0 * inf inf - inf 0^0 1^inf inf^0

Example: Find lim(x to 0) sin(x) / x [famous limit — result = 1]


Direct substitution: sin(0)/0 = 0/0 — indeterminate — apply L'Hopital
d/dx[sin(x)] = cos(x)
d/dx[x] = 1
lim(x to 0) cos(x)/1 = cos(0)/1 = 1/1 = 1
Answer: lim(x to 0) sin(x)/x = 1

Example: Find lim(x to inf) (3x^2 + 2x) / (5x^2 - 1)


Direct substitution: inf/inf — apply L'Hopital twice
1st application: (6x + 2) / (10x) — still inf/inf
2nd application: 6 / 10 = 3/5
Answer: 3/5 (same as dividing leading coefficients: 3x^2 / 5x^2 = 3/5)
2. Differentiation — All Rules & Techniques Derivation

2.1 Definition and physical meaning

The derivative f'(x) is the instantaneous rate of change of f at x — equivalently, the slope of the tangent line to the
curve at that point. Formally defined as a limit of the difference quotient.
Definition (first principles):
f'(x) = lim(h to 0) [f(x+h) - f(x)] / h

Notation: f'(x) = dy/dx = d/dx[f(x)] = Df(x)

Physical meanings:
If f = position -> f' = velocity -> f'' = acceleration
If f = total cost -> f' = marginal cost
If f = voltage -> f' = rate of change of voltage

2.2 All differentiation rules

Rule Formula Worked example

Power rule d/dx[x^n] = n * x^(n-1) d/dx[x^5] = 5x^4

Constant d/dx[c] = 0 d/dx[7] = 0

Constant multiple d/dx[c*f] = c * f' d/dx[3x^2] = 6x

Sum / difference d/dx[f +/- g] = f' +/- g' d/dx[x^2 + sin x] = 2x + cos x

Product rule d/dx[f*g] = f'g + fg' d/dx[x^2 * sin x] = 2x*sin x + x^2*cos x

Quotient rule d/dx[f/g] = (f'g - fg') / g^2 d/dx[sin x / x] = (x*cos x - sin x) / x^2

Chain rule d/dx[f(g(x))] = f'(g(x)) * g'(x) d/dx[sin(x^2)] = cos(x^2) * 2x

2.3 Standard derivatives table — memorise all of these

f(x) f'(x) f(x) f'(x)

xn n × x(n-1) sin x cos x

ex ex cos x -sin x

ax ax × ln(a) tan x sec2(x)

ln x 1/x sin-1 x 1 / √(1-x2)

Log 1 / (x × ln tan-1 x 1 / (1+x2)


{a(x)} a)

Example: Chain rule: differentiate f(x) = e^(3x^2 + 2x)


Outer function: e^u -> derivative = e^u
Inner function: u = 3x^2 + 2x -> u' = 6x + 2
Chain rule: f'(x) = e^(3x^2+2x) * (6x + 2)

Example: Product rule: d/dx [x^3 * ln(x)]


f = x^3, f' = 3x^2
g = ln x, g' = 1/x
d/dx[f*g] = f'g + fg' = 3x^2 * ln(x) + x^3 * (1/x) = 3x^2*ln(x) + x^2
2.4 Higher-order derivatives and implicit differentiation

Higher-order derivatives:
f''(x) = d^2y/dx^2 (second derivative — measures concavity and acceleration)
f'''(x) = d^3y/dx^3 (third derivative)

f''(a) > 0 -> concave UP at a (like a smile / valley)


f''(a) < 0 -> concave DOWN at a (like a frown / hill)

Implicit differentiation (when y cannot be isolated):


Differentiate BOTH sides w.r.t. x.
Every time you differentiate y, multiply by dy/dx.

Example: x^2 + y^2 = 25 (equation of a circle)


Differentiating both sides: 2x + 2y * (dy/dx) = 0
Solving: dy/dx = -2x / (2y) = -x/y
3. Integration — Definite, Indefinite & Techniques

3.1 Fundamental theorem and standard integrals

Indefinite integral (antiderivative):


integral f(x) dx = F(x) + C where F'(x) = f(x)
ALWAYS include + C (constant of integration) for indefinite integrals!

Definite integral (net area under curve from a to b):


integral[a to b] f(x) dx = F(b) - F(a) (no + C needed)

Fundamental Theorem of Calculus:


d/dx [integral(a to x) f(t) dt] = f(x)
(differentiation and integration are exact inverses)

integral f(x) dx Result + C integral f(x) dx Result + C

x^n dx (n not -1) x^(n+1) / (n+1) sin x dx -cos x

1/x dx ln|x| cos x dx sin x

e^x dx e^x sec^2(x) dx tan x

a^x dx a^x / ln(a) 1/sqrt(1-x^2) dx sin^(-1) x

1/(1+x^2) dx tan^(-1) x ln x dx x*ln(x) - x

3.2 Integration by substitution (u-substitution)

Use when the integrand contains a composite function and its derivative. Substitute u = inner function to convert to a
simpler integral.
Procedure:
1. Identify u = g(x) (choose the inner function)
2. Compute du = g'(x) dx -> dx = du / g'(x)
3. Substitute: replace g(x) with u and dx with du/g'(x)
4. Integrate the simpler expression in terms of u
5. Substitute back: replace u with g(x)
Hint for choosing u: look for a function whose derivative also appears in the integrand.

Example: Integral of 2x * e^(x^2) dx


Let u = x^2 -> du = 2x dx -> 2x dx = du
Integral 2x * e^(x^2) dx = integral e^u du = e^u + C = e^(x^2) + C

Example: Integral of cos(3x+1) dx


Let u = 3x+1 -> du = 3 dx -> dx = du/3
Integral cos(u) * du/3 = (1/3) sin(u) + C = (1/3) sin(3x+1) + C

3.3 Integration by parts — LIATE rule

Used when the integrand is a product of two different types of functions. Converts one integral into a simpler one.
Choose u using the LIATE priority order.
Formula: integral u dv = u*v - integral v du

LIATE rule — choose u as whichever comes FIRST in this list:


L = Logarithmic functions: ln x, log x <- highest priority for u
I = Inverse trigonometric: sin^-1 x, tan^-1 x
A = Algebraic (polynomial): x^2, 3x+1, x
T = Trigonometric: sin x, cos x, tan x
E = Exponential: e^x, a^x <- lowest priority for u
(The other function becomes dv — you need to integrate it to get v)
Example: Integral of x * e^x dx [x is Algebraic (A), e^x is Exponential (E) -> u=x]
u = x -> du = dx
dv = e^x dx -> v = e^x
Integral x*e^x dx = x*e^x - integral e^x dx = x*e^x - e^x + C = e^x(x-1) + C

Example: Integral of ln(x) dx [ln x is Logarithmic (L) -> u=ln(x), dv=dx]


u = ln x -> du = (1/x) dx
dv = dx -> v = x
Integral ln x dx = x*ln(x) - integral x*(1/x) dx = x*ln(x) - integral 1 dx
= x*ln(x) - x + C

Exam tip: Tabular integration (rapid repeated by-parts): when u is a polynomial (e.g. x^3*e^x), set up a table — repeatedly
differentiate u column, repeatedly integrate dv column, multiply diagonals with alternating +/- signs. Much faster than applying
the formula repeatedly.
4. Maxima, Minima & Optimisation 'Finding extreme point'

4.1 Critical points — where extrema occur

A critical point is where f'(x) = 0 or f'(x) is undefined. At a critical point, the function may have a local maximum, local
minimum, or neither (saddle/inflection point).
Finding extrema — systematic procedure:

STEP 1: Find f'(x) and solve f'(x) = 0 -> critical points c_1, c_2, ...

STEP 2: Classify each critical point using the Second Derivative Test:
f''(c) > 0 -> LOCAL MINIMUM (concave UP at c — valley shape)
f''(c) < 0 -> LOCAL MAXIMUM (concave DOWN at c — hill shape)
f''(c) = 0 -> INCONCLUSIVE (use First Derivative Test or higher derivatives)

STEP 3: Evaluate f at all critical points AND at endpoints to find GLOBAL extrema.

Useful signs:
f'(x) > 0 on interval -> f is INCREASING (going uphill)
f'(x) < 0 on interval -> f is DECREASING (going downhill)

Example: Find all extrema of f(x) = 2x^3 - 3x^2 - 12x + 4


Step 1: f'(x) = 6x^2 - 6x - 12 = 6(x^2 - x - 2) = 6(x-2)(x+1)
f'(x) = 0 -> x = 2 or x = -1

Step 2: f''(x) = 12x - 6


At x = 2: f''(2) = 24 - 6 = 18 > 0 -> LOCAL MINIMUM
At x = -1: f''(-1) = -12 - 6 = -18 < 0 -> LOCAL MAXIMUM

Step 3: f(2) = 2(8) - 3(4) - 12(2) + 4 = 16 - 12 - 24 + 4 = -16 <- local min


f(-1) = 2(-1) - 3(1) - 12(-1) + 4 = -2 - 3 + 12 + 4 = 11 <- local max

4.2 First derivative test — alternative classification

Check the SIGN of f'(x) on each side of the critical point c:

f' changes: + -> 0 -> - (positive to negative) -> LOCAL MAXIMUM


f' changes: - -> 0 -> + (negative to positive) -> LOCAL MINIMUM
f' same sign on both sides -> INFLECTION POINT (no extremum)

Inflection points: where f''(x) = 0 AND f'' changes sign (concavity changes).
At inflection: curve changes from concave up to concave down (or vice versa).

Exam tip: Optimisation word problem strategy: (1) define one variable, (2) write an expression for the quantity to optimise (area,
cost, time), (3) use any constraint to reduce to one variable, (4) differentiate and set = 0, (5) use second derivative test to
confirm max or min.
5. Partial Derivatives, Gradient & Jacobian Matrix Jacobian matrix

5.1 Partial derivatives

For a function of several variables f(x, y), a partial derivative measures how f changes when only one variable
changes while all others are held constant.
Notation: df/dx = f_x (partial derivative w.r.t. x)
df/dy = f_y (partial derivative w.r.t. y)

To compute df/dx: treat ALL variables except x as CONSTANTS, differentiate w.r.t. x.


To compute df/dy: treat ALL variables except y as CONSTANTS, differentiate w.r.t. y.

Mixed partial derivatives (order usually doesn't matter for smooth functions):
d^2f/dxdy = d/dx[df/dy] (differentiate first w.r.t. y, then w.r.t. x)
Clairaut's theorem: d^2f/dxdy = d^2f/dydx (for continuous second partials)

Example: Find df/dx and df/dy for f(x,y) = x^3*y^2 + 2xy + y^3
df/dx (treat y as constant):
= 3x^2 * y^2 + 2y + 0 (y^3 has no x -> derivative = 0)

df/dy (treat x as constant):


= 2x^3 * y + 2x + 3y^2 (x^3 is constant; d/dy[y^2]=2y; d/dy[y^3]=3y^2)

5.2 Gradient vector — direction of steepest increase

Gradient: grad(f) = (df/dx) i-hat + (df/dy) j-hat + (df/dz) k-hat

Physical meaning:
grad(f) points in direction of STEEPEST ASCENT (fastest increase)
|grad(f)| = magnitude = rate of maximum increase
grad(f) = 0 at critical points (candidates for max, min, saddle points)
grad(f) is perpendicular to level curves / surfaces

Directional derivative (rate of change in direction of unit vector u-hat):


D_u f = grad(f) . u-hat = |grad(f)| * cos(theta)
Maximum when u-hat is parallel to grad(f) (steepest direction)
Zero when u-hat is perpendicular to grad(f) (along level curve)

5.3 Jacobian matrix — the derivative of a vector function

The Jacobian generalises the derivative to vector-valued functions of multiple variables. It contains all first-order
partial derivatives in a matrix. Confirmed directly in the previous exam.
For a vector function F: R^n -> R^m
F(x_1, x_2, ..., x_n) = [f_1, f_2, ..., f_m]^T

Jacobian matrix J (m x n matrix of all partial derivatives):


J = [ df_i / dx_j ] (row i = function f_i, column j = variable x_j)

[ df_1/dx_1 df_1/dx_2 ... df_1/dx_n ]


J = [ df_2/dx_1 df_2/dx_2 ... df_2/dx_n ]
[ ... ... ... ... ]
[ df_m/dx_1 df_m/dx_2 ... df_m/dx_n ]

Jacobian determinant (when m = n, square matrix):


det(J) = volume scaling factor of the transformation
det(J) = 0 -> transformation is singular (collapses a dimension)

Used in: coordinate changes, robotics velocity analysis, Newton's method for systems
Example: Find the Jacobian of F(x,y) = [x^2*y, x + y^2] (2 functions, 2 variables)
f_1 = x^2*y, f_2 = x + y^2

df_1/dx = 2xy, df_1/dy = x^2


df_2/dx = 1, df_2/dy = 2y

[ 2xy x^2 ]
J = [ 1 2y ]

det(J) = 2xy * 2y - x^2 * 1 = 4xy^2 - x^2 = x(4y^2 - x)

Link to robotics: The velocity Jacobian in robot kinematics is the SAME concept.
Ẋ = J(theta) * theta_dot relates joint velocities to end-effector velocity.
det(J)=0 means a singularity where the robot loses a degree of motion.
6. Matrices, Determinants & Systems of Equations Matrix operations

6.1 Matrix operations

Addition/subtraction (A +/- B): same dimensions required


(A +/- B)_ij = A_ij +/- B_ij

Scalar multiplication: (cA)_ij = c * A_ij

Matrix multiplication (A is m x n, B is n x p -> AB is m x p):


(AB)_ij = sum_k A_ik * B_kj (row i of A . column j of B)
NOT commutative: AB is NOT equal to BA in general!

Transpose: (A^T)_ij = A_ji (swap rows and columns)


Properties: (AB)^T = B^T * A^T (A^T)^T = A

6.2 Determinants

2x2 determinant:
| a b |
| c d | = ad - bc

3x3 determinant (cofactor expansion along row 1):


| a11 a12 a13 |
| a21 a22 a23 | = a11(a22*a33 - a23*a32) - a12(a21*a33 - a23*a31) + a13(a21*a32 - a22*a31)
| a31 a32 a33 |

Key properties:
det(AB) = det(A) * det(B)
det(A^T) = det(A)
det(cA) = c^n * det(A) for n x n matrix
Any row/column all zeros -> det = 0
Two identical rows -> det = 0
det = 0 -> matrix is SINGULAR (no inverse, no unique solution)

Example: 3x3 determinant for A = [[1,2,3],[0,1,4],[5,6,0]]


det(A) = 1*(1*0 - 4*6) - 2*(0*0 - 4*5) + 3*(0*6 - 1*5)
= 1*(0-24) - 2*(0-20) + 3*(0-5) = (-24) - (-40) + (-15) = -24 + 40 - 15 = 1

6.3 Matrix inverse and solving linear systems

2x2 inverse (if det is not zero):


A = [a b; c d] -> A^(-1) = (1/det(A)) * [d, -b; -c, a]
(swap main diagonal, negate off-diagonal, divide by determinant)

Solving Ax = b by Gauss-Jordan elimination:


1. Form augmented matrix [A | b]
2. Apply row operations to reduce A to identity matrix I
3. Right side becomes the solution: x = A^(-1)b

Cramer's rule (for 2x2 and 3x3 by hand):


x_j = det(A_j) / det(A)
where A_j = matrix A with column j REPLACED by the vector b

Example: Solve: 2x + y = 5 and x + 3y = 10 using Cramer's rule


A = [2 1; 1 3], b = [5; 10]
det(A) = 2*3 - 1*1 = 6 - 1 = 5

A_x = [5 1; 10 3]: det(A_x) = 5*3 - 1*10 = 15 - 10 = 5 x = det(A_x)/det(A) = 5/5 = 1

A_y = [2 5; 1 10]: det(A_y) = 2*10 - 5*1 = 20 - 5 = 15 y = det(A_y)/det(A) = 15/5 = 3


Verification: 2(1)+3=5 checkmark 1+3(3)=10 checkmark
7. Eigenvalues, Eigenvectors & Matrix Rank Characteristic equation and Cayley-Hamilton
theorem

7.1 Eigenvalues and eigenvectors

For a square matrix A, an eigenvector is a non-zero vector v that only gets scaled (not rotated) when multiplied by A.
The scaling factor is the corresponding eigenvalue lambda.
Definition: A * v = lambda * v
(multiplying eigenvector v by A = same as scaling v by lambda)

Equivalently: (A - lambda*I) * v = 0
For non-trivial solution: det(A - lambda*I) = 0
This is the CHARACTERISTIC EQUATION.

Procedure:
STEP 1: Solve det(A - lambda*I) = 0
This gives the characteristic polynomial in lambda.
Its roots lambda_1, lambda_2, ... are the eigenvalues.

STEP 2: For each eigenvalue lambda_i:


Substitute into (A - lambda_i * I) * v = 0
Solve for v (eigenvector).
Expect one free variable — eigenvectors are determined up to a scalar multiple.

Example: Find eigenvalues and eigenvectors of A = [[4,1],[2,3]]


Step 1: det(A - lambda*I) = det([[4-lambda, 1],[2, 3-lambda]]) = 0
(4-lambda)(3-lambda) - 2*1 = 0
12 - 4*lambda - 3*lambda + lambda^2 - 2 = 0
lambda^2 - 7*lambda + 10 = 0
(lambda - 5)(lambda - 2) = 0 -> lambda_1 = 5, lambda_2 = 2

Step 2 for lambda_1 = 5:


(A - 5I)v = [[-1,1],[2,-2]]v = 0
-v_1 + v_2 = 0 -> v_2 = v_1
Eigenvector: v_1 = [1, 1]^T (or any scalar multiple: [2,2], [-3,-3], etc.)

Step 2 for lambda_2 = 2:


(A - 2I)v = [[2,1],[2,1]]v = 0
2v_1 + v_2 = 0 -> v_2 = -2*v_1
Eigenvector: v_2 = [1, -2]^T

7.2 Cayley-Hamilton theorem and matrix rank

Cayley-Hamilton theorem:
Every square matrix satisfies its own characteristic equation.
Example: if characteristic equation is lambda^2 - 7*lambda + 10 = 0
Then: A^2 - 7A + 10I = 0 (substitute A for lambda)
Use: compute A^(-1) or high powers of A efficiently without brute-force multiplication.

Matrix rank:
Rank = number of linearly independent rows = non-zero rows in row echelon form
For m x n matrix: rank is at most min(m, n)
Full rank (square): rank = n -> det is not 0 -> matrix is invertible

Nullity and null space:


Null space = all vectors x such that Ax = 0 (the solution set of the homogeneous system)
Nullity = n - rank(A) (dimension of the null space)
Rank + Nullity = n (number of columns) -- Rank-Nullity Theorem
8. Ordinary Differential Equations (ODEs) 1st and 2nd order

8.1 Introduction and classification

A differential equation contains a function and its derivatives. The solution is a function — not just a number. ODEs
are used throughout engineering: control systems, robot dynamics, circuit analysis, vibration.
Term Meaning Example

Order Highest derivative present y' = first order; y'' = second order

y and all its derivatives appear to the first power only —


Linear ODE dy/dx + P(x)y = Q(x)
no y*y', no (y')^2

Homogeneous Right-hand side = 0 ay'' + by' + cy = 0

Non-homogeneous Right-hand side has a function of x ay'' + by' + cy = f(x)

Contains arbitrary constants C_1, C_2 (= family of


General solution y = C_1*e^(2x) + C_2*e^(3x)
solutions)

Particular solution Constants determined by applying initial conditions y(0)=1, y'(0)=0 -> specific C values

8.2 First order ODEs — three methods

METHOD 1 — Separable: f(y) dy = g(x) dx


Separate x and y to opposite sides, then integrate both sides.
Example: dy/dx = x*y
-> dy/y = x dx
-> ln|y| = x^2/2 + C
-> y = A*e^(x^2/2) where A = e^C (arbitrary constant)

METHOD 2 — Linear first order: dy/dx + P(x)*y = Q(x)


Integrating factor: mu(x) = e^(integral P(x) dx)
Multiply both sides by mu: d/dx [mu * y] = mu * Q(x)
Integrate both sides: mu * y = integral mu*Q(x) dx + C
Solve for y.

METHOD 3 — Exact: M dx + N dy = 0
Exact if dM/dy = dN/dx
Solution F(x,y) = C where: dF/dx = M, dF/dy = N

Example: Linear 1st order: dy/dx + (2/x)y = x^2 — find general solution
P(x) = 2/x, Q(x) = x^2
Integrating factor: mu = e^(integral 2/x dx) = e^(2*ln x) = x^2

Multiply both sides by x^2:


d/dx[x^2 * y] = x^2 * x^2 = x^4

Integrate: x^2 * y = x^5/5 + C

Solve for y: y = x^3/5 + C/x^2

8.3 Second order linear ODE with constant coefficients

General form: a*y'' + b*y' + c*y = f(x)

STEP 1: Solve homogeneous equation (right side = 0): a*r^2 + b*r + c = 0


(substitute y = e^(rx) -> characteristic equation in r)

CASE 1: Two distinct real roots r_1 not equal to r_2


y_h = C_1*e^(r_1*x) + C_2*e^(r_2*x)
CASE 2: Repeated real root r_1 = r_2 = r
y_h = (C_1 + C_2*x) * e^(r*x)

CASE 3: Complex conjugate roots r = alpha +/- beta*j


y_h = e^(alpha*x) * [C_1*cos(beta*x) + C_2*sin(beta*x)]

STEP 2: Find particular solution y_p (method of undetermined coefficients)


STEP 3: General solution: y = y_h + y_p
STEP 4: Apply initial conditions to find C_1, C_2

Example: Solve: y'' - 5y' + 6y = 0, with y(0)=2, y'(0)=5


Characteristic equation: r^2 - 5r + 6 = 0 -> (r-2)(r-3) = 0
r_1 = 2, r_2 = 3 -> Case 1 (distinct real roots)
y_h = C_1*e^(2x) + C_2*e^(3x)

Apply initial conditions:


y(0) = 2: C_1 + C_2 = 2 ... equation (i)
y'(0) = 5: 2*C_1 + 3*C_2 = 5 ... equation (ii)
From (i): C_1 = 2 - C_2
Substitute into (ii): 2(2-C_2) + 3*C_2 = 5 -> 4 + C_2 = 5 -> C_2 = 1, C_1 = 1

General solution: y = e^(2x) + e^(3x)


9. Laplace Transforms — Solving ODEs Algebraically the table and method

9.1 Definition and purpose

The Laplace transform converts a function of time f(t) into a function of complex frequency F(s). This transforms a
differential equation in t into an algebraic equation in s — which is much easier to solve.
Definition:
L{f(t)} = F(s) = integral[0 to inf] f(t) * e^(-s*t) dt

Workflow (the power of Laplace):


ODE in t -> [Laplace transform] ->
Algebraic equation in s
| solve for F(s)
Solution y(t) <- [Inverse Laplace] <- F(s)

Linearity (most important property):


L{a*f(t) + b*g(t)} = a*F(s) + b*G(s)

Key derivative properties:


L{f'(t)} = s*F(s) - f(0)
L{f''(t)} = s^2*F(s) - s*f(0) - f'(0)
(Initial conditions y(0), y'(0) enter AUTOMATICALLY — no need to find C_1, C_2 separately!)

9.2 Laplace transform table — memorise all of these

f(t) L{f(t)} = F(s) f(t) L{f(t)} = F(s)

1 1/s sin(at) a / (s^2 + a^2)

t 1/s^2 cos(at) s / (s^2 + a^2)

t^n n! / s^(n+1) sinh(at) a / (s^2 - a^2)

e^(at) 1 / (s - a) cosh(at) s / (s^2 - a^2)

t*e^(at) 1 / (s-a)^2 t*sin(at) 2as / (s^2+a^2)^2

delta(t) impulse 1 u(t) unit step 1/s

Shifting theorems:
First shifting: L{e^(at)*f(t)} = F(s-a) (shift in s-domain)

Partial fractions — needed to invert F(s):


Decompose F(s) into simple fractions recognisable from the table.
1/(s+a)(s+b) = A/(s+a) + B/(s+b) find A and B by substituting s=-a and s=-b
1/(s+a)^2 = A/(s+a) + B/(s+a)^2 use cover-up method for A, compare for B

9.3 Complete ODE solution using Laplace — worked example

Example: Solve y'' + 3y' + 2y = 0, with y(0)=1 and y'(0)=0 using Laplace transforms

Step 1: Take Laplace of every term Step 4: Partial fraction decomposition


L{y''} + 3*L{y'} + 2*L{y} = 0 (s+3) / [(s+1)(s+2)] = A/(s+1) + B/(s+2)
[s^2*Y - s*1 - 0] + 3*[s*Y - 1] + 2*Y = 0 s+3 = A*(s+2) + B*(s+1)
(substituting y(0)=1, y'(0)=0) s=-1: 2 = A*(1) -> A = 2
s=-2: 1 = B*(-1) -> B = -1
Step 2: Collect terms in Y(s) Y(s) = 2/(s+1) - 1/(s+2)
s^2*Y - s + 3s*Y - 3 + 2Y = 0
Y*(s^2 + 3s + 2) = s + 3 Step 5: Inverse Laplace using table
y(t) = 2*e^(-t) - e^(-2t)
Step 3: Solve for Y(s)
Y = (s+3) / (s^2+3s+2) = (s+3) / [(s+1)(s+2)]

Verification: y(0) = 2-1 = 1 checkmark y'(0) = -2+2 = 0 checkmark


10. Numerical Methods — Root Finding & Integration Newton-Raphson, Bisection,
Simpson's rule

10.1 Bisection method — simple and guaranteed

If f(a) and f(b) have opposite signs, a root lies between a and b (Intermediate Value Theorem). Bisection repeatedly
halves the interval until the root is pinpointed to any desired accuracy.
Procedure:
1. Choose a, b such that f(a)*f(b) < 0 (opposite signs -> root between them)
2. Compute midpoint: c = (a + b) / 2
3. If |f(c)| < tolerance -> c is the root. STOP.
If f(a)*f(c) < 0 -> root in [a, c] -> set b = c
If f(c)*f(b) < 0 -> root in [c, b] -> set a = c
4. Repeat from step 2

Convergence rate: LINEAR (slow — one correct bit per iteration)


Error after n iterations: |error| <= (b-a) / 2^n
Advantage: ALWAYS converges if starting interval brackets the root

Example: Find root of f(x) = x^3 - x - 2 in [1, 2] — first 3 iterations


f(1) = 1-1-2 = -2 (negative), f(2) = 8-2-2 = 4 (positive) -> root in [1, 2]

Iter 1: c = (1+2)/2 = 1.5


f(1.5) = 3.375-1.5-2 = -0.125 (negative)
f(1.5)<0, f(2)>0 -> root in [1.5, 2]

Iter 2: c = (1.5+2)/2 = 1.75


f(1.75) = 5.359-1.75-2 = 1.609 (positive)
f(1.5)<0, f(1.75)>0 -> root in [1.5, 1.75]

Iter 3: c = (1.5+1.75)/2 = 1.625


f(1.625) = 4.291-1.625-2 = 0.666 (positive)
-> root in [1.5, 1.625]. True root is approximately 1.5214

10.2 Newton-Raphson method — fast quadratic convergence

Uses the tangent line at the current guess to extrapolate to a better guess. Quadratic convergence means the number
of correct digits roughly doubles with each iteration — much faster than bisection.
Iteration formula:
x_(n+1) = x_n - f(x_n) / f'(x_n)

Derivation: tangent line at (x_n, f(x_n)) is: y - f(x_n) = f'(x_n)*(x - x_n)


Set y = 0 (find x-intercept of tangent) -> x = x_n - f(x_n)/f'(x_n)

Convergence: QUADRATIC near the root (doubles correct digits each step)
Failure cases:
x_0 is far from the root -> may diverge or find wrong root
f'(x_n) near 0 (flat tangent) -> huge step, may diverge

Example: Find root of f(x) = x^3 - x - 2 starting from x_0 = 2 — two iterations
f(x) = x^3 - x - 2, f'(x) = 3x^2 - 1

Iter 1: x_1 = 2 - f(2)/f'(2) = 2 - (8-2-2)/(12-1) = 2 - 4/11 = 2 - 0.364 = 1.636


Iter 2: f(1.636) = 4.377-1.636-2 = 0.741
f'(1.636) = 3*(1.636)^2 - 1 = 3*2.676-1 = 7.029-1 = 6.029
x_2 = 1.636 - 0.741/6.029 = 1.636 - 0.123 = 1.513

After just 2 iterations: 1.513 (true root = 1.5214 — already very close!)
Compare: bisection needed 3 iterations just to narrow to [1.5, 1.625]
10.3 Trapezoidal and Simpson's 1/3 rule — numerical integration

Trapezoidal rule (linear approximation):


integral[a to b] f(x) dx ~= (h/2) * [f(x_0) + 2f(x_1) + 2f(x_2) + ... + 2f(x_(n-1)) + f(x_n)]
h = (b-a)/n (strip width)
Error order: O(h^2)

Simpson's 1/3 rule (parabolic approximation — more accurate):


integral[a to b] f(x) dx ~= (h/3) * [f(x_0) + 4f(x_1) + 2f(x_2) + 4f(x_3) + ... + 4f(x_(n-1))
+ f(x_n)]
Coefficients pattern: 1, 4, 2, 4, 2, ..., 2, 4, 1 (always starts and ends with 1)
REQUIREMENT: n must be EVEN (odd number of function evaluations)
Error order: O(h^4) — much more accurate than trapezoidal for smooth functions

Example: Approximate integral[0 to 1] e^x dx using Simpson's 1/3 rule, n=4 strips
h = (1-0)/4 = 0.25
x_0=0.00: f(0.00) = e^0.00 = 1.0000
x_1=0.25: f(0.25) = e^0.25 = 1.2840
x_2=0.50: f(0.50) = e^0.50 = 1.6487
x_3=0.75: f(0.75) = e^0.75 = 2.1170
x_4=1.00: f(1.00) = e^1.00 = 2.7183

Simpson: (h/3)*[f_0 + 4f_1 + 2f_2 + 4f_3 + f_4]


= (0.25/3)*[1.0000 + 4(1.2840) + 2(1.6487) + 4(2.1170) + 2.7183]
= (0.0833)*[1.0000 + 5.1360 + 3.2974 + 8.4680 + 2.7183]
= (0.0833) * 20.6197 = 1.7179

True value: e^1 - e^0 = 2.7183 - 1 = 1.7183 Error: only 0.0004!


Quick Reference — All Key Formulas

Topic Formula / Key fact Notes

L'Hopital's rule lim f/g = lim f'/g' when 0/0 or inf/inf Differentiate top and bottom SEPARATELY

Derivative definition f'(x) = lim(h->0) [f(x+h)-f(x)]/h Instantaneous rate of change

Power rule d/dx[x^n] = n*x^(n-1) Most-used single rule

Chain rule d/dx[f(g(x))] = f'(g(x))*g'(x) Outer derivative times inner derivative

Product rule d/dx[f*g] = f'g + fg' 'First times derivative of second plus...'

Quotient rule d/dx[f/g] = (f'g - fg') / g^2 Denominator squared on the bottom

Integral by substitution Let u=g(x), then du=g'(x)dx; integrate in u Replace composite function with u

Integration by parts integral u dv = u*v - integral v du LIATE: L>I>A>T>E for choosing u

Maxima/minima step 1 Solve f'(x) = 0 to find critical points Also check where f'(x) undefined

Second derivative test f''(c)>0 = min; f''(c)<0 = max; =0 inconclusive Min = concave up; Max = concave down

Differentiate w.r.t. x, treat all other vars as


Partial derivative df/dx Standard differentiation rules apply
constants

Gradient vector grad(f) = (df/dx)i + (df/dy)j + (df/dz)k Points in direction of steepest increase

Jacobian matrix J_ij = df_i/dx_j (all partial derivatives) det(J)=0 means singular transformation

Jacobian determinant (2x2) det(J) = J_11*J_22 - J_12*J_21 Same as 2x2 matrix determinant

2x2 determinant ad - bc Memorise — used everywhere

3x3 determinant Cofactor expansion along row 1 (3 cofactors) Alternate signs: +, -, +

Characteristic equation det(A - lambda*I) = 0 Roots are the eigenvalues lambda

Eigenvalue-eigenvector A*v = lambda*v -> (A-lambda*I)v = 0 Solve for v after finding lambda

1st order linear ODE dy/dx + P(x)y = Q(x) -> mu = e^(integral P dx) Multiply both sides by integrating factor mu

2nd order homogeneous ar^2 + br + c = 0 -> characteristic roots 3 cases: real distinct, repeated, complex

r = alpha +/- beta*j -> e^(ax)(C_1*cos(bx)


Complex roots (Case 3) Most common case in practice
+C_2*sin(bx))

Laplace: e^(at) L{e^(at)} = 1/(s-a) Most important entry in the table

Laplace: sin(at) L{sin(at)} = a/(s^2+a^2) Note: sin uses a in numerator

Laplace: cos(at) L{cos(at)} = s/(s^2+a^2) Note: cos uses s in numerator

Laplace of y'' s^2*Y - s*y(0) - y'(0) Initial conditions enter automatically

Newton-Raphson iteration x_(n+1) = x_n - f(x_n)/f'(x_n) Quadratic convergence near root

Simpson's 1/3 rule (h/3)*[f_0 + 4f_1 + 2f_2 + 4f_3 + ... + f_n] n must be EVEN; coefficients: 1,4,2,4,...,4,1

You might also like