CACS252 Numerical Method

Numerical MethodUnit 88 min read

Eigenvalue Problems & Special Topics: Methods, Applications & Boundary Value Problems

Unit 8 of Numerical Method covers eigenvalue computations (power method, Jacobi method), boundary value problems (shooting method, finite difference), and special topics like PDEs and linear interpolation. Learn definitions, algorithms, real-world ties (Google PageRank, NEPSE stock analysis), and exam strategies with v

TAKEAWAYS:

  • Eigenvalues/vectors are computed via power method (iterative) or Jacobi method (rotation-based), with convergence guarantees for dominant eigenvalues.
  • Boundary value problems (BVPs) use the shooting method (ODE solver + boundary correction) or finite differences (discretization of derivatives).
  • Partial differential equations (PDEs) model real-world phenomena (heat flow, wave propagation) via finite difference/element methods.
  • Special topics like linear interpolation and matrix decomposition (LU, QR) bridge numerical methods to machine learning (e.g., PCA).
  • Exam focus: Algorithmic steps (pseudocode), error analysis, and linking methods to applications (e.g., Google’s PageRank uses power iteration).

1. Eigenvalue Problems: Definitions and Methods

Eigenvalues () and eigenvectors () satisfy . Critical for stability analysis, vibrations, and Google’s PageRank.

Key Methods

A. Power Method (for Dominant Eigenvalue)

How it works:

  1. Start with a guess vector .
  2. Iterate: .
  3. Converges to eigenvector of the dominant eigenvalue (largest magnitude).

Example: Find the dominant eigenvalue of . Steps:

  1. Choose .
  2. Iterate:
    • Normalize: .
  3. Compute (true ).

Real-world tie: Google’s PageRank uses the power method to rank web pages. The matrix represents link transitions, and the dominant eigenvector gives page importance.

B. Jacobi Method (Rotation-Based)

How it works:

  1. Diagonalize via rotations to eliminate off-diagonal elements.
  2. Converges to a diagonal matrix where eigenvalues are the diagonal entries.

Comparison Table:

Method Use Case Convergence Speed Example Application
Power Method Dominant eigenvalue Slow (linear) Google PageRank
Jacobi Method All eigenvalues (symmetric) Quadratic Structural vibration analysis

2. Boundary Value Problems (BVPs)

BVPs specify conditions at both ends of the domain (e.g., , ).

A. Shooting Method

How it works:

  1. Convert BVP to an initial value problem (IVP) by guessing .
  2. Solve IVP numerically (e.g., Heun’s method).
  3. Adjust until boundary condition is met.

Example: Solve with , .

flowchart TD
    A["Guess y'(0) = c"] --> B["Solve IVP: y'' = -y"]
    B --> C["Check y(π/2) ≈ 1?"]
    C -->|"No"| D["Adjust c"]
    C -->|"Yes"| E["Solution found"]

Steps:

  1. Guess .
  2. Use Heun’s method to solve :
    • At , , . . At , (not 1).
  3. Adjust iteratively until (true ).

Real-world tie: NEPSE stock price modeling: BVPs model price trends with boundary conditions (e.g., initial and future price caps). The shooting method predicts equilibrium prices.


B. Finite Difference Method

How it works:

  1. Discretize the domain into grid points.
  2. Approximate derivatives (e.g., ).
  3. Solve the resulting linear system (e.g., via Gauss-Seidel).

Example: Solve with , (discretize ). Steps:

  1. Finite difference equations:
  2. Solve the tridiagonal system (Gauss-Seidel):
    • Iterate until convergence (e.g., ).

Real-world tie: NTC’s power grid stability: PDEs model voltage distribution across grids. Finite differences simulate real-time adjustments to prevent blackouts.


3. Partial Differential Equations (PDEs)

PDEs describe spatial + temporal phenomena (e.g., heat equation, wave equation).

A. Finite Difference Method for PDEs

Example: Heat equation with , .

graph TD
    A["Discretize space (x) and time (t)"] --> B["Approximate u_t and u_xx"]
    B --> C["Form system: u_{i,j+1} = r u_{i-1,j} + (1-2r) u_{i,j} + r u_{i+1,j}"]
    C --> D["Solve iteratively"]

Steps:

  1. Let .
  2. For , use:
  3. Apply boundary conditions (e.g., ).

Real-world tie: Pathao’s dynamic pricing: PDEs model rider demand across zones. Finite differences predict surge pricing in real time.


4. Special Topics

A. Linear Interpolation

How it works: Estimate between two points and : Example: Estimate for , . Solution:

Real-world tie: eSewa’s transaction fees: Linear interpolation estimates fees between two transaction amounts (e.g., ₹100 → 2%, ₹500 → 1.5%).

B. LU and QR Decomposition

  • LU: Factor for solving (forward/back substitution).
  • QR: Factor for least-squares problems (used in machine learning).

Example: LU decomposition of . Steps:

  1. , .
  2. Solve via substitution.

In the Real World

  1. Google PageRank (Power Method):

    • What it uses: Power iteration to compute the dominant eigenvector of a link-transition matrix.
    • How: Each webpage is a node; links are matrix entries. The eigenvector ranks pages by importance.
  2. NEPSE Stock Analysis (Boundary Value Problems):

    • What it uses: Shooting method to model price trends with boundary conditions (e.g., historical low/high).
    • How: Convert price BVP into an IVP, solve numerically, and adjust initial guesses to match market caps.
  3. Pathao’s Surge Pricing (PDEs):

    • What it uses: Heat equation PDEs to model rider demand across geographic zones.
    • How: Finite differences simulate demand diffusion, predicting price surges in high-demand areas.
  4. NTC Power Grid (Finite Differences):

    • What it uses: Finite difference discretization of Laplace’s equation for voltage distribution.
    • How: Solves to stabilize grid voltages in real time.

Exam Tip

  1. Algorithmic Questions:

    • For the power method, show iteration steps and convergence proof (Rayleigh quotient).
    • For the shooting method, write pseudocode with boundary correction logic.
  2. Theoretical Questions:

    • Define eigenvalue problems as and contrast with IVPs/BVPs.
    • For PDEs, state the finite difference approximation (e.g., ).
  3. Application Links:

    • Tie eigenvalues to Google PageRank or structural analysis.
    • Link BVPs to stock modeling or traffic flow (e.g., Kathmandu’s congestion as a BVP).
  4. Common Pitfalls:

    • Power method: Forget normalization → divergence.
    • Shooting method: Poor initial guess → slow convergence.
    • PDEs: Stability condition () for explicit methods.

Visual Summary:

mindmap
  root((Eigenvalue Problems & Special Topics))
    Power Method
      Iterative
      Dominant Eigenvalue
      Google PageRank
    Jacobi Method
      Rotation
      All Eigenvalues
    Boundary Value Problems
      Shooting Method
        IVP + Correction
        NEPSE Stocks
      Finite Differences
        Discretization
        NTC Power Grid
    PDEs
      Heat Equation
      Finite Differences
      Pathao Pricing
    Special Topics
      Linear Interpolation
        eSewa Fees
      LU/QR Decomposition
        Solving Ax = b

Based on the TU BCA syllabus for Numerical Method (CACS252), unit 8.

Discussion

Loading…