
Explore the foundations of numerical methods across engineering disciplines, with Python implementations and rigorous error analysis, covering linear algebra to ordinary differential equations.
In the "Introduction to Number Representation" section, you will delve into three key areas of understanding. Firstly, you'll explore number representation across various base systems, gaining insight into how numbers can be expressed differently depending on the base. Secondly, you'll delve into the intricacies of machine error, uncovering the factors that can impact numerical precision in computational environments. Lastly, you'll demystify float number representation, grasping the mechanisms behind the storage and manipulation of floating-point numbers.
In this video, you will learn how integer numbers could be represented in different Base system and an algorithm to convert from one base system to another one.
Apply the division algorithm to represent 33 in base 2 and base 7 by computing quotients and remainders to obtain binary digits and digits 4 and 5, then verify.
Coding Integer Number System Base algorithm
In this video, you will learn how real numbers could be represented in different Base system and an algorithm to convert from one base system to another one.
In this video, you discuss the necessity of rounding in computing float numbers. And, we will explore the first method "Fix Point Representation" to represent float number in a fix number of memory bits.
Explore floating point representation versus fixed point, including mantissa, exponent, normalization, biased exponent, zero representation, truncation, and how relative and absolute errors depend on magnitude.
Explore the IEEE 754 standard for floating point, detailing mantissa and exponent allocation for single (32-bit) and double (64-bit) precision, including sign bits and exponent offsets.
We will start by defining Vector Space, first giving simple example then the general definition. Vector Space is a very essential concept in linear algebra and we are going to use in the rest of the course sections.
Proving a set to be Vector Space could be boring and we need to check many conditions. but when this set is already a sub-set of a vector space, the job is more simple and we will need to check only two conditions.
Simple Exercise to represent vector using Numpy Array
We could generate (using a linear combination) a Sub Vector-Space from any given set or sequence of vectors.
Linearly independence concept will be very helpful to understand other interesting concepts like: rank of matrix, uniqueness of the solution of a linear system and so on.
define linear applications between finite dimensional vector spaces k^n to k^m and show how a matrix with m rows and n columns encodes images of basis vectors.
Learn matrix-vector and matrix-matrix multiplication, mastering dimension rules and dot-product computations in linear applications. See examples with A as 3x2 and B as 2x3 and explore numpy implementations in Python.
Explore matrix-vector and matrix-matrix multiplication by defining 3x3 and 3x2 matrices, validating shapes with NumPy dot, and illustrating valid versus invalid operations and transpose usage.
Some example of linear systems and understand the different cases with some geometrical illustrations
Explore how linear systems reduce to matrix vector multiplication A x = b, with columns c1 to cn spanning the right-hand side and conditions for existence and uniqueness.
Explore eigenvalues and eigenvectors of a matrix, define lambda and x, prove properties, determinant condition, and how distinct eigenvalues yield linearly independent eigenvectors.
Explore matrix diagonalization by expressing a diagonalizable matrix A as A = B D B^{-1}, linking eigenvalues and eigenvectors to a diagonal form and simplifying determinants and linear systems.
Learn how to find eigenvalues and eigenvectors, determine diagonalizability from distinct eigenvalues, build the diagonalization P and its inverse, and solve A x = lambda x to obtain eigenvector bases.
Apply the Gaussian elimination method to solve invertible linear systems by transforming equations into an upper triangular form, ensuring a unique solution via pivots and back substitution.
Explore Gaussian elimination with the matrix formulation, converting a linear system to upper triangular form using row operations, and solve via back substitution with augmented matrices.
Learn to solve linear systems via Gaussian elimination in Python by using an augmented matrix, pivoting, and back substitution to obtain x.
Root finding is the mathematical process of determining the values (roots) that make a given equation equal to zero, a fundamental task in numerical methods and various fields of science and engineering.
Use the bisection method, guided by the intermediate value theorem for continuous functions, to locate a root by sign changes of f(a) and f(b) and iteratively halve the interval.
Learn to implement the bisection method in Python to find a root of a continuous function with opposite signs at a and b. The lecture covers bounds, midpoints, and iterations.
Implement the Newton method in Python by computing or supplying the derivative, using SymPy for symbolic differentiation, converting to numerical functions with numpy, and comparing convergence with the bisection method.
Implement the secant method in Python, using two initial values and a recursion formula to approximate roots, and compare its convergence with Newton and bisection methods.
Define the root-finding error e_n and analyze convergence rates using big-O notation. Compare linear convergence (bisection) and quadratic convergence (Newton), plus a second method with golden-ratio rate ~1.618.
Explore interpolation using piecewise linear methods to estimate temperature from discrete current measurements, compute slopes between points, and discuss moving toward smoother interpolations with continuous first and second derivatives.
Construct a polynomial of degree at most n that passes through the n+1 nodes with values y0,...,yn, matching at each node. Interpolate to approximate a function by its node values.
Examine the existence and uniqueness of polynomial interpolation: given n+1 nodes and values, a unique degree ≤ n polynomial exists, proven via a linear algebra isomorphism, practical methods and coding.
Explore polynomial interpolation with the Vandermonde matrix. Form a linear system for coefficients a0 to an and solve by inversion, noting distinct nodes and computational cost.
Learn how the Lagrange interpolation method constructs a unique polynomial of degree at most n using the Lagrange basis and n+1 distinct nodes, with coefficients determined by data values y.
Explore the Newton interpolation method as an efficient alternative to Lagrange, using a stable Newton basis and divide differences to compute coefficients without full basis recomputation.
Explore how piecewise polynomial interpolation avoids oscillations of high-degree polynomials by using lower-degree polynomials on each interval, and ensure smoothness through node value and derivative continuity.
Explore cubic spline interpolation with piecewise cubic polynomials on subintervals between nodes, enforcing interpolation and first and second derivative continuity, with end conditions to fix the degrees of freedom.
Rewrite cubic spline constraints as a linear system by substituting x_k and x_{k+1}, deriving interpolation, first and second derivative continuity equations, and assembling the coefficients into a matrix form.
Understand curve fitting as a statistical method to select a parametric model and optimize its parameters to describe data points X and Y, capturing the main pattern amid noise.
Explore linear regression by fitting a 1D model y = ax + b with least squares, compare L1, L2, and max norms, and derive the equations for a and b.
Extend linear regression to multidimensional inputs by using an extended vector x tilde with a bias term, and solve the squared residual norm via the normal equations and pseudo-inverse.
Learn to implement multi-linear regression in Python by building the design matrix with a bias term, formulating the least-squares cost, and solving the normal equations.
Explore numerical integration using Newton-Cotes and Gaussian quadrature, partitioning the interval, approximating with piecewise polynomials, and using fixed nodes and weights.
Learn to apply Newton-Cotes formulas to approximate definite integrals by dividing the interval into equal subintervals and fitting polynomials of increasing order via interpolation using Lagrange bases.
Learn to implement Newton-Cotes in Python from scratch, then compare with scipy's built-in; partition the interval, build polynomial interpolants (Lagrange, Newton, or Vandermonde), and integrate the polynomials.
Explore implementing Newton-Cotes integration with scipy in python, using subintervals, coefficients, and the integrate function to approximate definite integrals, and discuss numerical and machine errors.
Derive and implement the trapezoidal rule from Newton-Cotes with a first-order polynomial, summing subinterval contributions to approximate the integral.
Use Simpson's rule, a quadratic Newton-Cotes method, to approximate the integral on each subinterval using endpoints xi, xi+1 and the midpoint mi, with weights 1-4-1; sum to obtain the total.
Analyze the error upper bound of Newton-Cotes methods, showing how subinterval size h and polynomial degree p affect local and global integration errors, ensuring convergence as h approaches zero.
Explore Newton-Cotes error analysis on -2 to 2 for three functions, using P values 0, 1, 2, and 5, with Vandermonde and Lagrange approaches, and compare with theoretical error bounds.
Explore how ordinary differential equations model real systems like projectile motion, RC circuits, and pendulums, and derive equations governing position, charge, and angle for numerical solution.
Define ordinary differential equations in the form y' = f(t, y) with y mapping from an interval to R^n. Convert equations to first-order systems by introducing auxiliary variables.
Derive analytic solutions for linear homogeneous ODEs, presenting scalar solutions y0 exp(∫ a dt) and vector solutions y0 exp(∫ A dt), and define the matrix exponential as the infinite series ∑_{k=0}^∞ A^k/k!.
Explore solving linear non homogeneous odes by first finding a particular solution, then adding the general solution of the corresponding homogeneous odes to obtain the complete solution.
Apply the variation of parameters method to obtain a particular solution of a known homogeneous linear ODE by letting the constant vector depend on t and using the homogeneous solution.
Use variation of parameters to solve the non-homogeneous ODE dy/dt = t y + t^3, derive y_h = C e^{t^2/2}, and obtain a Z(t)-based particular solution for the general solution.
The lecture introduces the initial value problem (IVP) for an ordinary differential equation, showing that with y(0)=y0 the linear scalar case has a unique solution y(t)=y0 e^{lambda t}.
Demonstrate global existence and uniqueness for the initial value problem under a Lipschitz condition in x for F. Relate to the local theorem and define k-Lipschitz using the Euclidean norm.
Explore the Cauchy Lipshitz local theorem, obtaining a unique solution on a subinterval near t0 under local Lipschitz conditions on a subset G×O.
This lecture reformulates a nonlinear pendulum as a two-dimensional ODE system, shows F is continuous and globally Lipshitz, and applies the Cauchy Lipshitz theorem for a unique global solution.
Explore forward Euler, solving differential equations with y_{i+1} = y_i + Δt f(t_i,y_i) from Taylor expansion, and note local Δt^2 and global Δt errors for vector and scalar cases.
Study the backward Euler method, an implicit scheme that derives y_{i+1}=y_i+Δt f(t_{i+1}, y_{i+1}) and requires solving the implicit equation via a Taylor expansion around t_{i+1}.
this lecture demonstrates implementing forward and backward Euler solvers in Python for scalar and vector ODEs, compares to exact solutions, and analyzes error versus step size.
Leapfrog method advances y by using y_{i+1} from y_{i-1}, achieving local error O(delta t^3) and global error O(delta t^2). Approximate y_{-1} with backward Euler to initialize the method.
Derive the Runge-Kutta 2 scheme by choosing alpha and beta to achieve global order two. Apply Taylor expansions to define K1, K2 and show A=B=delta t/2 (alpha=1, beta=1).
Explore the fascinating world of numerical methods and unlock the power of Python programming language for solving complex mathematical and physical problems. In this comprehensive course, you will delve into the essential theoretical foundations of numerical analysis while gaining hands-on experience with practical implementations using Python.
From root-finding, interpolation and numerical integration to solving differential equations and optimization, this course equips you with the necessary mathematical knowledge and programming skills to tackle a wide range of real-world challenges. You'll learn to apply numerical algorithms, understand their strengths and limitations, and analyze their accuracy through rigorous error analysis.
Designed for both aspiring mathematicians and Python enthusiasts, this course strikes a perfect balance between theory and application. Through engaging lectures, interactive coding exercises, and real-world projects, you'll build a strong understanding of numerical methods' underlying principles and learn to implement them effectively with Python libraries like NumPy and SciPy.
Whether you aim to optimize engineering designs, simulate physical phenomena, analyze financial data, or delve into Data Science and Machine Learning, "Numerical Methods with Python" empowers you to confidently approach diverse problems with numerical precision. Join us on this exciting journey, and elevate your problem-solving capabilities to new heights with the synergy of mathematics and Python programming