---
tags: Mathematical modeling and optimization
title: 1.0 The hands-on mathematical Tools
---
Chapter 1. The hands-on mathematical Tools
===
### Introduction
In chapter 1, we are going to review the mathematical tools we've learned in the past. Starting from the ways to deal with data, transforming the discrete information to continuous evolutions and further towards functions and models.
Monitoring measurement data can be irritating. Information is mostly hidden in physical concepts. Tools such as statistical analysis incorporated with/without spectrum analysis might bring us some light to reveal what really happens. These are the preparation steps for mathematical modeling.
After a function is built up, the engineers are interested in the physical characteristics. How high is the temperature, how much power the system deliver, etc. Solving equations will be the essential steps to acquire this information. The equations can be highly complex with high order polynomial or exponential terms, for which it can barely be solved in the analytical way. In chapter 1.2, the numerical methods (Newton and secant) will be refreshed. These are the powerful tools to easily approach the solution and will keep us accompanied till the end of the lecture.
The specialties of an engineering system is its dynamics, for which the derivatives and integration are the mathematical sense to describe the characteristics. In chapter 1.3, we will go through the definition of differential equations (ODE and PDE) and the classical problems we may encounter as overview.
Solving differential equation(s) is the key step to assess the system performance, and analytical solution for such system model mostly do not exist. The numerical methods serve as the only strategy to conform with the challenge. Here in chapter 1.4, the numerical handling of differential equation will be introduced/refreshed. We'll see how the differential equation system are simplified into linear equations, for which the solution can be approximated in tiny steps or solved by using the concept of linear algebra.
Plenty of tools/functions are available in the coding community (Python, Matlab, Excel VBA), which can be applied during this lecture. However, it is still encouraged to code the function by yourself. You'll see how these methods exactly work and realize the constraint of them.
---
### Structure of the chapter
```markmap
# Math tools
## [Dealing with data](https://hackmd.io/@SamuelChang/BJvSwOEFa)
- [interpolation](https://hackmd.io/@SamuelChang/BJvSwOEFa#111-interpolation-of-data)
- [mean and deviation](https://hackmd.io/@SamuelChang/BJvSwOEFa#112-Statistical-representation-and-Gaussian-distribution)
- [frequency analysis](https://hackmd.io/@SamuelChang/BJvSwOEFa#113-Spectrum-analysis-and-Fourier-transformation)
## [Solving equations](https://hackmd.io/@SamuelChang/HJS5z3UE6#12-Finding-the-roots-of-equation)
- [numerical approaches](https://hackmd.io/@SamuelChang/HJS5z3UE6#121-Numerical-method-approaching-the-solution)
- [Newton-Raphson method](https://hackmd.io/@SamuelChang/HJS5z3UE6#Newton-Raphson-Method)
- [Secant method](https://hackmd.io/@SamuelChang/HJS5z3UE6#Secant-Method)
- resources in python
## [Derivatives and integrals](https://hackmd.io/gQP1PzTVTma8p9HLP7aTpw#13-Derivation-and-integration-of-variables)
- [definition](https://hackmd.io/gQP1PzTVTma8p9HLP7aTpw#Definition)
- [utilization in dynamics](https://hackmd.io/gQP1PzTVTma8p9HLP7aTpw#131-Derivative-and-integration-in-dynamic-system)
- [ODE types](https://hackmd.io/gQP1PzTVTma8p9HLP7aTpw#132-Ordinary-Differential-Equation-ODE-as-initial-value-problem)
- [initial value type (IVP)](https://hackmd.io/gQP1PzTVTma8p9HLP7aTpw#Initial-Value-Problem-IVP)
- [boundary value type (BVP)](https://hackmd.io/gQP1PzTVTma8p9HLP7aTpw#Boundary-Value-Problems-BVPs)
## [Numerics in differential equations](https://hackmd.io/@SamuelChang/HyCeyhTKp#14-Numerical-handling-for-differential-equations)
- [ODE -IVP](https://hackmd.io/@SamuelChang/HyCeyhTKp#141-ODE-with-initial-value-problem-Realizing-temporal-evolution-from-Euler-to-Runge-Kutta-method)
- [Euler explicit](https://hackmd.io/@SamuelChang/HyCeyhTKp#Eulers-method)
- [Runge-Kutta explicit](https://hackmd.io/@SamuelChang/HyCeyhTKp#Runge-Kutta-methods)
- [ODE-BVP](https://hackmd.io/@SamuelChang/HyCeyhTKp#142-ODE-with-boundary-value-problem-Finite-Difference-Method-FDM-with-boundary-values)
- [Dirichlet boundary](https://hackmd.io/rklGq_nFSdGOzwBUdrjT6w?both#Dirichlet-boundary-conditions)
- [Neumann bounday](https://hackmd.io/rklGq_nFSdGOzwBUdrjT6w?both#Neumann-boundary-conditions)
- [PDE approach](https://hackmd.io/rklGq_nFSdGOzwBUdrjT6w?both#143-Approaching-the-PDE-solutions)
```
---
### Content of the chapter
#### 1.1 Data handling and modeling
- Interpolation and spline
- Statistical representation and Gaussian distribution
- Spectrum analysis and Fourier transformation
#### 1.2 Root finding of equations
- Numerical strategies: Newton and secant methods
- Solving equation and equation system
#### 1.3 Derivation of variables
- Principles of variable derivation
- Ordinary Differential Equation (ODE) with given initial(IVP) or boundary(BVP) conditions
- Partial differential equation (PDE) and the equation system
#### 1.4 Numerical handling for differential equations
- Numerical method dealing with derivatives (in time and space)
- ODE with initial value problem - Realizing temporal evolution from Euler to Runge-Kutta method
- ODE with boundary value problem - Heading the Dirichlet and Neumann boundary conditions
- Finite Difference Method (FDM) for transient 1-D problems
---
### Tutorials
At the end of chapter, you'll be capable to deal with the two simplified scenario:
#### Tutorial 1.1: OESs with coupled variables
two first order ordinary differential equations with coupled variables
$$
\begin{align}
& \psi^{\prime}(t) = \psi^{1.1}(t) \ r^2(t) \\
\\
& r^{\prime}(t) = -\psi^{0.3}(t)
\end{align}
$$
with their initial values
$$ \psi(t_0) = 0.1\qquad r(t_0)= 3 $$
1. _What are the $\psi$ and $r$ evolution for $t\in [0, 2]$?_
2. _Say if now the variable $r$ must be non-negative; how would the evolution look like?_
<br/>
#### Tutorial 1.2: 1D wave equation -- PDE with initial and boundary conditions
A wave equation has the general form
$$
\frac{\partial^2 u}{\partial t^2} = c^2 \frac{\partial^2 u}{\partial x^2}
$$
In this tutorial, we are going to see the wave propagation on a fixed ends rubber band. The given parameters are
- string length ($L$) = $1$
- speed of wave ($c$) = $1$
The initial condition is $1.5$ times sin wave with the amplitude of $0.3$, i.e., $sin(3\pi/ L \ x)$
_How does the rubber band vibrate along the time for $t\in [0, 2]$?_
---
[__BACK TO CONTENT__](https://hackmd.io/@SamuelChang/H1LvI_eYn)