ODE system \[\left\{ \begin{array}{l} {x^{\prime}} = f\left( {x,y,t} \right)\\ {y^{\prime}} = g\left( {x,y,t} \right) \end{array} \right.,x\left( {{t_0}} \right) = {x_0},y\left( {{t_0}} \right) = {y_0}\] Linear system: \[\left\{ \begin{array}{l} {x^{\prime}} = ax + by + {r_1}\left( t \right)\\ {y^{\prime}} = cx + dy + {r_2}\left( t \right) \end{array} \right.\] \(a\), \(b\), \(c\), \(d\) can be functions of \(t\). If they are constant, then the system is called constant coefficient system. When \(r_1\left( t \right) = {r_2}\left( t \right) = 0\), the system is linearly homogeneous. Example: …

# Tag: ODE

Fourier Series To solve the ODE \({y^{\prime\prime}} + a{y^{\prime}} + by = f\left( t \right)\), in which \(f\left( t \right)\) is often the combination of \({e^t}\), \(\sin t\) and \(\cos t\), then any reasonable \(f\left( t \right)\) which is periodic, can be discontinuous but not terribly discontinuous, can be written as Fourier Series. \[f\left( t \right) = {c_0} + \sum\limits_{n = 1}^\infty {{a_n}\cos nt + {b_n}\sin nt} \] Theorem: \(u\left( t \right),v\left( t \right)\) are functions with period \(2\pi \) on the real number, …

Linear 2nd order ODE with constant coefficients Homogeneous: \[{y^{\prime\prime}} + A{y^{\prime}} + By = 0\] Solution: \[y = {c_1}{y_1} + {c_2}{y_2}\] in which, \({y_1}\) and \({y_2}\) are two independent solutions of the homogeneous ODE. The basic method to solve this ODE is to try \(y = {e^{rt}}\). Plug in and we can get \[{r^2}{e^{rt}} + Ar{e^{rt}} + B{e^{rt}} = 0 \to {r^2} + Ar + B = 0\] Case 1: two different real roots \[y = {c_1}{e^{{r_1}t}} + {c_2}{e^{{r_2}t}}\] Case …

Euler equation: \[\left\{ \begin{align} & {{x}_{n+1}}={{x}_{n}}+h \\ & {{y}_{n+1}}={{y}_{n}}+{{A}_{n}}h \\ \end{align} \right.\] \[\left\{ \begin{align} & h=\text{step}\text{size} \\ & {{A}_{n}}=f\left( {{x}_{n}},{{y}_{n}} \right) \\ \end{align} \right.\] Error of solution error = exact solution – approximate solution Method 1: smaller step Euler first-order: \(e\sim {{c}_{1}}h\), proportional to step size Method 2: find a better slop \({{A}_{n}}\) Heun’s method = improved Euler method = modified Euler method = RK2 \[\left\{ \begin{align} & {{x}_{n+1}}={{x}_{n}}+h \\ & {{y}_{n+1}}={{y}_{n}}+h\left( \frac{{{A}_{n}}+{{B}_{n}}}{2} \right) \\ \end{align} \right.\] in which, \({{B}_{n}}=f\left( …