Category: Theories
-
Solving Partial Differential Equation by using Seperation of Variables : Part B. General Ways to Solve Wave Equation
The wave equation is a mathematical equation that describes the behavior of waves. It is a partial differential equation that describes how the wave’s amplitude, or strength, changes over time and space. The wave equation is used to model a wide range of phenomena in physics and engineering, including sound waves, light waves, and vibrating…
-
Solving Partial Differential Equation by using Seperation of Variables : Part A. General Ways to Solve Laplace Equations
Here is another example of how to solve the Laplace equation for a simple rectangular domain using separation of variables, under the assumption of different boundary conditions: 1. Write the Laplace equation in the form: This is the general form of the Laplace equation, which holds for any rectangular domain. 2. Define the dimensions of…
-
Partial Differential Equation (1) Laplace and Poisson Equation
From now, let’s talk about various partial differential equations. At first, I will talk about Laplace equation and Poisson equation. The Laplace equation is a second-order partial differential equation that arises in many physical systems, such as heat conduction, electrostatics, and fluid dynamics. It can be written in the following general form: where $u$ is…
-
Finite Difference Scheme (4) Python Examples for ODE
Here is an example of how to use NumPy to solve a second-order ODE using finite differences: First, we can import NumPy and set up the grid of x-values: Next, we can define the function $y(x)$ and its second derivative $y”(x)$: Note that in this example, we are using a function that has a known…
-
Finite Difference Scheme (3) Examples for Ordinary Differential Equation
Here is an example of how to solve a second-order ordinary differential equation (ODE) using finite differences: Suppose we have the following second-order ODE: where $y$ is a function of $x$ and $y”$ is the second derivative of $y$ with respect to $x$. To solve this ODE using finite differences, we can start by discretizing…
-
Finite Difference Scheme (2) Second order schemes
Here are examples of numerical schemes for finite differences that have second-order accuracy: Forward differences: To achieve second-order accuracy using forward differences, we can use the following formula: This formula uses three function values to approximate the derivative, which results in a higher-order approximation. For example, suppose we have the function $f(x) = x^2$ and…
-
Finite Difference Scheme (1) Basics
A numerical scheme for finite differences is a mathematical way to approximate a derivative of a function using finite differences, which are small values that represent the difference between two nearby points on a grid. This allows us to approximate the derivative of a function by using a finite set of data points rather than…